public class SLHDSAPublicBCPGKey extends OctetArrayBCPGKey
PublicKeyAlgorithmTags.SLHDSA_SHAKE_128s,
PublicKeyAlgorithmTags.SLHDSA_SHAKE_128f and PublicKeyAlgorithmTags.SLHDSA_SHAKE_256s
(RFC 9980 sec. 6.2.2.1): the fixed-length SLH-DSA public key in the FIPS 205 encoding (PK.seed || PK.root).| Constructor and Description |
|---|
SLHDSAPublicBCPGKey(int algorithm,
BCPGInputStream in)
Parse the public key of the given SLH-DSA algorithm from the packet stream.
|
SLHDSAPublicBCPGKey(int algorithm,
byte[] key)
Construct the public 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 public key (RFC 9980 Table 8).
|
static int |
getSignatureLength(int algorithm)
Return the length of an SLH-DSA signature (RFC 9980 Table 8).
|
encode, getEncoded, getFormat, getKeypublic SLHDSAPublicBCPGKey(int algorithm,
BCPGInputStream in)
throws java.io.IOException
algorithm - public key algorithm ID, one of the SLH-DSA code pointsin - packet input stream positioned at the algorithm-specific key materialjava.io.IOException - if the key cannot be readpublic SLHDSAPublicBCPGKey(int algorithm,
byte[] key)
algorithm - public key algorithm ID, one of the SLH-DSA code pointskey - the SLH-DSA public key, 32 octets for the 128-bit parameter sets and 64 for SLH-DSA-SHAKE-256spublic int getAlgorithm()
public static int getLength(int algorithm)
algorithm - public key algorithm IDpublic static int getSignatureLength(int algorithm)
algorithm - public key algorithm ID