Main Page | Namespace List | Class Hierarchy | Alphabetical List | Compound List | File List | Namespace Members | Compound Members | File Members

VerifierWithRecoveryTemplate< TF, H > Class Template Reference

#include <pubkey.h>

Inheritance diagram for VerifierWithRecoveryTemplate< TF, H >:

SignatureSystemWithRecoveryBaseTemplate< H > PK_VerifierWithRecovery PK_SignatureSchemeWithRecovery PK_SignatureSchemeWithRecovery PK_Verifier PK_SignatureScheme PK_SignatureScheme PK_SignatureScheme PublicKeyAlgorithm AsymmetricAlgorithm Algorithm Clonable List of all members.

Detailed Description

template<class TF, class H>
class VerifierWithRecoveryTemplate< TF, H >

Definition at line 557 of file pubkey.h.

Public Types

typedef TF KeyClass

Public Member Functions

const KeyClass & GetKey () const
KeyClass & AccessKey ()
PublicKeyAccessPublicKey ()
bool VerifyAndRestart (HashTransformation &messageAccumulator, const byte *sig) const
 check whether sig is a valid signature for messageAccumulator, and restart messageAccumulator

bool SignatureUpfrontForRecovery () const
HashTransformationNewRecoveryAccumulator (const byte *signature) const
 create a new HashTransformation to accumulate leftover message

DecodingResult Recover (byte *recoveredMessage, HashTransformation *recoveryAccumulator, const byte *signature) const
 recover a message from its signature

const TrapdoorFunctionBoundsGetTrapdoorFunctionBounds () const
unsigned int SignatureLength () const
 signature length support by this object (as either input or output)

HashTransformationNewMessageAccumulator () const
 deprecated, please use PK_Signer::NewSignatureAccumulator or PK_Verifier::NewVerificationAccumulator instead

unsigned int MaximumRecoverableLength () const
 length of longest message that can be fully recovered

bool AllowLeftoverMessage () const
 whether or not messages longer than MaximumRecoverableLength() can be signed

virtual DecodingResult RecoverMessage (byte *recoveredMessage, const byte *message, unsigned int messageLen, const byte *signature) const
 recover a message from its signature

virtual bool SignatureUpfrontForVerification () const
virtual HashTransformationNewVerificationAccumulator (const byte *signature=NULL) const
 create a new HashTransformation to accumulate the message to be verified

virtual bool Verify (HashTransformation *messageAccumulator, const byte *signature=NULL) const
 check whether sig is a valid signature for messageAccumulator, and delete messageAccumulator (even in case of exception thrown)

virtual void InitializeVerificationAccumulator (HashTransformation &messageAccumulator, const byte *signature) const
 only useful if SignatureUpfrontForVerification() == true

virtual bool VerifyMessage (const byte *message, unsigned int messageLen, const byte *signature) const
 check whether sig is a valid signature for message

CryptoMaterialAccessMaterial ()
 returns a reference to the crypto material used by this object

const CryptoMaterialGetMaterial () const
 returns a const reference to the crypto material used by this object

virtual const PublicKeyGetPublicKey () const
void BERDecode (BufferedTransformation &bt)
 for backwards compatibility, calls AccessMaterial().Load(bt)

void DEREncode (BufferedTransformation &bt) const
 for backwards compatibility, calls GetMaterial().Save(bt)

virtual std::string AlgorithmName () const
 returns name of this algorithm, not universally implemented yet

virtual ClonableClone () const
 this is not implemented by most classes yet


Protected Member Functions

unsigned int PaddedBlockByteLength () const
unsigned int PaddedBlockBitLength () const


Member Function Documentation

template<class TF, class H>
bool VerifierWithRecoveryTemplate< TF, H >::VerifyAndRestart HashTransformation messageAccumulator,
const byte *  sig
const [virtual]
 

check whether sig is a valid signature for messageAccumulator, and restart messageAccumulator

Note:
depending on SignatureUpfrontForVerification(), signature is either the current or the next signature
Parameters:
signature may be NULL to indicate that the next signature is not available yet

Implements PK_Verifier.

Definition at line 587 of file pubkey.h.

References SignatureSystemWithRecoveryBaseTemplate< H >::SignatureLength(), SecBlock< byte >::size(), and HashTransformation::Verify().

template<class TF, class H>
bool VerifierWithRecoveryTemplate< TF, H >::SignatureUpfrontForRecovery  )  const [inline, virtual]
 

If this function returns true, you must input the signature when calling NewRecoveryAccumulator(). Otherwise, you must input the signature when calling Recover().

Implements PK_VerifierWithRecovery.

Definition at line 569 of file pubkey.h.

template<class TF, class H>
DecodingResult VerifierWithRecoveryTemplate< TF, H >::Recover byte *  recoveredMessage,
HashTransformation recoveryAccumulator,
const byte *  signature
const [virtual]
 

recover a message from its signature

Precondition:
leftoverMessageAccumulator was obtained by calling NewLeftoverMessageAccumulator(signature)

HashTransformation::Final() has not been called on leftoverMessageAccumulator

length of signature == SignatureLength()

size of recoveredMessage == MaximumRecoverableLength()

Implements PK_VerifierWithRecovery.

Definition at line 603 of file pubkey.h.

template<class H>
bool SignatureSystemWithRecoveryBaseTemplate< H >::AllowLeftoverMessage  )  const [inline, virtual, inherited]
 

whether or not messages longer than MaximumRecoverableLength() can be signed

If this function returns false, any message longer than MaximumRecoverableLength() will be truncated for signature and will fail verification.

Implements PK_SignatureSchemeWithRecovery.

Definition at line 529 of file pubkey.h.

virtual DecodingResult PK_VerifierWithRecovery::RecoverMessage byte *  recoveredMessage,
const byte *  message,
unsigned int  messageLen,
const byte *  signature
const [inline, virtual, inherited]
 

recover a message from its signature

Note:
This function should be equivalent to Recover(recoveredMessage, NewRecoveryAccumulator(signature), signature)
Precondition:
length of signature == SignatureLength()

size of recoveredMessage == MaximumRecoverableLength()

Definition at line 1359 of file cryptlib.h.

virtual bool PK_Verifier::SignatureUpfrontForVerification  )  const [inline, virtual, inherited]
 

If this function returns true, you must input the signature when calling NewVerificationAccumulator(). Otherwise, you must input the signature when calling Verify().

Definition at line 1268 of file cryptlib.h.

virtual HashTransformation* PK_Verifier::NewVerificationAccumulator const byte *  signature = NULL  )  const [inline, virtual, inherited]
 

create a new HashTransformation to accumulate the message to be verified

Parameters:
signature is ignored if SignatureUpfrontForVerification() == false
signature may be NULL to indicate that the signature is not available yet

Definition at line 1274 of file cryptlib.h.

References PK_SignatureScheme::NewMessageAccumulator().

Referenced by PK_Verifier::VerifyMessage().

bool PK_Verifier::Verify HashTransformation messageAccumulator,
const byte *  signature = NULL
const [virtual, inherited]
 

check whether sig is a valid signature for messageAccumulator, and delete messageAccumulator (even in case of exception thrown)

Precondition:
messageAccumulator was obtained by calling NewVerificationAccumulator()

HashTransformation::Final() has not been called on messageAccumulator

length of signature == SignatureLength()

Parameters:
signature is ignored if SignatureUpfrontForVerification() == true

Definition at line 632 of file cryptlib.cpp.

References PK_Verifier::VerifyAndRestart().

bool PK_Verifier::VerifyMessage const byte *  message,
unsigned int  messageLen,
const byte *  signature
const [virtual, inherited]
 

check whether sig is a valid signature for message

Precondition:
size of signature == SignatureLength()

Definition at line 638 of file cryptlib.cpp.

References PK_Verifier::NewVerificationAccumulator(), and PK_Verifier::VerifyAndRestart().


The documentation for this class was generated from the following file:
Generated on Tue Jul 8 23:35:44 2003 for Crypto++ by doxygen 1.3.2