Package io.jans.lock.trace.crypto.bc
Class Ed25519Capability
java.lang.Object
io.jans.lock.trace.crypto.bc.Ed25519Capability
Startup probe for Ed25519 support in the installed BouncyCastle provider. The standard WAR
ships
bcprov, the FIPS WAR ships bc-fips; whether the latter exposes Ed25519
is decided at runtime here, and TRACE ingestion fails closed (500 crypto_unavailable)
when it does not. Observed with bc-fips 1.0.2.4: Ed25519 is available in the default mode but
absent when the JVM runs with -Dorg.bouncycastle.fips.approved_only=true.
The probe generates a throwaway key pair, signs a fixed message, rebuilds the public key
from its raw bytes through Ed25519PublicKeys (exercising the KeyFactory path),
verifies the signature with Ed25519Verifier, and checks that a corrupted signature is
rejected. Only the outcome and the provider name are logged.
- Author:
- Yuriy Movchan
-
Constructor Summary
Constructors -
Method Summary
-
Constructor Details
-
Ed25519Capability
public Ed25519Capability()
-
-
Method Details
-
probe
@PostConstruct public void probe()Runs the probe. Safe to call again; the last result wins. Never throws. -
requireAvailable
public void requireAvailable()- Throws:
TraceCryptoException- with reasoncrypto_unavailableunless the last probe succeeded
-
isAvailable
public boolean isAvailable() -
getProviderName
- Returns:
- the provider name the probe ran against, or
nullif none was installed
-
getFailure
- Returns:
- a short description of why the probe failed, or
nullif it passed
-