Top Description Fields Constructors Methods
org.bouncycastle.pqc.legacy.crypto.qtesla

public Class QTESLASigner

extends Object
implements MessageSigner
Class Inheritance
All Implemented Interfaces
org.bouncycastle.pqc.crypto.MessageSigner
Imports
java.security.SecureRandom, org.bouncycastle.crypto.CipherParameters, .CryptoServicesRegistrar, org.bouncycastle.crypto.params.ParametersWithRandom, org.bouncycastle.pqc.crypto.MessageSigner

Signer for the qTESLA algorithm (https://qtesla.org/)

Field Summary

Modifier and TypeField and Description
private QTESLAPrivateKeyParameters
privateKey

The Private Key of the Identity Whose Signature Will be Generated

private QTESLAPublicKeyParameters
publicKey

The Public Key of the Identity Whose Signature Will be Generated

private SecureRandom
secureRandom

The Source of Randomness for private key operations

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public byte[]

Returns:

the signature generated.
generateSignature
(byte[]
the message to be signed.
message
)

Implements org.bouncycastle.pqc.crypto.MessageSigner.generateSignature.

Generate a signature directly for the passed in message.
public void
init(boolean
true if we are generating a signature, false otherwise.
forSigning
,
CipherParameters
ParametersWithRandom containing a private key for signature generation, public key otherwise.
param
)

Implements org.bouncycastle.pqc.crypto.MessageSigner.init.

Initialise the signer.
public boolean

Returns:

true if the signature passes, false otherwise.
verifySignature
(byte[]
the message that was supposed to have been signed.
message
,
byte[]
the signature of the message
signature
)

Implements org.bouncycastle.pqc.crypto.MessageSigner.verifySignature.

Verify the signature against the passed in message.
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

privateKeyback to summary
private QTESLAPrivateKeyParameters privateKey

The Private Key of the Identity Whose Signature Will be Generated

publicKeyback to summary
private QTESLAPublicKeyParameters publicKey

The Public Key of the Identity Whose Signature Will be Generated

secureRandomback to summary
private SecureRandom secureRandom

The Source of Randomness for private key operations

Constructor Detail

QTESLASignerback to summary
public QTESLASigner()

Method Detail

generateSignatureback to summary
public byte[] generateSignature(byte[] message)

Implements org.bouncycastle.pqc.crypto.MessageSigner.generateSignature.

Generate a signature directly for the passed in message.

Parameters
message:byte[]

the message to be signed.

Returns:byte[]

the signature generated.

initback to summary
public void init(boolean forSigning, CipherParameters param)

Implements org.bouncycastle.pqc.crypto.MessageSigner.init.

Initialise the signer.

Parameters
forSigning:boolean

true if we are generating a signature, false otherwise.

param:CipherParameters

ParametersWithRandom containing a private key for signature generation, public key otherwise.

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

Implements org.bouncycastle.pqc.crypto.MessageSigner.verifySignature.

Verify the signature against the passed in message.

Parameters
message:byte[]

the message that was supposed to have been signed.

signature:byte[]

the signature of the message

Returns:boolean

true if the signature passes, false otherwise.