Class XMSSParameters

java.lang.Object
de.hda.fbi.ucs.eucrite.parameters.XMSSParameters
All Implemented Interfaces:
AlgorithmParameters

public class XMSSParameters
extends Object
implements AlgorithmParameters
The parameters required for the XMSS signature scheme. XMSS is a stateful signature scheme where the private key needs to be updated after every signature. Multiple usage of the same state will render the scheme insecure. Therefore, the private key should never be copied to prevent multiple usage of a single state.

Another quantum-safe and hash-based, but stateless, signature scheme is SPHINCS.

A XMSS private key is a Merkle tree with given height with a one time signature key at every leaf. The number of possible signatures is 2^height. Increasing the height will increase the number of possible signature, but also the size of the private key and the signatures. The one time signature keys use a treeDigest for signing. The available values for treeDigest are defined as static values in this class, e.g. XMSSParameters.SHA512.

Author:
Alexander Zeier
  • Field Details

  • Constructor Details

    • XMSSParameters

      public XMSSParameters​(int height, String treeDigest)
      Creates a new XMSSParameters object with the given height and treeDigest. XMSS is a stateful signature scheme where the private key needs to be updated after every signature. Multiple usage of the same state will render the scheme insecure. Therefore, the private key should never be copied to prevent multiple usage of a single state.

      Use XMSSforSmallSignatures() to get recommended values for the parameters.

      Parameters:
      height - The height of the Merkle tree. A higher height results in more doable signatures, but also in a larger private key and signature.
      treeDigest - The hash algorithm used for signing.
  • Method Details

    • getType

      public AlgorithmParameters.Type getType()
      Description copied from interface: AlgorithmParameters
      Return the type of the cryptographic scheme.
      Specified by:
      getType in interface AlgorithmParameters
      Returns:
      The type of the cryptographic scheme.
    • XMSSforSmallSignatures

      public static XMSSParameters XMSSforSmallSignatures()
      Use XMSS to prioritize signature size over signing speed. For this, a height of 20 is used together with SHA256 as tree digest.

      If signing speed is more important, you should use XMSSMTParameters.XMSSMTforFastSigning() instead.

      Returns:
      An XMSSParameters object with predefined values.
    • getTreeDigest

      public String getTreeDigest()
      Returns the treeDigest.
      Returns:
      The hash algorithm used for signing.
    • getHeight

      public int getHeight()
      Returns the height of the Merkle tree.
      Returns:
      The height of the Merkle tree.