Class StatefulSigningGuard

java.lang.Object
zeroecho.core.alg.common.sig.StatefulSigningGuard

public final class StatefulSigningGuard extends Object
Fail-closed containment for stateful signing until durable leaf reservation is available. Verification and key import are unaffected. This class is stateless and thread-safe; it never encodes a key or invokes a cryptographic provider.
  • Method Details

    • isStateful

      public static boolean isStateful(String algorithm)
      Identifies LMS/HSS and XMSS/XMSSMT names and their supported OID families. Canonical identities are checked by family, without interpreting their namespace or parameters as provider aliases. Work and auxiliary memory are O(n) in the identifier length.
      Parameters:
      algorithm - algorithm name or OID; null means unspecified
      Returns:
      whether the identifier is unavailable for signing
    • requireStateless

      public static void requireStateless(String algorithm, Key key)
      Checks both declared algorithm and actual key identity without using the key.
      Parameters:
      algorithm - declared name or OID, or null
      key - actual key, or null when only metadata is available
      Throws:
      UnsupportedRoleException - if stateful signing is requested