Crypto++ 8.7
Free C++ class library of cryptographic schemes
Public Member Functions | List of all members
DL_EncryptionAlgorithm_Xor< MAC, DHAES_MODE, LABEL_OCTETS > Class Template Reference

P1363 based XOR Encryption Method. More...

#include <gfpcrypt.h>

+ Inheritance diagram for DL_EncryptionAlgorithm_Xor< MAC, DHAES_MODE, LABEL_OCTETS >:

Public Member Functions

bool ParameterSupported (const char *name) const
 
size_t GetSymmetricKeyLength (size_t plaintextLength) const
 
size_t GetSymmetricCiphertextLength (size_t plaintextLength) const
 
size_t GetMaxSymmetricPlaintextLength (size_t ciphertextLength) const
 
void SymmetricEncrypt (RandomNumberGenerator &rng, const byte *key, const byte *plaintext, size_t plaintextLength, byte *ciphertext, const NameValuePairs &parameters) const
 
DecodingResult SymmetricDecrypt (const byte *key, const byte *ciphertext, size_t ciphertextLength, byte *plaintext, const NameValuePairs &parameters) const
 
virtual bool ParameterSupported (const char *name) const
 
virtual size_t GetSymmetricKeyLength (size_t plaintextLength) const =0
 
virtual size_t GetSymmetricCiphertextLength (size_t plaintextLength) const =0
 
virtual size_t GetMaxSymmetricPlaintextLength (size_t ciphertextLength) const =0
 
virtual void SymmetricEncrypt (RandomNumberGenerator &rng, const byte *key, const byte *plaintext, size_t plaintextLength, byte *ciphertext, const NameValuePairs &parameters) const =0
 
virtual DecodingResult SymmetricDecrypt (const byte *key, const byte *ciphertext, size_t ciphertextLength, byte *plaintext, const NameValuePairs &parameters) const =0
 

Detailed Description

template<class MAC, bool DHAES_MODE, bool LABEL_OCTETS = false>
class DL_EncryptionAlgorithm_Xor< MAC, DHAES_MODE, LABEL_OCTETS >

P1363 based XOR Encryption Method.

Template Parameters
MACMessageAuthenticationCode derived class used for MAC computation
DHAES_MODEflag indicating DHAES mode
LABEL_OCTETSflag indicating the label is octet count

DL_EncryptionAlgorithm_Xor is based on an early P1363 draft, which itself appears to be based on an early Certicom SEC-1 draft (or an early SEC-1 draft was based on a P1363 draft). Crypto++ 4.2 used it in its Integrated Ecryption Schemes with NoCofactorMultiplication, DHAES_MODE=false and LABEL_OCTETS=true.

If you need this method for Crypto++ 4.2 compatibility, then use the ECIES template class with NoCofactorMultiplication, DHAES_MODE=false and LABEL_OCTETS=true.

If you need this method for Bouncy Castle 1.54 and Botan 1.11 compatibility, then use the ECIES template class with NoCofactorMultiplication, DHAES_MODE=true and LABEL_OCTETS=false.

Bouncy Castle 1.54 and Botan 1.11 compatibility are the default template parameters.

Since
Crypto++ 4.0

Definition at line 871 of file gfpcrypt.h.

Constructor & Destructor Documentation

◆ ~DL_EncryptionAlgorithm_Xor()

template<class MAC , bool DHAES_MODE, bool LABEL_OCTETS = false>
virtual DL_EncryptionAlgorithm_Xor< MAC, DHAES_MODE, LABEL_OCTETS >::~DL_EncryptionAlgorithm_Xor ( )
inlinevirtual

Definition at line 874 of file gfpcrypt.h.

Member Function Documentation

◆ ParameterSupported()

template<class MAC , bool DHAES_MODE, bool LABEL_OCTETS = false>
bool DL_EncryptionAlgorithm_Xor< MAC, DHAES_MODE, LABEL_OCTETS >::ParameterSupported ( const char *  name) const
inlinevirtual

Reimplemented from DL_SymmetricEncryptionAlgorithm.

Definition at line 876 of file gfpcrypt.h.

◆ GetSymmetricKeyLength()

template<class MAC , bool DHAES_MODE, bool LABEL_OCTETS = false>
size_t DL_EncryptionAlgorithm_Xor< MAC, DHAES_MODE, LABEL_OCTETS >::GetSymmetricKeyLength ( size_t  plaintextLength) const
inlinevirtual

Implements DL_SymmetricEncryptionAlgorithm.

Definition at line 877 of file gfpcrypt.h.

◆ GetSymmetricCiphertextLength()

template<class MAC , bool DHAES_MODE, bool LABEL_OCTETS = false>
size_t DL_EncryptionAlgorithm_Xor< MAC, DHAES_MODE, LABEL_OCTETS >::GetSymmetricCiphertextLength ( size_t  plaintextLength) const
inlinevirtual

Implements DL_SymmetricEncryptionAlgorithm.

Definition at line 879 of file gfpcrypt.h.

◆ GetMaxSymmetricPlaintextLength()

template<class MAC , bool DHAES_MODE, bool LABEL_OCTETS = false>
size_t DL_EncryptionAlgorithm_Xor< MAC, DHAES_MODE, LABEL_OCTETS >::GetMaxSymmetricPlaintextLength ( size_t  ciphertextLength) const
inlinevirtual

Implements DL_SymmetricEncryptionAlgorithm.

Definition at line 881 of file gfpcrypt.h.

◆ SymmetricEncrypt()

template<class MAC , bool DHAES_MODE, bool LABEL_OCTETS = false>
void DL_EncryptionAlgorithm_Xor< MAC, DHAES_MODE, LABEL_OCTETS >::SymmetricEncrypt ( RandomNumberGenerator rng,
const byte key,
const byte plaintext,
size_t  plaintextLength,
byte ciphertext,
const NameValuePairs parameters 
) const
inlinevirtual

Implements DL_SymmetricEncryptionAlgorithm.

Definition at line 883 of file gfpcrypt.h.

◆ SymmetricDecrypt()

template<class MAC , bool DHAES_MODE, bool LABEL_OCTETS = false>
DecodingResult DL_EncryptionAlgorithm_Xor< MAC, DHAES_MODE, LABEL_OCTETS >::SymmetricDecrypt ( const byte key,
const byte ciphertext,
size_t  ciphertextLength,
byte plaintext,
const NameValuePairs parameters 
) const
inlinevirtual

Implements DL_SymmetricEncryptionAlgorithm.

Definition at line 915 of file gfpcrypt.h.


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