|
Botan 3.14.1
Crypto and TLS for C&
|
#include <pubkey.h>
Public Member Functions | |
| size_t | ciphertext_length (size_t ptext_len) const override |
| std::vector< uint8_t > | encrypt (const uint8_t in[], size_t length, RandomNumberGenerator &rng) const |
| std::vector< uint8_t > | encrypt (std::span< const uint8_t > in, RandomNumberGenerator &rng) const |
| size_t | maximum_input_size () const override |
| PK_Encryptor_EME & | operator= (const PK_Encryptor_EME &)=delete |
| PK_Encryptor_EME & | operator= (PK_Encryptor_EME &&) noexcept |
| PK_Encryptor_EME (const PK_Encryptor_EME &)=delete | |
| PK_Encryptor_EME (const Public_Key &key, RandomNumberGenerator &rng, const PK_Encryption_Options &options) | |
| PK_Encryptor_EME (const Public_Key &key, RandomNumberGenerator &rng, std::string_view padding, std::string_view provider="") | |
| PK_Encryptor_EME (PK_Encryptor_EME &&) noexcept | |
| ~PK_Encryptor_EME () override | |
Encryption using a standard message recovery algorithm like RSA or ElGamal, paired with an encoding scheme like OAEP.
| Botan::PK_Encryptor_EME::PK_Encryptor_EME | ( | const Public_Key & | key, |
| RandomNumberGenerator & | rng, | ||
| const PK_Encryption_Options & | options ) |
Construct an instance.
| key | the key to use inside the encryptor |
| Random Number Generators | a RNG object which must outlive this operation object |
| options | controls the behavior of the encryption, eg which padding to use |
Note that RSA requires the options to specify at least a padding scheme, and for OAEP also a hash function.
Definition at line 111 of file pubkey.cpp.
References Botan::Public_Key::_create_encryption_op(), Botan::Asymmetric_Key::algo_name(), and Botan::fmt().
Referenced by ciphertext_length(), operator=(), operator=(), PK_Encryptor_EME(), PK_Encryptor_EME(), and PK_Encryptor_EME().
| Botan::PK_Encryptor_EME::PK_Encryptor_EME | ( | const Public_Key & | key, |
| RandomNumberGenerator & | rng, | ||
| std::string_view | padding, | ||
| std::string_view | provider = "" ) |
Construct an instance.
| key | the key to use inside the encryptor |
| Random Number Generators | a RNG object which must outlive this operation object |
| padding | the message encoding scheme to use (eg "OAEP(SHA-256)") |
| provider | the provider to use |
Definition at line 105 of file pubkey.cpp.
References Botan::parse_legacy_enc_options(), and PK_Encryptor_EME().
|
overridedefault |
|
delete |
References PK_Encryptor_EME().
|
defaultnoexcept |
References PK_Encryptor_EME().
|
overridevirtual |
Return an upper bound on the ciphertext length for a particular plaintext input length
Implements Botan::PK_Encryptor.
Definition at line 129 of file pubkey.cpp.
References ciphertext_length(), and PK_Encryptor_EME().
Referenced by ciphertext_length(), and operator=().
|
inlineinherited |
Encrypt a message.
| in | the message as a byte array |
| length | the length of the above byte array |
| Random Number Generators | the random number source to use |
Definition at line 37 of file pubkey.h.
Referenced by Botan::TLS::Client_Key_Exchange::Client_Key_Exchange(), and Botan::KeyPair::encryption_consistency_check().
|
inlineinherited |
Encrypt a message.
| in | the message |
| Random Number Generators | the random number source to use |
Definition at line 47 of file pubkey.h.
|
overridevirtual |
Return the maximum allowed message size in bytes.
Implements Botan::PK_Encryptor.
Definition at line 137 of file pubkey.cpp.
Referenced by Botan::KeyPair::encryption_consistency_check().
|
delete |
References PK_Encryptor_EME().
|
defaultnoexcept |
References ciphertext_length(), and PK_Encryptor_EME().