TF_DecryptorBase Class Reference

Trapdoor function cryptosystems decryption base class. More...

`#include <pubkey.h>`

Inheritance diagram for TF_DecryptorBase:

## Public Member Functions

DecodingResult | Decrypt (RandomNumberGenerator &rng, const byte *ciphertext, size_t ciphertextLength, byte *plaintext, const NameValuePairs &parameters=g_nullNameValuePairs) const
| Decrypt a byte string.
Public Member Functions inherited from TF_CryptoSystemBase< PK_Decryptor, TF_Base< TrapdoorFunctionInverse, PK_EncryptionMessageEncodingMethod > >
bool | ParameterSupported (const char *name) const
size_t | FixedMaxPlaintextLength () const
size_t | FixedCiphertextLength () const
Public Member Functions inherited from PK_FixedLengthCryptoSystemImpl< PK_Decryptor >
size_t | MaxPlaintextLength (size_t ciphertextLength) const
size_t | CiphertextLength (size_t plaintextLength) const
Public Member Functions inherited from PK_Decryptor
virtual BufferedTransformation * | CreateDecryptionFilter (RandomNumberGenerator &rng, BufferedTransformation *attachment=NULL, const NameValuePairs &parameters=g_nullNameValuePairs) const
| Create a new decryption filter.
DecodingResult | FixedLengthDecrypt (RandomNumberGenerator &rng, const byte *ciphertext, byte *plaintext, const NameValuePairs &parameters=g_nullNameValuePairs) const
| Decrypt a fixed size ciphertext.
Public Member Functions inherited from PrivateKeyAlgorithm
CryptoMaterial & | AccessMaterial ()
| Retrieves a reference to a Private Key.
const CryptoMaterial & | GetMaterial () const
| Retrieves a reference to a Private Key.
virtual PrivateKey & | AccessPrivateKey ()=0
| Retrieves a reference to a Private Key.
virtual const PrivateKey & | GetPrivateKey () const
| Retrieves a reference to a Private Key.
Public Member Functions inherited from Algorithm
| Algorithm (bool checkSelfTestStatus=true)
| Interface for all crypto algorithms.
virtual std::string | AlgorithmName () const
| Provides the name of this algorithm.
virtual std::string | AlgorithmProvider () const
| Retrieve the provider of this algorithm.
Public Member Functions inherited from Clonable
virtual Clonable * | Clone () const
| Copies this object.

## Detailed Description

Trapdoor function cryptosystems decryption base class.

Definition at line 283 of file pubkey.h.

## Constructor & Destructor Documentation

## ~TF_DecryptorBase()

virtual TF_DecryptorBase::~TF_DecryptorBase | ( |  | ) |

inline virtual

Definition at line 286 of file pubkey.h.

## Member Function Documentation

## Decrypt()

DecodingResult TF_DecryptorBase::Decrypt | ( | RandomNumberGenerator & | rng,
|  | const byte * | ciphertext,
|  | size_t | ciphertextLength,
|  | byte * | plaintext,
|  | const NameValuePairs & | parameters = g_nullNameValuePairs ) const

virtual

Decrypt a byte string.

Parameters

  rng | a RandomNumberGenerator derived class
  ciphertext | the encrypted byte buffer
  ciphertextLength | the size of the encrypted byte buffer
  plaintext | a byte buffer to hold the decrypted string
  parameters | a set of NameValuePairs to initialize this object

Returns
  the result of the decryption operation

If DecodingResult::isValidCoding is true, then DecodingResult::messageLength is valid and holds the actual length of the plaintext recovered. The result is undefined if decryption failed. If DecodingResult::isValidCoding is false, then DecodingResult::messageLength is undefined.

Precondition
  COUNTOF(plaintext) == MaxPlaintextLength(ciphertextLength) ensures the output byte buffer is large enough

See also
  PK_Encryptor

Implements PK_Decryptor.

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

- pubkey.h