public class XMSS
extends java.lang.Object
Constructor and Description |
---|
XMSS(XMSSParameters params,
java.security.SecureRandom prng)
XMSS constructor...
|
Modifier and Type | Method and Description |
---|---|
XMSSPrivateKeyParameters |
exportPrivateKey()
Export XMSS private key.
|
XMSSPublicKeyParameters |
exportPublicKey()
Export XMSS public key.
|
void |
generateKeys()
Generate a new XMSS private key / public key pair.
|
int |
getIndex()
Getter XMSS index.
|
XMSSParameters |
getParams()
Getter XMSS params.
|
XMSSPrivateKeyParameters |
getPrivateKey() |
byte[] |
getPublicSeed()
Getter XMSS public seed.
|
byte[] |
getRoot()
Getter XMSS root.
|
protected org.bouncycastle.pqc.crypto.xmss.WOTSPlus |
getWOTSPlus()
Getter WOTS+.
|
void |
importState(byte[] privateKey,
byte[] publicKey)
Import XMSS private key / public key pair.
|
void |
importState(XMSSPrivateKeyParameters privateKey,
XMSSPublicKeyParameters publicKey) |
protected void |
setIndex(int index) |
protected void |
setPublicSeed(byte[] publicSeed) |
protected void |
setRoot(byte[] root) |
byte[] |
sign(byte[] message)
Sign message.
|
boolean |
verifySignature(byte[] message,
byte[] signature,
byte[] publicKey)
Verify an XMSS signature.
|
protected org.bouncycastle.pqc.crypto.xmss.WOTSPlusSignature |
wotsSign(byte[] messageDigest,
org.bouncycastle.pqc.crypto.xmss.OTSHashAddress otsHashAddress)
Generate a WOTS+ signature on a message without the corresponding
authentication path
|
public XMSS(XMSSParameters params, java.security.SecureRandom prng)
params
- XMSSParameters.public void generateKeys()
public void importState(XMSSPrivateKeyParameters privateKey, XMSSPublicKeyParameters publicKey)
public void importState(byte[] privateKey, byte[] publicKey)
privateKey
- XMSS private key.publicKey
- XMSS public key.public byte[] sign(byte[] message)
message
- Message to sign.public boolean verifySignature(byte[] message, byte[] signature, byte[] publicKey) throws java.text.ParseException
message
- Message.signature
- XMSS signature.publicKey
- XMSS public key.java.text.ParseException
public XMSSPrivateKeyParameters exportPrivateKey()
public XMSSPublicKeyParameters exportPublicKey()
protected org.bouncycastle.pqc.crypto.xmss.WOTSPlusSignature wotsSign(byte[] messageDigest, org.bouncycastle.pqc.crypto.xmss.OTSHashAddress otsHashAddress)
messageDigest
- Message digest of length n.otsHashAddress
- OTS hash address.public XMSSParameters getParams()
protected org.bouncycastle.pqc.crypto.xmss.WOTSPlus getWOTSPlus()
public byte[] getRoot()
protected void setRoot(byte[] root)
public int getIndex()
protected void setIndex(int index)
public byte[] getPublicSeed()
protected void setPublicSeed(byte[] publicSeed)
public XMSSPrivateKeyParameters getPrivateKey()