#include <pk_ops.h>
|
| virtual size_t | ciphertext_length (size_t ptext_len) const =0 |
| virtual size_t | decrypt (uint8_t &valid_mask, std::span< uint8_t > ptext, std::span< const uint8_t > ctext)=0 |
| virtual size_t | plaintext_length (size_t ctext_len) const =0 |
| virtual | ~Decryption ()=default |
Public key decryption interface
Definition at line 65 of file pk_ops.h.
◆ ~Decryption()
| virtual Botan::PK_Ops::Decryption::~Decryption |
( |
| ) |
|
|
virtualdefault |
◆ ciphertext_length()
| virtual size_t Botan::PK_Ops::Decryption::ciphertext_length |
( |
size_t | ptext_len | ) |
const |
|
pure virtual |
Given the plaintext length, return an upper bound on the ciphertext length that decrypt() expects for this key and padding.
◆ decrypt()
| virtual size_t Botan::PK_Ops::Decryption::decrypt |
( |
uint8_t & | valid_mask, |
|
|
std::span< uint8_t > | ptext, |
|
|
std::span< const uint8_t > | ctext ) |
|
pure virtual |
Decrypt a ciphertext, writing the plaintext to the start of ptext
- Parameters
-
| valid_mask | set to 0xFF if the ciphertext was valid, otherwise 0 |
| ptext | the output, which must be at least plaintext_length(ctext.size()) bytes long |
| ctext | the ciphertext |
- Returns
- the length of the plaintext, which is meaningless if the ciphertext was invalid
For some schemes (eg PKCS #1 v1.5) whether the ciphertext was valid, and the length of the plaintext, must be kept secret, so neither should be declassified here.
◆ plaintext_length()
| virtual size_t Botan::PK_Ops::Decryption::plaintext_length |
( |
size_t | ctext_len | ) |
const |
|
pure virtual |
The documentation for this class was generated from the following file: