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

public Class DigestingMessageSigner

extends Object
implements Signer
Class Inheritance
All Implemented Interfaces
org.bouncycastle.crypto.Signer
Known Direct Subclasses
org.bouncycastle.pqc.crypto.DigestingStateAwareMessageSigner
Imports
org.bouncycastle.crypto.CipherParameters, .Digest, .Signer, org.bouncycastle.crypto.params.AsymmetricKeyParameter, .ParametersWithRandom

Implements the sign and verify functions for a Signature Scheme using a hash function to allow processing of large messages.

Field Summary

Modifier and TypeField and Description
private boolean
private final Digest
private final MessageSigner

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public byte[]

Returns:

the signature of the message.
generateSignature
()

Implements org.bouncycastle.crypto.Signer.generateSignature.

This function signs the message that has been updated, making use of the private key.
public void
init(boolean
true if for signing, false otherwise
forSigning
,
CipherParameters
necessary parameters.
param
)

Implements org.bouncycastle.crypto.Signer.init.

Initialise the signer for signing or verification.
public void
reset()

Implements org.bouncycastle.crypto.Signer.reset.

reset the internal state
public void
update(byte b)

Implements org.bouncycastle.crypto.Signer.update.

update the internal digest with the byte b
public void
update(byte[] in, int off, int len)

Implements org.bouncycastle.crypto.Signer.update.

update the internal digest with the byte array in
public boolean

Returns:

true if the signature has been verified, false otherwise.
verifySignature
(byte[]
the signature of the message is given as a byte array.
signature
)

Implements org.bouncycastle.crypto.Signer.verifySignature.

This function verifies the signature of the message that has been updated, with the aid of the public key.
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

forSigningback to summary
private boolean forSigning
messDigestback to summary
private final Digest messDigest
messSignerback to summary
private final MessageSigner messSigner

Constructor Detail

DigestingMessageSignerback to summary
public DigestingMessageSigner(MessageSigner messSigner, Digest messDigest)

Method Detail

generateSignatureback to summary
public byte[] generateSignature()

Implements org.bouncycastle.crypto.Signer.generateSignature.

This function signs the message that has been updated, making use of the private key.

Returns:byte[]

the signature of the message.

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

Implements org.bouncycastle.crypto.Signer.init.

Doc from org.bouncycastle.crypto.Signer.init.

Initialise the signer for signing or verification.

Parameters
forSigning:boolean

true if for signing, false otherwise

param:CipherParameters

necessary parameters.

resetback to summary
public void reset()

Implements org.bouncycastle.crypto.Signer.reset.

Doc from org.bouncycastle.crypto.Signer.reset.

reset the internal state

updateback to summary
public void update(byte b)

Implements org.bouncycastle.crypto.Signer.update.

Doc from org.bouncycastle.crypto.Signer.update.

update the internal digest with the byte b

updateback to summary
public void update(byte[] in, int off, int len)

Implements org.bouncycastle.crypto.Signer.update.

Doc from org.bouncycastle.crypto.Signer.update.

update the internal digest with the byte array in

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

Implements org.bouncycastle.crypto.Signer.verifySignature.

This function verifies the signature of the message that has been updated, with the aid of the public key.

Parameters
signature:byte[]

the signature of the message is given as a byte array.

Returns:boolean

true if the signature has been verified, false otherwise.