Package org.bouncycastle.pqc.crypto.xmss
Class XMSSMT
- java.lang.Object
-
- org.bouncycastle.pqc.crypto.xmss.XMSSMT
-
public final class XMSSMT extends java.lang.Object
XMSS^MT.
-
-
Constructor Summary
Constructors Constructor Description XMSSMT(XMSSMTParameters params, java.security.SecureRandom prng)
XMSSMT constructor...
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description byte[]
exportPrivateKey()
Export XMSSMT private key.byte[]
exportPublicKey()
Export XMSSMT public key.void
generateKeys()
Generate a new XMSSMT private key / public key pair.XMSSMTParameters
getParams()
Getter XMSSMT params.byte[]
getPublicSeed()
Getter public seed.protected XMSSParameters
getXMSS()
void
importState(byte[] privateKey, byte[] publicKey)
Import XMSSMT private key / public key pair.byte[]
sign(byte[] message)
Sign message.boolean
verifySignature(byte[] message, byte[] signature, byte[] publicKey)
Verify an XMSSMT signature.
-
-
-
Constructor Detail
-
XMSSMT
public XMSSMT(XMSSMTParameters params, java.security.SecureRandom prng)
XMSSMT constructor...- Parameters:
params
- XMSSMTParameters.
-
-
Method Detail
-
generateKeys
public void generateKeys()
Generate a new XMSSMT private key / public key pair.
-
importState
public void importState(byte[] privateKey, byte[] publicKey)
Import XMSSMT private key / public key pair.- Parameters:
privateKey
- XMSSMT private key.publicKey
- XMSSMT public key.
-
sign
public byte[] sign(byte[] message)
Sign message.- Parameters:
message
- Message to sign.- Returns:
- XMSSMT signature on digest of message.
-
verifySignature
public boolean verifySignature(byte[] message, byte[] signature, byte[] publicKey) throws java.text.ParseException
Verify an XMSSMT signature.- Parameters:
message
- Message.signature
- XMSSMT signature.publicKey
- XMSSMT public key.- Returns:
- true if signature is valid false else.
- Throws:
java.text.ParseException
-
exportPrivateKey
public byte[] exportPrivateKey()
Export XMSSMT private key.- Returns:
- XMSSMT private key.
-
exportPublicKey
public byte[] exportPublicKey()
Export XMSSMT public key.- Returns:
- XMSSMT public key.
-
getParams
public XMSSMTParameters getParams()
Getter XMSSMT params.- Returns:
- XMSSMT params.
-
getPublicSeed
public byte[] getPublicSeed()
Getter public seed.- Returns:
- Public seed.
-
getXMSS
protected XMSSParameters getXMSS()
-
-