Class HybridSignatureContexts
java.lang.Object
zeroecho.sdk.hybrid.signature.HybridSignatureContexts
Factory for
SignatureContext-compatible hybrid signature contexts.
The returned contexts implement the standard ZeroEcho streaming contract: wrapping a stream produces/verifies a signature trailer at EOF.
- Since:
- 1.0
-
Method Summary
Modifier and TypeMethodDescriptionstatic SignatureContextsign(ZeroEchoSession session, HybridSignatureProfile profile, PrivateKey classicPrivate, PrivateKey pqcPrivate, int maxBufferedBytes) Creates a signing hybrid signature context.static SignatureContextverify(ZeroEchoSession session, HybridSignatureProfile profile, PublicKey classicPublic, PublicKey pqcPublic, int maxBufferedBytes) Creates a verification hybrid signature context.
-
Method Details
-
sign
public static SignatureContext sign(ZeroEchoSession session, HybridSignatureProfile profile, PrivateKey classicPrivate, PrivateKey pqcPrivate, int maxBufferedBytes) Creates a signing hybrid signature context.- Parameters:
session- active session used to create both signature contextsprofile- hybrid signature profileclassicPrivate- private key for the classical signature enginepqcPrivate- private key for the PQC signature enginemaxBufferedBytes- maximum number of bytes buffered from the wrapped stream (DoS guard)- Returns:
- signing signature context
- Throws:
NullPointerException- if any mandatory argument isnullIllegalArgumentException- ifmaxBufferedBytes <= 0UnsupportedRoleException- if either component uses LMS/XMSS, before constructing either child context- Since:
- 1.0
-
verify
public static SignatureContext verify(ZeroEchoSession session, HybridSignatureProfile profile, PublicKey classicPublic, PublicKey pqcPublic, int maxBufferedBytes) Creates a verification hybrid signature context.- Parameters:
session- active session used to create both verification contextsprofile- hybrid signature profileclassicPublic- public key for the classical signature enginepqcPublic- public key for the PQC signature enginemaxBufferedBytes- maximum number of bytes buffered from the wrapped stream (DoS guard)- Returns:
- verifying signature context
- Throws:
NullPointerException- if any mandatory argument isnullIllegalArgumentException- ifmaxBufferedBytes <= 0- Since:
- 1.0
-