Class XMSSParameters

java.lang.Object
org.bouncycastle.crypto.params.XMSSParameters
All Implemented Interfaces:
PQCParameters

public final class XMSSParameters extends Object implements PQCParameters
XMSS Parameters.
  • Field Details

    • MAX_HEIGHT

      public static final int MAX_HEIGHT
      The tallest tree whose leaves an int index can count. Shared with BDS.validate(), which refuses a traversal state outside it.
      See Also:
  • Constructor Details

    • XMSSParameters

      public XMSSParameters(int height, Digest treeDigest)
      XMSS Constructor...
      Parameters:
      height - Height of tree.
      treeDigest - Digest to use.
    • XMSSParameters

      public XMSSParameters(int height, ASN1ObjectIdentifier treeDigestOID)
      XMSS Constructor...
      Parameters:
      height - Height of tree.
      treeDigestOID - OID of digest to use.
    • XMSSParameters

      public XMSSParameters(int height, ASN1ObjectIdentifier treeDigestOID, int n)
      XMSS Constructor with explicit security parameter n.
      Parameters:
      height - Height of tree.
      treeDigestOID - OID of digest to use.
      n - Security parameter (digest output size in bytes), or -1 to derive from digest.
  • Method Details

    • getTreeDigestSize

      public int getTreeDigestSize()
      Getter digest size.
      Returns:
      Digest size.
    • getSecurityCategory

      public int getSecurityCategory()
      Return the NIST security category of this parameter set: 3 for the SHA-256/192 and SHAKE256/192 sets (n = 24) and 5 for the SHA-256 and SHAKE256/256 sets (n = 32) (NIST IR 8547, Table 3, for the sets approved in SP 800-208). The RFC 8391 sets outside SP 800-208 carry no NIST categorisation and are given the figure their hash implies: 5 for SHA-512 and SHAKE256/512, and 1 for SHAKE128, whose security is capped at 128 bits whatever its output length.
      Specified by:
      getSecurityCategory in interface PQCParameters
      Returns:
      the security category, as given in NIST IR 8547 Tables 3 and 5.
    • getClassicalSecurityStrength

      public int getClassicalSecurityStrength()
      Return the classical security strength of this parameter set: 8 times the hash output length n, capped at 256 bits, or at 128 bits for SHAKE128 (NIST IR 8547, Table 3).
      Specified by:
      getClassicalSecurityStrength in interface PQCParameters
      Returns:
      the classical security strength in bits.
    • getTreeDigestOID

      public ASN1ObjectIdentifier getTreeDigestOID()
      Return the tree digest OID.
      Returns:
      OID for digest used to build the tree.
    • getParameterSetOID

      public int getParameterSetOID()
      Return the RFC 8391 / SP 800-208 parameter-set identifier for this parameter set (the 4-octet value carried at the start of an RFC 9802 encoded key), or 0 if these parameters do not correspond to a standard set (for example a non-standard tree height).
      Returns:
      the 4-octet parameter-set identifier, or 0 if none.
    • getHeight

      public int getHeight()
      Getter height.
      Returns:
      XMSS tree height.
    • getTreeDigest

      public String getTreeDigest()
    • getLen

      public int getLen()
    • getWinternitzParameter

      public int getWinternitzParameter()
      Getter Winternitz parameter.
      Returns:
      Winternitz parameter.
    • getK

      public int getK()
    • lookupByOID

      public static XMSSParameters lookupByOID(int oid)