Crypto++
8.4
Free C++ class library of cryptographic schemes
|
Ed25519 signature verification algorithm. More...
Public Types | |
typedef Integer | Element |
Public Member Functions | |
ed25519Verifier () | |
Create a ed25519Verifier object. | |
ed25519Verifier (const byte y[PUBLIC_KEYLENGTH]) | |
Create a ed25519Verifier object. More... | |
ed25519Verifier (const Integer &y) | |
Create a ed25519Verifier object. More... | |
ed25519Verifier (BufferedTransformation ¶ms) | |
Create a ed25519Verifier object. More... | |
ed25519Verifier (const ed25519Signer &signer) | |
Create a ed25519Verifier object. More... | |
PublicKey & | AccessKey () |
Retrieves a reference to a Public Key. More... | |
PublicKey & | AccessPublicKey () |
Retrieves a reference to a Public Key. More... | |
const PublicKey & | GetKey () const |
Retrieves a reference to a Public Key. More... | |
const PublicKey & | GetPublicKey () const |
Retrieves a reference to a Public Key. More... | |
size_t | SignatureLength () const |
Provides the signature length if it only depends on the key. More... | |
size_t | MaxRecoverableLength () const |
Provides the length of longest message that can be recovered. More... | |
size_t | MaxRecoverableLengthFromSignatureLength (size_t signatureLength) const |
Provides the length of longest message that can be recovered from a signature of given length. More... | |
bool | IsProbabilistic () const |
Determines whether a signature scheme requires a random number generator. More... | |
bool | AllowNonrecoverablePart () const |
Determines whether the non-recoverable message part can be signed. More... | |
bool | RecoverablePartFirst () const |
Determines whether the recoverable part must be input before the non-recoverable part. More... | |
ed25519_MessageAccumulator * | NewVerificationAccumulator () const |
Create a new HashTransformation to accumulate the message to be verified. More... | |
void | InputSignature (PK_MessageAccumulator &messageAccumulator, const byte *signature, size_t signatureLength) const |
Input signature into a message accumulator. More... | |
bool | VerifyAndRestart (PK_MessageAccumulator &messageAccumulator) const |
Check whether messageAccumulator contains a valid signature and message, and restart messageAccumulator. More... | |
bool | VerifyStream (std::istream &stream, const byte *signature, size_t signatureLen) const |
Check whether input signature is a valid signature for input message. More... | |
DecodingResult | RecoverAndRestart (byte *recoveredMessage, PK_MessageAccumulator &messageAccumulator) const |
Recover a message from its signature. More... | |
![]() | |
virtual bool | Verify (PK_MessageAccumulator *messageAccumulator) const |
Check whether messageAccumulator contains a valid signature and message. More... | |
virtual bool | VerifyMessage (const byte *message, size_t messageLen, const byte *signature, size_t signatureLen) const |
Check whether input signature is a valid signature for input message. More... | |
virtual DecodingResult | Recover (byte *recoveredMessage, PK_MessageAccumulator *messageAccumulator) const |
Recover a message from its signature. More... | |
virtual DecodingResult | RecoverMessage (byte *recoveredMessage, const byte *nonrecoverableMessage, size_t nonrecoverableMessageLength, const byte *signature, size_t signatureLength) const |
Recover a message from its signature. More... | |
![]() | |
virtual size_t | MaxSignatureLength (size_t recoverablePartLength=0) const |
Provides the maximum signature length produced given the length of the recoverable message part. More... | |
virtual bool | SignatureUpfront () const |
Determines whether the signature must be input before the message. More... | |
![]() | |
CryptoMaterial & | AccessMaterial () |
Retrieves a reference to a Public Key. More... | |
const CryptoMaterial & | GetMaterial () const |
Retrieves a reference to a Public Key. More... | |
![]() | |
Algorithm (bool checkSelfTestStatus=true) | |
Interface for all crypto algorithms. More... | |
virtual std::string | AlgorithmName () const |
Provides the name of this algorithm. More... | |
virtual std::string | AlgorithmProvider () const |
Retrieve the provider of this algorithm. More... | |
![]() | |
virtual Clonable * | Clone () const |
Copies this object. More... | |
Static Public Attributes | |
static const int | PUBLIC_KEYLENGTH = 32 |
static const int | SIGNATURE_LENGTH = 64 |
Ed25519 signature verification algorithm.
Definition at line 701 of file xed25519.h.
ed25519Verifier::ed25519Verifier | ( | const byte | y[PUBLIC_KEYLENGTH] | ) |
Create a ed25519Verifier object.
y | public key This constructor creates a ed25519Verifier object using existing parameters. |
Definition at line 832 of file xed25519.cpp.
ed25519Verifier::ed25519Verifier | ( | const Integer & | y | ) |
Create a ed25519Verifier object.
y | public key This constructor creates a ed25519Verifier object using existing parameters. |
Definition at line 838 of file xed25519.cpp.
ed25519Verifier::ed25519Verifier | ( | BufferedTransformation & | params | ) |
Create a ed25519Verifier object.
params | public and private key This constructor creates a ed25519Verifier object using existing parameters. The params can be created with Save . |
Definition at line 849 of file xed25519.cpp.
ed25519Verifier::ed25519Verifier | ( | const ed25519Signer & | signer | ) |
Create a ed25519Verifier object.
signer | ed25519 signer object This constructor creates a ed25519Verifier object using existing parameters. The params can be created with Save . |
Definition at line 854 of file xed25519.cpp.
|
inline |
Retrieves a reference to a Public Key.
AccessKey() retrieves a non-const reference to a public key.
Definition at line 741 of file xed25519.h.
|
inlinevirtual |
Retrieves a reference to a Public Key.
Implements PublicKeyAlgorithm.
Definition at line 742 of file xed25519.h.
|
inline |
Retrieves a reference to a Public Key.
GetKey() retrieves a const reference to a public key.
Definition at line 746 of file xed25519.h.
|
inlinevirtual |
Retrieves a reference to a Public Key.
Reimplemented from PublicKeyAlgorithm.
Definition at line 747 of file xed25519.h.
|
inlinevirtual |
Provides the signature length if it only depends on the key.
Implements PK_SignatureScheme.
Definition at line 750 of file xed25519.h.
|
inlinevirtual |
Provides the length of longest message that can be recovered.
Implements PK_SignatureScheme.
Definition at line 751 of file xed25519.h.
|
inlinevirtual |
Provides the length of longest message that can be recovered from a signature of given length.
signatureLength | the length of the signature, in bytes |
Implements PK_SignatureScheme.
Definition at line 752 of file xed25519.h.
|
inlinevirtual |
Determines whether a signature scheme requires a random number generator.
Implements PK_SignatureScheme.
Definition at line 756 of file xed25519.h.
|
inlinevirtual |
Determines whether the non-recoverable message part can be signed.
Implements PK_SignatureScheme.
Definition at line 757 of file xed25519.h.
|
inlinevirtual |
Determines whether the recoverable part must be input before the non-recoverable part.
Implements PK_SignatureScheme.
Definition at line 758 of file xed25519.h.
|
inlinevirtual |
Create a new HashTransformation to accumulate the message to be verified.
Implements PK_Verifier.
Definition at line 760 of file xed25519.h.
|
inlinevirtual |
Input signature into a message accumulator.
messageAccumulator | a pointer to a PK_MessageAccumulator derived class |
signature | the signature on the message |
signatureLength | the size of the signature |
Implements PK_Verifier.
Definition at line 764 of file xed25519.h.
|
virtual |
Check whether messageAccumulator contains a valid signature and message, and restart messageAccumulator.
messageAccumulator | a reference to a PK_MessageAccumulator derived class |
Implements PK_Verifier.
Definition at line 860 of file xed25519.cpp.
bool ed25519Verifier::VerifyStream | ( | std::istream & | stream, |
const byte * | signature, | ||
size_t | signatureLen | ||
) | const |
Check whether input signature is a valid signature for input message.
stream | an std::istream derived class |
signature | a pointer to the signature over the message |
signatureLen | the size of the signature |
Definition at line 870 of file xed25519.cpp.
|
inlinevirtual |
Recover a message from its signature.
recoveredMessage | a pointer to the recoverable message part to be verified |
messageAccumulator | a pointer to a PK_MessageAccumulator derived class |
COUNTOF(recoveredMessage) == MaxRecoverableLengthFromSignatureLength(signatureLength)
Implements PK_Verifier.
Definition at line 785 of file xed25519.h.