Fabcoin Core
0.16.2
P2P Digital Currency
|
Interface for public-key decryptors. More...
#include <cryptlib.h>
Public Member Functions | |
virtual | ~PK_Decryptor () |
virtual DecodingResult | Decrypt (RandomNumberGenerator &rng, const byte *ciphertext, size_t ciphertextLength, byte *plaintext, const NameValuePairs ¶meters=g_nullNameValuePairs) const =0 |
Decrypt a byte string. More... | |
virtual BufferedTransformation * | CreateDecryptionFilter (RandomNumberGenerator &rng, BufferedTransformation *attachment=NULL, const NameValuePairs ¶meters=g_nullNameValuePairs) const |
Create a new decryption filter. More... | |
DecodingResult | FixedLengthDecrypt (RandomNumberGenerator &rng, const byte *ciphertext, byte *plaintext, const NameValuePairs ¶meters=g_nullNameValuePairs) const |
Decrypt a fixed size ciphertext. More... | |
Public Member Functions inherited from PK_CryptoSystem | |
virtual | ~PK_CryptoSystem () |
virtual size_t | MaxPlaintextLength (size_t ciphertextLength) const =0 |
Provides the maximum length of plaintext for a given ciphertext length. More... | |
virtual size_t | CiphertextLength (size_t plaintextLength) const =0 |
Calculate the length of ciphertext given length of plaintext. More... | |
virtual bool | ParameterSupported (const char *name) const =0 |
Determines whether this object supports the use of a named parameter. More... | |
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 PrivateKeyAlgorithm | |
virtual | ~PrivateKeyAlgorithm () |
CryptoMaterial & | AccessMaterial () |
Retrieves a reference to a Private Key. More... | |
const CryptoMaterial & | GetMaterial () const |
Retrieves a reference to a Private Key. More... | |
virtual PrivateKey & | AccessPrivateKey ()=0 |
Retrieves a reference to a Private Key. More... | |
virtual const PrivateKey & | GetPrivateKey () 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 Clonable * | Clone () const |
Copies this object. More... | |
Interface for public-key decryptors.
Definition at line 2372 of file cryptlib.h.
|
inlinevirtual |
Definition at line 2375 of file cryptlib.h.
|
virtual |
Create a new decryption filter.
rng | a RandomNumberGenerator derived class |
attachment | an attached transformation |
parameters | a set of NameValuePairs to initialize this object |
Definition at line 873 of file cryptlib.cpp.
|
pure virtual |
Decrypt a byte string.
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 |
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.
COUNTOF(plaintext) == MaxPlaintextLength(ciphertextLength)
ensures the output byte buffer is large enough Implemented in DL_DecryptorBase< T >, DL_DecryptorBase< SCHEME_OPTIONS::Element >, and TF_DecryptorBase.
|
inline |
Decrypt a fixed size ciphertext.
rng | a RandomNumberGenerator derived class |
ciphertext | the encrypted byte buffer |
plaintext | a byte buffer to hold the decrypted string |
parameters | a set of NameValuePairs to initialize this object |
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.
COUNTOF(plaintext) == MaxPlaintextLength(ciphertextLength)
ensures the output byte buffer is large enough Definition at line 2417 of file cryptlib.h.