Class XMSSParameters
java.lang.Object
org.bouncycastle.crypto.params.XMSSParameters
- All Implemented Interfaces:
PQCParameters
XMSS Parameters.
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final intThe tallest tree whose leaves an int index can count. -
Constructor Summary
ConstructorsConstructorDescriptionXMSSParameters(int height, ASN1ObjectIdentifier treeDigestOID) XMSS Constructor...XMSSParameters(int height, ASN1ObjectIdentifier treeDigestOID, int n) XMSS Constructor with explicit security parameter n.XMSSParameters(int height, Digest treeDigest) XMSS Constructor... -
Method Summary
Modifier and TypeMethodDescriptionintReturn 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).intGetter height.intgetK()intgetLen()intReturn 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).intReturn 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).Return the tree digest OID.intGetter digest size.intGetter Winternitz parameter.static XMSSParameterslookupByOID(int oid)
-
Field Details
-
MAX_HEIGHT
public static final int MAX_HEIGHTThe 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
XMSS Constructor...- Parameters:
height- Height of tree.treeDigest- Digest to use.
-
XMSSParameters
XMSS Constructor...- Parameters:
height- Height of tree.treeDigestOID- OID of digest to use.
-
XMSSParameters
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:
getSecurityCategoryin interfacePQCParameters- 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:
getClassicalSecurityStrengthin interfacePQCParameters- Returns:
- the classical security strength in bits.
-
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
-
getLen
public int getLen() -
getWinternitzParameter
public int getWinternitzParameter()Getter Winternitz parameter.- Returns:
- Winternitz parameter.
-
getK
public int getK() -
lookupByOID
-