Botan 3.9.0
Crypto and TLS for C&
|
#include <pkcs1_sig_padding.h>
Public Member Functions | |
std::vector< uint8_t > | encoding_of (std::span< const uint8_t > msg, size_t output_bits, RandomNumberGenerator &rng) override |
std::string | hash_function () const override |
std::string | name () const override |
PKCS1v15_SignaturePaddingScheme (std::unique_ptr< HashFunction > hash) | |
std::vector< uint8_t > | raw_data () override |
void | update (const uint8_t input[], size_t length) override |
bool | verify (std::span< const uint8_t > coded, std::span< const uint8_t > raw, size_t key_bits) override |
Static Public Member Functions | |
static std::unique_ptr< SignaturePaddingScheme > | create (std::string_view algo_spec) |
static std::unique_ptr< SignaturePaddingScheme > | create_or_throw (std::string_view algo_spec) |
PKCS #1 v1.5 signature padding aka PKCS #1 block type 1 aka EMSA3 from IEEE 1363
Definition at line 27 of file pkcs1_sig_padding.h.
|
explicit |
hash | the hash function to use |
Definition at line 78 of file pkcs1_sig_padding.cpp.
References Botan::pkcs_hash_id().
|
staticinherited |
Factory method for SignaturePaddingScheme (message-encoding methods for signatures with appendix) objects
algo_spec | the name of the SignaturePaddingScheme to create |
Definition at line 35 of file sig_padding.cpp.
References Botan::SCAN_Name::algo_name(), Botan::SCAN_Name::arg(), Botan::SCAN_Name::arg_as_integer(), Botan::SCAN_Name::arg_count(), Botan::SCAN_Name::arg_count_between(), and Botan::HashFunction::create().
Referenced by create_or_throw(), and ~SignaturePaddingScheme().
|
staticinherited |
Factory method for SignaturePaddingScheme (message-encoding methods for signatures with appendix) objects
algo_spec | the name of the SignaturePaddingScheme to create |
Definition at line 135 of file sig_padding.cpp.
References create().
Referenced by ~SignaturePaddingScheme().
|
overridevirtual |
Return the encoding of a message
msg | the result of raw_data() |
output_bits | the desired output bit size |
rng | a random number generator |
Implements Botan::SignaturePaddingScheme.
Definition at line 53 of file pkcs1_sig_padding.cpp.
|
overridevirtual |
Return the hash function being used by this padding scheme
Implements Botan::SignaturePaddingScheme.
Definition at line 83 of file pkcs1_sig_padding.cpp.
|
overridevirtual |
Implements Botan::SignaturePaddingScheme.
Definition at line 87 of file pkcs1_sig_padding.cpp.
References Botan::fmt().
|
overridevirtual |
Implements Botan::SignaturePaddingScheme.
Definition at line 49 of file pkcs1_sig_padding.cpp.
|
overridevirtual |
Add more data to the signature computation
input | some data |
length | length of input in bytes |
Implements Botan::SignaturePaddingScheme.
Definition at line 45 of file pkcs1_sig_padding.cpp.
|
overridevirtual |
Verify the encoding
encoding | the received (coded) message representative |
raw_hash | the computed (local, uncoded) message representative |
key_bits | the size of the key in bits |
Implements Botan::SignaturePaddingScheme.
Definition at line 63 of file pkcs1_sig_padding.cpp.
References Botan::constant_time_compare().