Class SignatureInteropProfiles
This helper centralizes the translation from canonical external signature
names such as SHA256withRSA into a pair of ZeroEcho coordinates:
- the key algorithm used for key import and algorithm matching, and
- the signature context algorithm plus a mandatory explicit specification.
The class exists to avoid accidental reliance on algorithm default specs.
Such defaults are often reasonable for native ZeroEcho usage, but they are
not sufficient for standards interoperability because names like
SHA256withRSA encode semantics that include digest selection,
padding, and sometimes signature-byte representation.
Scope
The current mapping covers classic interoperable signature names that are commonly encountered in X.509 and PKCS#10 workflows:
- RSA PKCS#1 v1.5 with SHA-256/384/512
- ECDSA with SHA-256/384/512
- Ed25519 and Ed448
- ML-DSA-44, ML-DSA-65, ML-DSA-87 (FIPS 204)
- SLH-DSA SHA2 and SHAKE variants (FIPS 205)
Algorithms not known to this helper are intentionally returned as
Optional.empty(), allowing callers to preserve current
ZeroEcho-native behavior for PQC, hybrid, or application-specific
identifiers.
-
Method Summary
Modifier and TypeMethodDescriptionReturns the set of canonical interop algorithm identifiers known to this helper.static StringkeyAlgorithmIdOrSelf(String algorithmId) Returns the key algorithm identifier associated with a signature algorithm.static Optional<SignatureInteropProfile> Resolves an external signature algorithm identifier.
-
Method Details
-
resolve
Resolves an external signature algorithm identifier.- Parameters:
algorithmId- canonical signature algorithm identifier- Returns:
- a profile when the algorithm has standard interop semantics known to
ZeroEcho; otherwise
Optional.empty()
-
algorithmIds
-
keyAlgorithmIdOrSelf
Returns the key algorithm identifier associated with a signature algorithm.If the signature algorithm is unknown to this helper, the original value is returned unchanged. This makes the method safe for callers that want a best effort key-algorithm normalization without losing PQC or application-specific identifiers.
- Parameters:
algorithmId- signature algorithm identifier- Returns:
- the matching key algorithm id, or the original value when no standard mapping exists
-