Fabcoin Core  0.16.2
P2P Digital Currency
Public Member Functions | List of all members
TF_DecryptorBase Class Reference

Trapdoor function cryptosystems decryption base class. More...

#include <pubkey.h>

Inheritance diagram for TF_DecryptorBase:
[legend]
Collaboration diagram for TF_DecryptorBase:
[legend]

Public Member Functions

virtual ~TF_DecryptorBase ()
 
DecodingResult Decrypt (RandomNumberGenerator &rng, const byte *ciphertext, size_t ciphertextLength, byte *plaintext, const NameValuePairs &parameters=g_nullNameValuePairs) const
 Decrypt a byte string. More...
 
- Public Member Functions inherited from TF_CryptoSystemBase< PK_Decryptor, TF_Base< TrapdoorFunctionInverse, PK_EncryptionMessageEncodingMethod > >
virtual ~TF_CryptoSystemBase ()
 
bool ParameterSupported (const char *name) const
 
size_t FixedMaxPlaintextLength () const
 
size_t FixedCiphertextLength () const
 
- Public Member Functions inherited from PK_FixedLengthCryptoSystemImpl< PK_Decryptor >
virtual ~PK_FixedLengthCryptoSystemImpl ()
 
size_t MaxPlaintextLength (size_t ciphertextLength) const
 
size_t CiphertextLength (size_t plaintextLength) const
 
- Public Member Functions inherited from PK_Decryptor
virtual ~PK_Decryptor ()
 
virtual BufferedTransformationCreateDecryptionFilter (RandomNumberGenerator &rng, BufferedTransformation *attachment=NULL, const NameValuePairs &parameters=g_nullNameValuePairs) const
 Create a new decryption filter. More...
 
DecodingResult FixedLengthDecrypt (RandomNumberGenerator &rng, const byte *ciphertext, byte *plaintext, const NameValuePairs &parameters=g_nullNameValuePairs) const
 Decrypt a fixed size ciphertext. More...
 
- Public Member Functions inherited from PK_CryptoSystem
virtual ~PK_CryptoSystem ()
 
- Public Member Functions inherited from PrivateKeyAlgorithm
virtual ~PrivateKeyAlgorithm ()
 
CryptoMaterialAccessMaterial ()
 Retrieves a reference to a Private Key. More...
 
const CryptoMaterialGetMaterial () const
 Retrieves a reference to a Private Key. More...
 
virtual PrivateKeyAccessPrivateKey ()=0
 Retrieves a reference to a Private Key. More...
 
virtual const PrivateKeyGetPrivateKey () const
 Retrieves a reference to a Private 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 TF_Base< TrapdoorFunctionInverse, PK_EncryptionMessageEncodingMethod >
typedef TrapdoorFunctionInverse TrapdoorFunctionInterface
 
typedef PK_EncryptionMessageEncodingMethod MessageEncodingInterface
 
- Protected Member Functions inherited from TF_CryptoSystemBase< PK_Decryptor, TF_Base< TrapdoorFunctionInverse, PK_EncryptionMessageEncodingMethod > >
size_t PaddedBlockByteLength () const
 
size_t PaddedBlockBitLength () const
 
- Protected Member Functions inherited from TF_Base< TrapdoorFunctionInverse, PK_EncryptionMessageEncodingMethod >
virtual ~TF_Base ()
 
virtual const TrapdoorFunctionBoundsGetTrapdoorFunctionBounds () const =0
 
virtual const TrapdoorFunctionInterfaceGetTrapdoorFunctionInterface () const =0
 
virtual const MessageEncodingInterfaceGetMessageEncodingInterface () const =0
 

Detailed Description

Trapdoor function cryptosystems decryption base class.

Trapdoor function cryptosystems encryption base class.

Definition at line 293 of file pubkey.h.

Constructor & Destructor Documentation

virtual TF_DecryptorBase::~TF_DecryptorBase ( )
inlinevirtual

Definition at line 296 of file pubkey.h.

Member Function Documentation

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
rnga RandomNumberGenerator derived class
ciphertextthe encrypted byte buffer
ciphertextLengththe size of the encrypted byte buffer
plaintexta byte buffer to hold the decrypted string
parametersa 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 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.

Definition at line 140 of file pubkey.cpp.

Here is the call graph for this function:


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