Class HybridSignatureContexts

java.lang.Object
zeroecho.sdk.hybrid.signature.HybridSignatureContexts

public final class HybridSignatureContexts extends Object
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 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 contexts
      profile - hybrid signature profile
      classicPrivate - private key for the classical signature engine
      pqcPrivate - private key for the PQC signature engine
      maxBufferedBytes - maximum number of bytes buffered from the wrapped stream (DoS guard)
      Returns:
      signing signature context
      Throws:
      NullPointerException - if any mandatory argument is null
      IllegalArgumentException - if maxBufferedBytes <= 0
      UnsupportedRoleException - 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 contexts
      profile - hybrid signature profile
      classicPublic - public key for the classical signature engine
      pqcPublic - public key for the PQC signature engine
      maxBufferedBytes - maximum number of bytes buffered from the wrapped stream (DoS guard)
      Returns:
      verifying signature context
      Throws:
      NullPointerException - if any mandatory argument is null
      IllegalArgumentException - if maxBufferedBytes <= 0
      Since:
      1.0