Crypto++ 8.9
Free C++ class library of cryptographic schemes
|
Interface for public-key signers and verifiers. More...
#include <cryptlib.h>
Classes | |
class | InvalidKeyLength |
Exception throw when the private or public key has a length that can't be used. More... | |
class | KeyTooShort |
Exception throw when the private or public key is too short to sign or verify. More... | |
Public Member Functions | |
virtual size_t | SignatureLength () const =0 |
Provides the signature length if it only depends on the key. | |
virtual size_t | MaxSignatureLength (size_t recoverablePartLength=0) const |
Provides the maximum signature length produced given the length of the recoverable message part. | |
virtual size_t | MaxRecoverableLength () const =0 |
Provides the length of longest message that can be recovered. | |
virtual size_t | MaxRecoverableLengthFromSignatureLength (size_t signatureLength) const =0 |
Provides the length of longest message that can be recovered from a signature of given length. | |
virtual bool | IsProbabilistic () const =0 |
Determines whether a signature scheme requires a random number generator. | |
virtual bool | AllowNonrecoverablePart () const =0 |
Determines whether the non-recoverable message part can be signed. | |
virtual bool | SignatureUpfront () const |
Determines whether the signature must be input before the message. | |
virtual bool | RecoverablePartFirst () const =0 |
Determines whether the recoverable part must be input before the non-recoverable part. | |
Interface for public-key signers and verifiers.
This class provides an interface common to signers and verifiers for querying scheme properties
Definition at line 2789 of file cryptlib.h.
|
inlinevirtual |
Definition at line 2810 of file cryptlib.h.
|
pure virtual |
Provides the signature length if it only depends on the key.
SignatureLength() returns the signature length if it only depends on the key, otherwise 0.
Implemented in DL_SignatureSchemeBase< PK_Signer, DL_PrivateKey< SCHEME_OPTIONS::Element > >, DL_SignatureSchemeBase< PK_Signer, DL_PrivateKey< T > >, DL_SignatureSchemeBase< PK_Verifier, DL_PublicKey< SCHEME_OPTIONS::Element > >, DL_SignatureSchemeBase< PK_Verifier, DL_PublicKey< T > >, ed25519Signer, and ed25519Verifier.
|
inlinevirtual |
Provides the maximum signature length produced given the length of the recoverable message part.
recoverablePartLength | the length of the recoverable message part, in bytes |
MaxSignatureLength() returns the maximum signature length produced given the length of the recoverable message part.
Definition at line 2822 of file cryptlib.h.
|
pure virtual |
Provides the length of longest message that can be recovered.
MaxRecoverableLength() returns the length of longest message that can be recovered, or 0 if this signature scheme does not support message recovery.
Implemented in DL_SignatureSchemeBase< PK_Signer, DL_PrivateKey< SCHEME_OPTIONS::Element > >, DL_SignatureSchemeBase< PK_Signer, DL_PrivateKey< T > >, DL_SignatureSchemeBase< PK_Verifier, DL_PublicKey< SCHEME_OPTIONS::Element > >, DL_SignatureSchemeBase< PK_Verifier, DL_PublicKey< T > >, ed25519Signer, and ed25519Verifier.
|
pure virtual |
Provides the length of longest message that can be recovered from a signature of given length.
signatureLength | the length of the signature, in bytes |
MaxRecoverableLengthFromSignatureLength() returns the length of longest message that can be recovered from a signature of given length, or 0 if this signature scheme does not support message recovery.
Implemented in DL_SignatureSchemeBase< PK_Signer, DL_PrivateKey< SCHEME_OPTIONS::Element > >, DL_SignatureSchemeBase< PK_Signer, DL_PrivateKey< T > >, DL_SignatureSchemeBase< PK_Verifier, DL_PublicKey< SCHEME_OPTIONS::Element > >, DL_SignatureSchemeBase< PK_Verifier, DL_PublicKey< T > >, ed25519Signer, and ed25519Verifier.
|
pure virtual |
Determines whether a signature scheme requires a random number generator.
if IsProbabilistic() returns false, then NullRNG() can be passed to functions that take RandomNumberGenerator().
Implemented in DL_SignatureSchemeBase< PK_Signer, DL_PrivateKey< SCHEME_OPTIONS::Element > >, DL_SignatureSchemeBase< PK_Signer, DL_PrivateKey< T > >, DL_SignatureSchemeBase< PK_Verifier, DL_PublicKey< SCHEME_OPTIONS::Element > >, DL_SignatureSchemeBase< PK_Verifier, DL_PublicKey< T > >, ed25519Signer, and ed25519Verifier.
|
pure virtual |
Determines whether the non-recoverable message part can be signed.
Implemented in DL_SignatureSchemeBase< PK_Signer, DL_PrivateKey< SCHEME_OPTIONS::Element > >, DL_SignatureSchemeBase< PK_Signer, DL_PrivateKey< T > >, DL_SignatureSchemeBase< PK_Verifier, DL_PublicKey< SCHEME_OPTIONS::Element > >, DL_SignatureSchemeBase< PK_Verifier, DL_PublicKey< T > >, ed25519Signer, and ed25519Verifier.
|
inlinevirtual |
Determines whether the signature must be input before the message.
if SignatureUpfront() returns true, then you must input the signature before the message during verification. Otherwise you can input the signature at anytime.
Definition at line 2853 of file cryptlib.h.
|
pure virtual |
Determines whether the recoverable part must be input before the non-recoverable part.
RecoverablePartFirst() determines whether you must input the recoverable part before the non-recoverable part during signing
Implemented in DL_SignatureSchemeBase< PK_Signer, DL_PrivateKey< SCHEME_OPTIONS::Element > >, DL_SignatureSchemeBase< PK_Signer, DL_PrivateKey< T > >, DL_SignatureSchemeBase< PK_Verifier, DL_PublicKey< SCHEME_OPTIONS::Element > >, DL_SignatureSchemeBase< PK_Verifier, DL_PublicKey< T > >, ed25519Signer, and ed25519Verifier.