public class SLHDSASecretBCPGKey extends OctetArrayBCPGKey
PublicKeyAlgorithmTags.SLHDSA_SHAKE_128s,
PublicKeyAlgorithmTags.SLHDSA_SHAKE_128f and PublicKeyAlgorithmTags.SLHDSA_SHAKE_256s
(RFC 9980 sec. 6.2.2.2): the fixed-length SLH-DSA secret key in the FIPS 205 encoding
(SK.seed || SK.prf || PK.seed || PK.root).| Constructor and Description |
|---|
SLHDSASecretBCPGKey(int algorithm,
BCPGInputStream in)
Parse the secret key of the given SLH-DSA algorithm from the (decrypted) secret key material.
|
SLHDSASecretBCPGKey(int algorithm,
byte[] key)
Construct the secret key of the given SLH-DSA algorithm.
|
| Modifier and Type | Method and Description |
|---|---|
int |
getAlgorithm()
Return the public key algorithm ID this key belongs to.
|
static int |
getLength(int algorithm)
Return the length of the SLH-DSA secret key (RFC 9980 Table 8).
|
encode, getEncoded, getFormat, getKeypublic SLHDSASecretBCPGKey(int algorithm,
BCPGInputStream in)
throws java.io.IOException
algorithm - public key algorithm ID, one of the SLH-DSA code pointsin - input stream positioned at the algorithm-specific secret key materialjava.io.IOException - if the key cannot be readpublic SLHDSASecretBCPGKey(int algorithm,
byte[] key)
algorithm - public key algorithm ID, one of the SLH-DSA code pointskey - the SLH-DSA secret key, 64 octets for the 128-bit parameter sets and 128 for SLH-DSA-SHAKE-256spublic int getAlgorithm()
public static int getLength(int algorithm)
algorithm - public key algorithm ID