PKIFCryptoPPExternalDigest Class Reference

#include <PKIFCryptoPPExternalDigest.h>

Inheritance diagram for PKIFCryptoPPExternalDigest:

Inheritance graph
[legend]
Collaboration diagram for PKIFCryptoPPExternalDigest:

Collaboration graph
[legend]

List of all members.


Detailed Description

This HashTransformation subclass lets crypto++ use digests that have been calculated externally for signature verification. Though this seems like we're unduly mucking with the internals, it relieves us of the need to sling a context for sig verification about and allows the crypto++ colleague to use the same API as all the other crypto back-ends. Crypto++ still checks signature formatting and padding, so this doesn't introduce and issue on that side.

TSP-enforcing: No

Definition at line 26 of file PKIFCryptoPPExternalDigest.h.


Public Member Functions

 PKIFCryptoPPExternalDigest ()
 ~PKIFCryptoPPExternalDigest ()
void SetDigest (const unsigned char *buf, unsigned int length)
void Update (const byte *input, size_t length)
unsigned int DigestSize () const
void TruncatedFinal (byte *digest, size_t digestSize)
bool TruncatedVerify (const byte *digest, size_t digestLength)

Constructor & Destructor Documentation

PKIFCryptoPPExternalDigest::PKIFCryptoPPExternalDigest (  )  [inline]

Interface: Module

Default constructor

Returns:
N/A

Definition at line 37 of file PKIFCryptoPPExternalDigest.h.

PKIFCryptoPPExternalDigest::~PKIFCryptoPPExternalDigest (  ) 

Interface: Module

Frees the digest set using SetDigest()

Returns:
N/A

Definition at line 21 of file PKIFCryptoPPExternalDigest.cpp.


Member Function Documentation

void PKIFCryptoPPExternalDigest::SetDigest ( const unsigned char *  buf,
unsigned int  length 
)

Interface: Module

Set the digest (calculated externally) and length of the digest to be returned when a verifier calls Final() or used in the Verify() function

Returns:
N/A

Definition at line 37 of file PKIFCryptoPPExternalDigest.cpp.

Referenced by NewEDAccumulator().

void PKIFCryptoPPExternalDigest::Update ( const byte *  input,
size_t  length 
) [inline]

Interface: Module

Does nothing since this HashTransformation is only for messages that have already been hashed.

Returns:
N/A

Definition at line 51 of file PKIFCryptoPPExternalDigest.h.

unsigned int PKIFCryptoPPExternalDigest::DigestSize ( void   )  const

Interface: Module Return the length of the digest. This will always be either what was set using SetDigest() or 0.

Returns:
Digest Length

Definition at line 55 of file PKIFCryptoPPExternalDigest.cpp.

void PKIFCryptoPPExternalDigest::TruncatedFinal ( byte *  digest,
size_t  digestSize 
)

Interface: Module Copies the stored digest into digest

Returns:
Digest Length
Parameters:
digest  [out] The stored digest
digestSize  [in] The size of the buffer for the digest

Definition at line 64 of file PKIFCryptoPPExternalDigest.cpp.

bool PKIFCryptoPPExternalDigest::TruncatedVerify ( const byte *  digest,
size_t  digestLength 
)

Interface: Module Compares the two digests

Returns:
true if the digests are identical, false otherwise Note: Current cryptopp signature verification interfaces do not seem to use this.
Parameters:
digest  [in] caller's digest
digestLength  [in] length in bytes of the caller's digest

Definition at line 84 of file PKIFCryptoPPExternalDigest.cpp.


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

Generated on Mon Nov 15 11:21:04 2010 for PublicKeyInfrastructureFramework(PKIF) by  doxygen 1.5.6