Fabcoin Core  0.16.2
P2P Digital Currency
Public Types | Public Member Functions | List of all members
DL_EncryptorBase< T > Class Template Reference

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

#include <pubkey.h>

Inheritance diagram for DL_EncryptorBase< T >:
[legend]
Collaboration diagram for DL_EncryptorBase< T >:
[legend]

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

virtual ~DL_EncryptorBase ()
 
void Encrypt (RandomNumberGenerator &rng, const byte *plaintext, size_t plaintextLength, byte *ciphertext, const NameValuePairs &parameters=g_nullNameValuePairs) const
 Encrypt a byte string. More...
 
- Public Member Functions inherited from DL_CryptoSystemBase< PK_Encryptor, DL_PublicKey< T > >
virtual ~DL_CryptoSystemBase ()
 
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 BufferedTransformationCreateEncryptionFilter (RandomNumberGenerator &rng, BufferedTransformation *attachment=NULL, const NameValuePairs &parameters=g_nullNameValuePairs) const
 Create a new encryption filter. More...
 
- Public Member Functions inherited from PK_CryptoSystem
virtual ~PK_CryptoSystem ()
 
virtual size_t FixedCiphertextLength () const
 Provides the fixed ciphertext length, if one exists. More...
 
virtual size_t FixedMaxPlaintextLength () const
 Provides the maximum plaintext length given a fixed ciphertext length. More...
 
- Public Member Functions inherited from PublicKeyAlgorithm
virtual ~PublicKeyAlgorithm ()
 
CryptoMaterialAccessMaterial ()
 Retrieves a reference to a Public Key. More...
 
const CryptoMaterialGetMaterial () const
 Retrieves a reference to a Public Key. More...
 
virtual PublicKeyAccessPublicKey ()=0
 Retrieves a reference to a Public Key. More...
 
virtual const PublicKeyGetPublicKey () const
 Retrieves a reference to a Public Key. More...
 
- Public Member Functions inherited from AsymmetricAlgorithm
virtual ~AsymmetricAlgorithm ()
 
void BERDecode (BufferedTransformation &bt)
 Loads this object from a BufferedTransformation. More...
 
void DEREncode (BufferedTransformation &bt) const
 Saves this object to a BufferedTransformation. More...
 
- Public Member Functions inherited from Algorithm
virtual ~Algorithm ()
 
 Algorithm (bool checkSelfTestStatus=true)
 Interface for all crypto algorithms. More...
 
virtual std::string AlgorithmName () const
 Provides the name of this algorithm. More...
 
- Public Member Functions inherited from Clonable
virtual ~Clonable ()
 
virtual ClonableClone () const
 Copies this object. More...
 

Additional Inherited Members

- Protected Types inherited from DL_Base< DL_PublicKey< T > >
typedef DL_PublicKey< TKeyInterface
 
typedef DL_PublicKey< T >::Element Element
 
- Protected Member Functions inherited from DL_CryptoSystemBase< PK_Encryptor, DL_PublicKey< T > >
virtual const DL_KeyAgreementAlgorithm< Element > & GetKeyAgreementAlgorithm () const =0
 
virtual const DL_KeyDerivationAlgorithm< Element > & GetKeyDerivationAlgorithm () const =0
 
virtual const DL_SymmetricEncryptionAlgorithmGetSymmetricEncryptionAlgorithm () const =0
 
- Protected Member Functions inherited from DL_Base< DL_PublicKey< T > >
virtual ~DL_Base ()
 
const DL_GroupParameters< Element > & GetAbstractGroupParameters () const
 
DL_GroupParameters< Element > & AccessAbstractGroupParameters ()
 
virtual KeyInterfaceAccessKeyInterface ()=0
 
virtual const KeyInterfaceGetKeyInterface () const =0
 

Detailed Description

template<class T>
class DL_EncryptorBase< T >

Discrete Log (DL) encryptor base implementation.

Template Parameters
Tfield element type

Definition at line 1663 of file pubkey.h.

Member Typedef Documentation

template<class T>
typedef T DL_EncryptorBase< T >::Element

Definition at line 1666 of file pubkey.h.

Constructor & Destructor Documentation

template<class T>
virtual DL_EncryptorBase< T >::~DL_EncryptorBase ( )
inlinevirtual

Definition at line 1668 of file pubkey.h.

Member Function Documentation

template<class T>
void DL_EncryptorBase< T >::Encrypt ( RandomNumberGenerator rng,
const byte plaintext,
size_t  plaintextLength,
byte ciphertext,
const NameValuePairs parameters = g_nullNameValuePairs 
) const
inlinevirtual

Encrypt a byte string.

Parameters
rnga RandomNumberGenerator derived class
plaintextthe plaintext byte buffer
plaintextLengththe size of the plaintext byte buffer
ciphertexta byte buffer to hold the encrypted string
parametersa 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 1670 of file pubkey.h.


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