Security Scol plugin
Classes | Public Member Functions | List of all members
PK_SignatureScheme Class Referenceabstract

Interface for public-key signers and verifiers. More...

#include <cryptlib.h>

Inheritance diagram for PK_SignatureScheme:
PK_Signer PK_Verifier DL_SignatureSchemeBase< PK_Signer, DL_PrivateKey< T > > DL_SignatureSchemeBase< PK_Signer, DL_PrivateKey< SCHEME_OPTIONS::Element > > TF_SignatureSchemeBase< PK_Signer, TF_Base< RandomizedTrapdoorFunctionInverse, PK_SignatureMessageEncodingMethod > > ed25519Signer DL_SignatureSchemeBase< PK_Verifier, DL_PublicKey< T > > DL_SignatureSchemeBase< PK_Verifier, DL_PublicKey< SCHEME_OPTIONS::Element > > TF_SignatureSchemeBase< PK_Verifier, TF_Base< TrapdoorFunction, PK_SignatureMessageEncodingMethod > > ed25519Verifier

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.
 

Detailed Description

Interface for public-key signers and verifiers.

This class provides an interface common to signers and verifiers for querying scheme properties

See also
DL_SignatureSchemeBase, TF_SignatureSchemeBase, DL_SignerBase, TF_SignerBase

Definition at line 2784 of file cryptlib.h.

Constructor & Destructor Documentation

◆ ~PK_SignatureScheme()

virtual PK_SignatureScheme::~PK_SignatureScheme ( )
inlinevirtual

Definition at line 2805 of file cryptlib.h.

Member Function Documentation

◆ AllowNonrecoverablePart()

virtual bool PK_SignatureScheme::AllowNonrecoverablePart ( ) const
pure virtual

◆ IsProbabilistic()

virtual bool PK_SignatureScheme::IsProbabilistic ( ) const
pure virtual

◆ MaxRecoverableLength()

virtual size_t PK_SignatureScheme::MaxRecoverableLength ( ) const
pure virtual

Provides the length of longest message that can be recovered.

Returns
the length of longest message that can be recovered, in bytes

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.

◆ MaxRecoverableLengthFromSignatureLength()

virtual size_t PK_SignatureScheme::MaxRecoverableLengthFromSignatureLength ( size_t  signatureLength) const
pure virtual

Provides the length of longest message that can be recovered from a signature of given length.

Parameters
signatureLengththe length of the signature, in bytes
Returns
the length of longest message that can be recovered from a signature of given length, 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.

◆ MaxSignatureLength()

virtual size_t PK_SignatureScheme::MaxSignatureLength ( size_t  recoverablePartLength = 0) const
inlinevirtual

Provides the maximum signature length produced given the length of the recoverable message part.

Parameters
recoverablePartLengththe length of the recoverable message part, in bytes
Returns
the maximum signature length produced for a given length of recoverable message part, in bytes

MaxSignatureLength() returns the maximum signature length produced given the length of the recoverable message part.

Definition at line 2817 of file cryptlib.h.

◆ RecoverablePartFirst()

virtual bool PK_SignatureScheme::RecoverablePartFirst ( ) const
pure virtual

Determines whether the recoverable part must be input before the non-recoverable part.

Returns
true if the recoverable part must be input before the non-recoverable part during signing

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.

◆ SignatureLength()

virtual size_t PK_SignatureScheme::SignatureLength ( ) const
pure virtual

Provides the signature length if it only depends on the key.

Returns
the signature length if it only depends on the key, in bytes

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.

◆ SignatureUpfront()

virtual bool PK_SignatureScheme::SignatureUpfront ( ) const
inlinevirtual

Determines whether the signature must be input before the message.

Returns
true if the signature must be input before the message during verifcation

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 2848 of file cryptlib.h.


The documentation for this class was generated from the following file: