TF_SignerImpl< SCHEME_OPTIONS > Class Template Reference

#include <pubkey.h>

Inheritance diagram for TF_SignerImpl< SCHEME_OPTIONS >:

TF_ObjectImpl< TF_SignerBase, SCHEME_OPTIONS, SCHEME_OPTIONS::PrivateKey > TF_ObjectImplBase< TF_SignerBase, SCHEME_OPTIONS, SCHEME_OPTIONS::PrivateKey > AlgorithmImpl< TF_SignerBase, SCHEME_OPTIONS::AlgorithmInfo > TF_SignerBase TF_SignatureSchemeBase< PK_Signer, TF_Base< RandomizedTrapdoorFunctionInverse, PK_SignatureMessageEncodingMethod > > PK_Signer TF_Base< RandomizedTrapdoorFunctionInverse, PK_SignatureMessageEncodingMethod > PK_SignatureScheme PrivateKeyAlgorithm AsymmetricAlgorithm Algorithm Clonable List of all members.

Detailed Description

template<class SCHEME_OPTIONS>
class TF_SignerImpl< SCHEME_OPTIONS >

_

Definition at line 463 of file pubkey.h.

Public Types

typedef SCHEME_OPTIONS::PrivateKey KeyClass
typedef SCHEME_OPTIONS SchemeOptions

Public Member Functions

const KeyClassGetKey () const
KeyClassAccessKey ()
PublicKeyAccessPublicKey ()
const PublicKeyGetPublicKey () const
PrivateKeyAccessPrivateKey ()
const PrivateKeyGetPrivateKey () const
const KeyClassGetTrapdoorFunction () const
PK_MessageAccumulatorNewSignatureAccumulator (RandomNumberGenerator &rng) const
 create a new HashTransformation to accumulate the message to be signed
PK_MessageAccumulatorNewVerificationAccumulator () const
std::string AlgorithmName () const
 returns name of this algorithm, not universally implemented yet
void InputRecoverableMessage (PK_MessageAccumulator &messageAccumulator, const byte *recoverableMessage, size_t recoverableMessageLength) const
size_t SignAndRestart (RandomNumberGenerator &rng, PK_MessageAccumulator &messageAccumulator, byte *signature, bool restart=true) const
 sign and restart messageAccumulator
size_t SignatureLength () const
 signature length if it only depends on the key, otherwise 0
size_t MaxRecoverableLength () const
 length of longest message that can be recovered, or 0 if this signature scheme does not support message recovery
size_t MaxRecoverableLengthFromSignatureLength (size_t signatureLength) const
 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
bool IsProbabilistic () const
 requires a random number generator to sign
bool AllowNonrecoverablePart () const
 whether or not a non-recoverable message part can be signed
bool RecoverablePartFirst () const
 whether you must input the recoverable part before the non-recoverable part during signing
virtual size_t Sign (RandomNumberGenerator &rng, PK_MessageAccumulator *messageAccumulator, byte *signature) const
 sign and delete messageAccumulator (even in case of exception thrown)
virtual size_t SignMessage (RandomNumberGenerator &rng, const byte *message, size_t messageLen, byte *signature) const
 sign a message
virtual size_t SignMessageWithRecovery (RandomNumberGenerator &rng, const byte *recoverableMessage, size_t recoverableMessageLength, const byte *nonrecoverableMessage, size_t nonrecoverableMessageLength, byte *signature) const
 sign a recoverable message
virtual size_t MaxSignatureLength (size_t recoverablePartLength=0) const
 maximum signature length produced for a given length of recoverable message part
virtual bool SignatureUpfront () const
 if this function returns true, during verification you must input the signature before the message, otherwise you can input it at anytime */
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
void BERDecode (BufferedTransformation &bt)
 for backwards compatibility, calls AccessMaterial().Load(bt)
void DEREncode (BufferedTransformation &bt) const
 for backwards compatibility, calls GetMaterial().Save(bt)
virtual ClonableClone () const
 this is not implemented by most classes yet

Static Public Member Functions

static std::string __cdecl StaticAlgorithmName ()

Protected Types

typedef RandomizedTrapdoorFunctionInverse TrapdoorFunctionInterface
typedef PK_SignatureMessageEncodingMethod MessageEncodingInterface

Protected Member Functions

const TF_SignerBase::MessageEncodingInterfaceGetMessageEncodingInterface () const
const TrapdoorFunctionBoundsGetTrapdoorFunctionBounds () const
const TF_SignerBase::TrapdoorFunctionInterfaceGetTrapdoorFunctionInterface () const
HashIdentifier GetHashIdentifier () const
size_t GetDigestSize () const
size_t MessageRepresentativeLength () const
size_t MessageRepresentativeBitLength () const


Member Function Documentation

size_t TF_SignerBase::SignAndRestart ( RandomNumberGenerator rng,
PK_MessageAccumulator messageAccumulator,
byte *  signature,
bool  restart = true 
) const [virtual, inherited]

sign and restart messageAccumulator

Precondition:
size of signature == MaxSignatureLength()
Returns:
actual signature length

Implements PK_Signer.

Definition at line 67 of file pubkey.cpp.

References PK_MessageAccumulatorBase::AccessHash(), RandomizedTrapdoorFunctionInverse::CalculateRandomizedInverse(), PK_SignatureMessageEncodingMethod::ComputeMessageRepresentative(), HashTransformation::DigestSize(), Integer::Encode(), PK_MessageAccumulatorBase::m_empty, PK_MessageAccumulatorBase::m_recoverableMessage, TF_SignatureSchemeBase< PK_Signer, TF_Base< RandomizedTrapdoorFunctionInverse, PK_SignatureMessageEncodingMethod > >::MessageRepresentativeBitLength(), TF_SignatureSchemeBase< PK_Signer, TF_Base< RandomizedTrapdoorFunctionInverse, PK_SignatureMessageEncodingMethod > >::MessageRepresentativeLength(), PK_SignatureMessageEncodingMethod::MinRepresentativeBitLength(), TF_SignatureSchemeBase< PK_Signer, TF_Base< RandomizedTrapdoorFunctionInverse, PK_SignatureMessageEncodingMethod > >::SignatureLength(), and SecBlock< T, A >::size().

bool TF_SignatureSchemeBase< PK_Signer , TF_Base< RandomizedTrapdoorFunctionInverse, PK_SignatureMessageEncodingMethod > >::IsProbabilistic (  )  const [inline, virtual, inherited]

Implements PK_SignatureScheme.

Definition at line 320 of file pubkey.h.

size_t PK_Signer::Sign ( RandomNumberGenerator rng,
PK_MessageAccumulator messageAccumulator,
byte *  signature 
) const [virtual, inherited]

sign and delete messageAccumulator (even in case of exception thrown)

Precondition:
size of signature == MaxSignatureLength()
Returns:
actual signature length

Definition at line 649 of file cryptlib.cpp.

References PK_Signer::SignAndRestart().

Referenced by SignerFilter::Put2().

size_t PK_Signer::SignMessage ( RandomNumberGenerator rng,
const byte *  message,
size_t  messageLen,
byte *  signature 
) const [virtual, inherited]

sign a message

Precondition:
size of signature == MaxSignatureLength()
Returns:
actual signature length

Definition at line 655 of file cryptlib.cpp.

References PK_Signer::NewSignatureAccumulator(), and PK_Signer::SignAndRestart().

size_t PK_Signer::SignMessageWithRecovery ( RandomNumberGenerator rng,
const byte *  recoverableMessage,
size_t  recoverableMessageLength,
const byte *  nonrecoverableMessage,
size_t  nonrecoverableMessageLength,
byte *  signature 
) const [virtual, inherited]

sign a recoverable message

Precondition:
size of signature == MaxSignatureLength(recoverableMessageLength)
Returns:
actual signature length

Definition at line 662 of file cryptlib.cpp.

References PK_Signer::NewSignatureAccumulator(), and PK_Signer::SignAndRestart().


The documentation for this class was generated from the following file:
Generated on Fri Jun 1 11:11:52 2007 for Crypto++ by  doxygen 1.5.2