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

public Class HashSLHDSASigner

extends Object
implements Signer
Class Inheritance
All Implemented Interfaces
org.bouncycastle.crypto.Signer
Imports
java.io.IOException, java.security.SecureRandom, org.bouncycastle.asn1.ASN1Encoding, .ASN1ObjectIdentifier, org.bouncycastle.crypto.CipherParameters, .CryptoException, .DataLengthException, .Digest, .Signer, org.bouncycastle.crypto.digests.SHA256Digest, .SHA512Digest, .SHAKEDigest, org.bouncycastle.crypto.params.ParametersWithContext, .ParametersWithRandom, org.bouncycastle.pqc.crypto.DigestUtils, org.bouncycastle.util.Arrays

SLH-DA signer.

Field Summary

Modifier and TypeField and Description
private Digest
private byte[]
private SLHDSAPrivateKeyParameters
private SLHDSAPublicKeyParameters
private SecureRandom

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
private static Digest
public byte[]
generateSignature()

Implements org.bouncycastle.crypto.Signer.generateSignature.

generate a signature for the message we've been loaded with using the key we were initialised with.

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.

private void
protected byte[]
internalGenerateSignature(byte[] message, byte[] optRand)

private static byte[]
internalGenerateSignature(SLHDSAPrivateKeyParameters privKey, byte[] msgPrefix, byte[] msg, byte[] optRand)

protected boolean
internalVerifySignature(byte[] message, byte[] signature)

private static boolean
internalVerifySignature(SLHDSAPublicKeyParameters pubKey, byte[] msgPrefix, byte[] msg, byte[] signature)

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
verifySignature(byte[] signature)

Implements org.bouncycastle.crypto.Signer.verifySignature.

return true if the internal state represents the signature described in the passed in array.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

digestback to summary
private Digest digest
msgPrefixback to summary
private byte[] msgPrefix
privKeyback to summary
private SLHDSAPrivateKeyParameters privKey
pubKeyback to summary
private SLHDSAPublicKeyParameters pubKey
randomback to summary
private SecureRandom random

Constructor Detail

HashSLHDSASignerback to summary
public HashSLHDSASigner()

Method Detail

createDigestback to summary
private static Digest createDigest(SLHDSAParameters parameters)
generateSignatureback to summary
public byte[] generateSignature() throws CryptoException, DataLengthException

Implements org.bouncycastle.crypto.Signer.generateSignature.

Doc from org.bouncycastle.crypto.Signer.generateSignature.

generate a signature for the message we've been loaded with using the key we were initialised with.

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.

initDigestback to summary
private void initDigest(SLHDSAParameters parameters, ParametersWithContext withContext)
internalGenerateSignatureback to summary
protected byte[] internalGenerateSignature(byte[] message, byte[] optRand)
internalGenerateSignatureback to summary
private static byte[] internalGenerateSignature(SLHDSAPrivateKeyParameters privKey, byte[] msgPrefix, byte[] msg, byte[] optRand)
internalVerifySignatureback to summary
protected boolean internalVerifySignature(byte[] message, byte[] signature)
internalVerifySignatureback to summary
private static boolean internalVerifySignature(SLHDSAPublicKeyParameters pubKey, byte[] msgPrefix, byte[] msg, byte[] signature)
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.

Doc from org.bouncycastle.crypto.Signer.verifySignature.

return true if the internal state represents the signature described in the passed in array.