Class XmssAlgorithm


public final class XmssAlgorithm extends AbstractCryptoAlgorithm
Concrete CryptoAlgorithm for XMSS (eXtended Merkle Signature Scheme).

Overview

XMSS is a stateful hash-based signature scheme standardized in RFC 8391. Security relies solely on the collision resistance of the underlying hash function and is therefore considered quantum-safe.

CRITICAL: Statefulness

XMSS private keys are stateful with a finite signing capacity. Each signing operation consumes one Merkle-tree leaf and advances the internal leaf index irreversibly. The updated private key state must be persisted to non-volatile storage before and after each signing operation. Reusing a key at the same index (e.g., after a crash without persisting the update) breaks security. Durable signing requires an explicit StatefulSigner; generic signing is unavailable.

The default parameter set SHA2_10_256 provides 210 = 1 024 signing operations. Choose a larger tree height if more capacity is required.

Capabilities

Thread-safety

XmssAlgorithm instances are immutable and safe to share. Created SignatureContext objects are not thread-safe.

Since:
1.0
  • Constructor Details

    • XmssAlgorithm

      public XmssAlgorithm()
      Creates the XMSS algorithm instance and registers its capabilities and the default key-pair generator (SHA2_10_256).
  • Method Details

    • parameterSets

      public List<ParameterSetDescriptor<? extends AlgorithmKeySpec>> parameterSets()
      Description copied from class: CryptoAlgorithm
      Returns the discoverable parameter sets (or parameterized templates) supported by this algorithm.

      Callers (UIs, provisioning tools, policy engines) use this list to present users with valid, named key-generation options without prior knowledge of the concrete algorithm. Each entry is either a pre-built ParameterSetDescriptor.Concrete (ready spec) or a ParameterSetDescriptor.Template (user-supplied arguments produce the spec).

      The default implementation returns an empty list. Algorithms with finite, enumerable parameter sets should override this method. Overrides must return immutable lists in stable order, with unique nonblank descriptor identifiers. Registry loading validates a snapshot; external providers remain responsible for maintaining the contract on subsequent calls. Implementations may use ParameterSetDescriptor.snapshot(List) to validate and copy their list.

      Overrides:
      parameterSets in class CryptoAlgorithm
      Returns:
      immutable list of parameter set descriptors; never null
    • requiresStatefulSigning

      public boolean requiresStatefulSigning()
      Description copied from class: CryptoAlgorithm
      Indicates that signing consumes durable private-key state. This declaration does not enable the ordinary SIGN role: callers need a keyring-owned StatefulSigner capability.
      Overrides:
      requiresStatefulSigning in class CryptoAlgorithm
      Returns:
      whether durable state ownership is required for signing