Top Description Methods
org.bouncycastle.pqc.jcajce.interfaces

public Interface StateAwareSignature

Known Direct Implementers
org.bouncycastle.pqc.jcajce.provider.xmss.XMSSMTSignatureSpi, org.bouncycastle.pqc.jcajce.provider.xmss.XMSSSignatureSpi
Imports
java.nio.ByteBuffer, java.security.InvalidKeyException, .PrivateKey, .PublicKey, .SecureRandom, .SignatureException, java.security.cert.Certificate

Deprecated

it's better to avoid this and use extractKeyShard methods where possible.

This interface is implemented by Signature classes returned by the PQC provider where the signature algorithm is one where the private key is updated for each signature generated. Examples of these are algorithms such as GMSS, XMSS, and XMSS^MT.

Method Summary

Modifier and TypeMethod and Description
public String
public PrivateKey

Returns:

an updated private key object, which can be used for later signature generation.
getUpdatedPrivateKey
()

Return the current version of the private key with the updated state.

public void
initSign(PrivateKey privateKey)

public void
initSign(PrivateKey privateKey, SecureRandom random)

public void
initVerify(PublicKey publicKey)

public void
initVerify(Certificate certificate)

public boolean

Returns:

true if we are capable of making signatures.
isSigningCapable
()

Return true if this Signature object can be used for signing.

public byte[]
sign()

public int
sign(byte[] outbuf, int offset, int len)

public void
update(byte b)

public void
update(byte[] data)

public void
update(byte[] data, int off, int len)

public void
public boolean
verify(byte[] signature)

public boolean
verify(byte[] signature, int offset, int length)

Method Detail

getAlgorithmback to summary
public String getAlgorithm()
getUpdatedPrivateKeyback to summary
public PrivateKey getUpdatedPrivateKey()

Return the current version of the private key with the updated state.

Note

calling this method will effectively disable the Signature object from being used for further signature generation without another call to initSign().

Returns:PrivateKey

an updated private key object, which can be used for later signature generation.

initSignback to summary
public void initSign(PrivateKey privateKey) throws InvalidKeyException
initSignback to summary
public void initSign(PrivateKey privateKey, SecureRandom random) throws InvalidKeyException
initVerifyback to summary
public void initVerify(PublicKey publicKey) throws InvalidKeyException
initVerifyback to summary
public void initVerify(Certificate certificate) throws InvalidKeyException
isSigningCapableback to summary
public boolean isSigningCapable()

Return true if this Signature object can be used for signing. False otherwise.

Returns:boolean

true if we are capable of making signatures.

signback to summary
public byte[] sign() throws SignatureException
signback to summary
public int sign(byte[] outbuf, int offset, int len) throws SignatureException
updateback to summary
public void update(byte b) throws SignatureException
updateback to summary
public void update(byte[] data) throws SignatureException
updateback to summary
public void update(byte[] data, int off, int len) throws SignatureException
updateback to summary
public void update(ByteBuffer data) throws SignatureException
verifyback to summary
public boolean verify(byte[] signature) throws SignatureException
verifyback to summary
public boolean verify(byte[] signature, int offset, int length) throws SignatureException