Class XmssAlgorithm
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
- Generic signing is unavailable; freshly enrolled keys may use
StatefulSigner. KeyUsage.VERIFY: verifies XMSS signatures using aPublicKey.
Thread-safety
XmssAlgorithm instances are immutable and safe to share. Created
SignatureContext objects are not thread-safe.
- Since:
- 1.0
-
Constructor Summary
ConstructorsConstructorDescriptionCreates the XMSS algorithm instance and registers its capabilities and the default key-pair generator (SHA2_10_256). -
Method Summary
Modifier and TypeMethodDescriptionList<ParameterSetDescriptor<? extends AlgorithmKeySpec>> Returns the discoverable parameter sets (or parameterized templates) supported by this algorithm.booleanIndicates that signing consumes durable private-key state.Methods inherited from class AbstractCryptoAlgorithm
capabilityMethods inherited from class CryptoAlgorithm
addCapability, asymmetricKeyPairGenerator, bindContext, createContext, displayName, id, keyOperations, listCapabilities, priority, privateKeyImporter, providerName, publicKeyImporter, registerAsymmetricKeyPairGenerator, registerPrivateKeyImporter, registerPublicKeyImporter, registerSymmetricKeyGenerator, registerSymmetricKeyImporter, roles, supports, symmetricKeyGenerator, symmetricKeyImporter
-
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
Description copied from class:CryptoAlgorithmReturns 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 aParameterSetDescriptor.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:
parameterSetsin classCryptoAlgorithm- Returns:
- immutable list of parameter set descriptors; never
null
-
requiresStatefulSigning
public boolean requiresStatefulSigning()Description copied from class:CryptoAlgorithmIndicates that signing consumes durable private-key state. This declaration does not enable the ordinary SIGN role: callers need a keyring-ownedStatefulSignercapability.- Overrides:
requiresStatefulSigningin classCryptoAlgorithm- Returns:
- whether durable state ownership is required for signing
-