DL_EncryptorBase< T > Class Template Reference

Discrete Log (DL) encryptor base implementation. More...

`#include <pubkey.h>`

Inheritance diagram for DL_EncryptorBase< T >:

## Public Types

typedef T | Element
Public Types inherited from DL_CryptoSystemBase< PK_Encryptor, DL_PublicKey< T > >
typedef DL_Base< DL_PublicKey< T > >::Element | Element

## Public Member Functions

void | Encrypt (RandomNumberGenerator &rng, const byte *plaintext, size_t plaintextLength, byte *ciphertext, const NameValuePairs &parameters=g_nullNameValuePairs) const
| Encrypt a byte string.
Public Member Functions inherited from DL_CryptoSystemBase< PK_Encryptor, DL_PublicKey< T > >
size_t | MaxPlaintextLength (size_t ciphertextLength) const
size_t | CiphertextLength (size_t plaintextLength) const
bool | ParameterSupported (const char *name) const
Public Member Functions inherited from PK_Encryptor
virtual BufferedTransformation * | CreateEncryptionFilter (RandomNumberGenerator &rng, BufferedTransformation *attachment=NULL, const NameValuePairs &parameters=g_nullNameValuePairs) const
| Create a new encryption filter.
Public Member Functions inherited from PK_CryptoSystem
virtual size_t | FixedCiphertextLength () const
| Provides the fixed ciphertext length, if one exists.
virtual size_t | FixedMaxPlaintextLength () const
| Provides the maximum plaintext length given a fixed ciphertext length.
Public Member Functions inherited from PublicKeyAlgorithm
CryptoMaterial & | AccessMaterial ()
| Retrieves a reference to a Public Key.
const CryptoMaterial & | GetMaterial () const
| Retrieves a reference to a Public Key.
virtual PublicKey & | AccessPublicKey ()=0
| Retrieves a reference to a Public Key.
virtual const PublicKey & | GetPublicKey () const
| Retrieves a reference to a Public 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

template<class T>
class DL_EncryptorBase< T >

Discrete Log (DL) encryptor base implementation.

Template Parameters

  T | Field element type or class

Field element T can be Integer, ECP or EC2N.

Definition at line 1871 of file pubkey.h.

## Member Typedef Documentation

## Element

template<class T>

typedef T DL_EncryptorBase< T >::Element

Definition at line 1874 of file pubkey.h.

## Constructor & Destructor Documentation

## ~DL_EncryptorBase()

template<class T>

virtual DL_EncryptorBase< T >::~DL_EncryptorBase | ( |  | ) |

inline virtual

Definition at line 1876 of file pubkey.h.

## Member Function Documentation

## Encrypt()

template<class T>

void DL_EncryptorBase< T >::Encrypt | ( | RandomNumberGenerator & | rng,
|  | const byte * | plaintext,
|  | size_t | plaintextLength,
|  | byte * | ciphertext,
|  | const NameValuePairs & | parameters = g_nullNameValuePairs ) const

inline virtual

Encrypt a byte string.

Parameters

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

Precondition
  CiphertextLength(plaintextLength) != 0 ensures the plaintext isn't too large
  COUNTOF(ciphertext) == CiphertextLength(plaintextLength) ensures the output byte buffer is large enough.

See also
  PK_Decryptor

Implements PK_Encryptor.

Definition at line 1878 of file pubkey.h.

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

- pubkey.h