Top Description Fields Constructors Methods
org.bouncycastle.pqc.crypto.xmss

public Class XMSS

extends Object
Class Inheritance
Imports
java.security.SecureRandom, java.text.ParseException, org.bouncycastle.crypto.AsymmetricCipherKeyPair, org.bouncycastle.util.Arrays

XMSS.

Field Summary

Modifier and TypeField and Description
private final XMSSParameters
params

XMSS parameters.

private XMSSPrivateKeyParameters
privateKey

XMSS private key.

private SecureRandom
prng

PRNG.

private XMSSPublicKeyParameters
publicKey

XMSS public key.

private WOTSPlus
wotsPlus

WOTS+ instance.

Constructor Summary

AccessConstructor and Description
public
XMSS(XMSSParameters
XMSSParameters.
params
,
SecureRandom prng)

XMSS constructor...

Method Summary

Modifier and TypeMethod and Description
public XMSSPrivateKeyParameters

Returns:

XMSS private key.
exportPrivateKey
()

Deprecated as a consequence of XMSSPrivateKeyParameters being deprecated.
Export XMSS private key.
public XMSSPublicKeyParameters

Returns:

XMSS public key.
exportPublicKey
()

Deprecated as a consequence of XMSSPublicKeyParameters being deprecated.
Export XMSS public key.
public void
generateKeys()

Generate a new XMSS private key / public key pair.

public int

Returns:

Index.
getIndex
()

Getter XMSS index.

public XMSSParameters

Returns:

XMSS params.
getParams
()

Getter XMSS params.

public XMSSPrivateKeyParameters
getPrivateKey()

Deprecated as a consequence of XMSSPrivateKeyParameters being deprecated.
public byte[]

Returns:

Public seed.
getPublicSeed
()

Getter XMSS public seed.

public byte[]

Returns:

Root of binary tree.
getRoot
()

Getter XMSS root.

protected WOTSPlus

Returns:

WOTS+ instance.
getWOTSPlus
()

Getter WOTS+.

public void
importState(XMSSPrivateKeyParameters privateKey, XMSSPublicKeyParameters publicKey)

Deprecated as a consequence of XMSSPrivateKeyParameters and XMSSPublicKeyParameters being deprecated.
public void
importState(byte[]
XMSS private key.
privateKey
,
byte[]
XMSS public key.
publicKey
)

Import XMSS private key / public key pair.

protected void
setIndex(int index)

protected void
setPublicSeed(byte[] publicSeed)

protected void
setRoot(byte[] root)

public byte[]

Returns:

XMSS signature on digest of message.
sign
(byte[]
Message to sign.
message
)

Sign message.

public boolean

Returns:

true if signature is valid false else.
verifySignature
(byte[]
Message.
message
,
byte[]
XMSS signature.
signature
,
byte[]
XMSS public key.
publicKey
)

Verify an XMSS signature.

protected WOTSPlusSignature

Returns:

XMSS signature.
wotsSign
(byte[]
Message digest of length n.
messageDigest
,
OTSHashAddress
OTS hash address.
otsHashAddress
)

Generate a WOTS+ signature on a message without the corresponding authentication path

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

paramsback to summary
private final XMSSParameters params

XMSS parameters.

privateKeyback to summary
private XMSSPrivateKeyParameters privateKey

Deprecated

as a consequence of XMSSPrivateKeyParameters being deprecated. See corresponding docs for further information.

XMSS private key.

prngback to summary
private SecureRandom prng

PRNG.

publicKeyback to summary
private XMSSPublicKeyParameters publicKey

Deprecated

as a consequence of XMSSPublicKeyParameters being deprecated. See corresponding docs for further information.

XMSS public key.

wotsPlusback to summary
private WOTSPlus wotsPlus

WOTS+ instance.

Constructor Detail

XMSSback to summary
public XMSS(XMSSParameters params, SecureRandom prng)

XMSS constructor...

Parameters
params:XMSSParameters

XMSSParameters.

Method Detail

exportPrivateKeyback to summary
public XMSSPrivateKeyParameters exportPrivateKey()

Deprecated

as a consequence of XMSSPrivateKeyParameters being deprecated. See corresponding docs for further information.

Export XMSS private key.

Returns:XMSSPrivateKeyParameters

XMSS private key.

exportPublicKeyback to summary
public XMSSPublicKeyParameters exportPublicKey()

Deprecated

as a consequence of XMSSPublicKeyParameters being deprecated. See corresponding docs for further information.

Export XMSS public key.

Returns:XMSSPublicKeyParameters

XMSS public key.

generateKeysback to summary
public void generateKeys()

Generate a new XMSS private key / public key pair.

getIndexback to summary
public int getIndex()

Getter XMSS index.

Returns:int

Index.

getParamsback to summary
public XMSSParameters getParams()

Getter XMSS params.

Returns:XMSSParameters

XMSS params.

getPrivateKeyback to summary
public XMSSPrivateKeyParameters getPrivateKey()

Deprecated

as a consequence of XMSSPrivateKeyParameters being deprecated. See corresponding docs for further information.

getPublicSeedback to summary
public byte[] getPublicSeed()

Getter XMSS public seed.

Returns:byte[]

Public seed.

getRootback to summary
public byte[] getRoot()

Getter XMSS root.

Returns:byte[]

Root of binary tree.

getWOTSPlusback to summary
protected WOTSPlus getWOTSPlus()

Getter WOTS+.

Returns:WOTSPlus

WOTS+ instance.

importStateback to summary
public void importState(XMSSPrivateKeyParameters privateKey, XMSSPublicKeyParameters publicKey)

Deprecated

as a consequence of XMSSPrivateKeyParameters and XMSSPublicKeyParameters being deprecated. See corresponding docs for further information.

importStateback to summary
public void importState(byte[] privateKey, byte[] publicKey)

Import XMSS private key / public key pair.

Parameters
privateKey:byte[]

XMSS private key.

publicKey:byte[]

XMSS public key.

setIndexback to summary
protected void setIndex(int index)
setPublicSeedback to summary
protected void setPublicSeed(byte[] publicSeed)
setRootback to summary
protected void setRoot(byte[] root)
signback to summary
public byte[] sign(byte[] message)

Sign message.

Parameters
message:byte[]

Message to sign.

Returns:byte[]

XMSS signature on digest of message.

verifySignatureback to summary
public boolean verifySignature(byte[] message, byte[] signature, byte[] publicKey) throws ParseException

Verify an XMSS signature.

Parameters
message:byte[]

Message.

signature:byte[]

XMSS signature.

publicKey:byte[]

XMSS public key.

Returns:boolean

true if signature is valid false else.

wotsSignback to summary
protected WOTSPlusSignature wotsSign(byte[] messageDigest, OTSHashAddress otsHashAddress)

Generate a WOTS+ signature on a message without the corresponding authentication path

Parameters
messageDigest:byte[]

Message digest of length n.

otsHashAddress:OTSHashAddress

OTS hash address.

Returns:WOTSPlusSignature

XMSS signature.