Package io.jans.lock.trace.crypto
Class TraceCryptoException
java.lang.Object
java.lang.Throwable
java.lang.Exception
java.lang.RuntimeException
io.jans.lock.trace.crypto.TraceCryptoException
- All Implemented Interfaces:
Serializable
Thrown by the TRACE crypto layer when a key cannot be built from a JWK or when the security
provider cannot perform Ed25519 operations. Also thrown by
TraceCryptoProvider for a
signature that does not verify, for input that cannot be canonicalized and for input that cannot
be a receipt position. Messages never carry key material, signature bytes or record content.
The reason is a short stable token intended for the structured error
body (reason member); the message is for logs.
- Author:
- Yuriy Movchan
- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final StringThe JSON value cannot be reduced to RFC 8785 canonical form.static final StringThe provider lacks Ed25519 support or is not installed (fail closed).static final StringThe provider rejected the key (not an Ed25519 key usable for verification).static final StringAn input cannot be a receipt position (receipt-hash input is malformed).static final StringJWKcrvis missing or notEd25519.static final StringJWK is null or not a JSON object.static final StringJWKktyis missing or notOKP.static final StringJWK carries admember (private key material must never be registered).static final StringJWKxis missing, not a string, or not strict unpadded base64url.static final StringJWKxdoes not decode to exactly 32 bytes.static final StringThe Ed25519 signature does not verify over the signature scope of the record. -
Constructor Summary
ConstructorsConstructorDescriptionTraceCryptoException(String reason, String message) TraceCryptoException(String reason, String message, Throwable cause) -
Method Summary
Methods inherited from class java.lang.Throwable
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
-
Field Details
-
REASON_CRYPTO_UNAVAILABLE
The provider lacks Ed25519 support or is not installed (fail closed).- See Also:
-
REASON_JWK_KTY
JWKktyis missing or notOKP.- See Also:
-
REASON_JWK_CRV
JWKcrvis missing or notEd25519.- See Also:
-
REASON_JWK_X_LENGTH
JWKxdoes not decode to exactly 32 bytes.- See Also:
-
REASON_JWK_X_ENCODING
JWKxis missing, not a string, or not strict unpadded base64url.- See Also:
-
REASON_JWK_PRIVATE_MATERIAL
JWK carries admember (private key material must never be registered).- See Also:
-
REASON_JWK_FORMAT
JWK is null or not a JSON object.- See Also:
-
REASON_INVALID_KEY
The provider rejected the key (not an Ed25519 key usable for verification).- See Also:
-
REASON_SIGNATURE_MISMATCH
The Ed25519 signature does not verify over the signature scope of the record.- See Also:
-
REASON_CANONICALIZATION_FAILED
The JSON value cannot be reduced to RFC 8785 canonical form.- See Also:
-
REASON_INVALID_RECEIPT_INPUT
An input cannot be a receipt position (receipt-hash input is malformed).- See Also:
-
-
Constructor Details
-
TraceCryptoException
-
TraceCryptoException
-
-
Method Details
-
getReason
- Returns:
- short stable reason token, e.g.
jwk_x_lengthorcrypto_unavailable
-