Top Inners Fields Constructors Methods
org.bouncycastle.crypto.general

pack-priv Class Ed25519Signer

extends Object
implements Signer
Class Inheritance
All Implemented Interfaces
org.bouncycastle.crypto.internal.Signer
Imports
java.io.ByteArrayOutputStream, org.bouncycastle.crypto.fips.FipsSHS, org.bouncycastle.crypto.internal.CipherParameters, .Digest, .Signer, org.bouncycastle.math.ec.rfc8032.Ed25519, org.bouncycastle.util.Arrays

Nested and Inner Type Summary

Modifier and TypeClass and Description
private static class

Field Summary

Modifier and TypeField and Description
private final Ed25519Signer.Buffer
private boolean
private Ed25519PrivateKeyParameters
private Ed25519PublicKeyParameters

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public byte[]
generateSignature()

Implements org.bouncycastle.crypto.internal.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.
parameters
)

Implements org.bouncycastle.crypto.internal.Signer.init.

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

Implements org.bouncycastle.crypto.internal.Signer.reset.

reset the internal state
public void
update(byte b)

Implements org.bouncycastle.crypto.internal.Signer.update.

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

Implements org.bouncycastle.crypto.internal.Signer.update.

update the internal digest with the byte array in
public boolean
verifySignature(byte[] signature)

Implements org.bouncycastle.crypto.internal.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

bufferback to summary
private final Ed25519Signer.Buffer buffer
forSigningback to summary
private boolean forSigning
privateKeyback to summary
private Ed25519PrivateKeyParameters privateKey
publicKeyback to summary
private Ed25519PublicKeyParameters publicKey

Constructor Detail

Ed25519Signerback to summary
public Ed25519Signer()

Method Detail

generateSignatureback to summary
public byte[] generateSignature()

Implements org.bouncycastle.crypto.internal.Signer.generateSignature.

Doc from org.bouncycastle.crypto.internal.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 parameters)

Implements org.bouncycastle.crypto.internal.Signer.init.

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

Initialise the signer for signing or verification.

Parameters
forSigning:boolean

true if for signing, false otherwise

parameters:CipherParameters

necessary parameters.

resetback to summary
public void reset()

Implements org.bouncycastle.crypto.internal.Signer.reset.

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

reset the internal state

updateback to summary
public void update(byte b)

Implements org.bouncycastle.crypto.internal.Signer.update.

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

update the internal digest with the byte b

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

Implements org.bouncycastle.crypto.internal.Signer.update.

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

update the internal digest with the byte array in

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

Implements org.bouncycastle.crypto.internal.Signer.verifySignature.

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

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

org.bouncycastle.crypto.general back to summary

private Class Ed25519Signer.Buffer

extends ByteArrayOutputStream
Class Inheritance

Field Summary

Modifier and TypeField and Description
private final Ed25519
Inherited from java.io.ByteArrayOutputStream:
bufcount

Constructor Summary

AccessConstructor and Description
private

Method Summary

Modifier and TypeMethod and Description
pack-priv synchronized byte[]
public synchronized void
reset()

Overrides java.io.ByteArrayOutputStream.reset.

Resets the count field of this ByteArrayOutputStream to zero, so that all currently accumulated output in the output stream is discarded.
pack-priv synchronized boolean
verifySignature(Ed25519PublicKeyParameters publicKey, byte[] signature)

Inherited from java.io.ByteArrayOutputStream:
closesizetoByteArraytoStringtoStringtoStringtoStringwritewritewriteByteswriteTo

Field Detail

ed25519back to summary
private final Ed25519 ed25519

Constructor Detail

Bufferback to summary
private Buffer()

Method Detail

generateSignatureback to summary
pack-priv synchronized byte[] generateSignature(Ed25519PrivateKeyParameters privateKey, Ed25519PublicKeyParameters publicKey)
resetback to summary
public synchronized void reset()

Overrides java.io.ByteArrayOutputStream.reset.

Doc from java.io.ByteArrayOutputStream.reset.

Resets the count field of this ByteArrayOutputStream to zero, so that all currently accumulated output in the output stream is discarded. The output stream can be used again, reusing the already allocated buffer space.

verifySignatureback to summary
pack-priv synchronized boolean verifySignature(Ed25519PublicKeyParameters publicKey, byte[] signature)