Botan 3.0.0-alpha0
Crypto and TLS for C&
|
#include <emsa_pkcs1.h>
Public Member Functions | |
virtual AlgorithmIdentifier | config_for_x509 (const Private_Key &key, const std::string &cert_hash_name) const |
EMSA_PKCS1v15_Raw () | |
EMSA_PKCS1v15_Raw (const std::string &hash_algo) | |
secure_vector< uint8_t > | encoding_of (const secure_vector< uint8_t > &, size_t, RandomNumberGenerator &rng) override |
std::string | name () const override |
std::unique_ptr< EMSA > | new_object () override |
secure_vector< uint8_t > | raw_data () override |
bool | requires_message_recovery () const override |
void | update (const uint8_t[], size_t) override |
bool | verify (const secure_vector< uint8_t > &, const secure_vector< uint8_t > &, size_t) override |
Static Public Member Functions | |
static std::unique_ptr< EMSA > | create (const std::string &algo_spec) |
static std::unique_ptr< EMSA > | create_or_throw (const std::string &algo_spec) |
EMSA_PKCS1v15_Raw which is EMSA_PKCS1v15 without a hash or digest id (which according to QCA docs is "identical to PKCS#11's CKM_RSA_PKCS mechanism", something I have not confirmed)
Definition at line 61 of file emsa_pkcs1.h.
Botan::EMSA_PKCS1v15_Raw::EMSA_PKCS1v15_Raw | ( | ) |
Definition at line 111 of file emsa_pkcs1.cpp.
Botan::EMSA_PKCS1v15_Raw::EMSA_PKCS1v15_Raw | ( | const std::string & | hash_algo | ) |
hash_algo | the digest id for that hash is included in the signature. |
Definition at line 117 of file emsa_pkcs1.cpp.
References Botan::HashFunction::create_or_throw(), hash, hash_algo, and Botan::pkcs_hash_id().
|
virtualinherited |
Prepare sig_algo for use in choose_sig_format for x509 certs
key | used for checking compatibility with the encoding scheme |
cert_hash_name | is checked to equal the hash for the encoding |
Reimplemented in Botan::EMSA1, Botan::EMSA_PKCS1v15, and Botan::PSSR.
Definition at line 38 of file emsa.cpp.
References Botan::EMSA::name().
|
staticinherited |
Factory method for EMSA (message-encoding methods for signatures with appendix) objects
algo_spec | the name of the EMSA to create |
Definition at line 44 of file emsa.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(), Botan::HashFunction::create(), hash, and salt_size.
Referenced by Botan::EMSA::create_or_throw().
|
staticinherited |
Factory method for EMSA (message-encoding methods for signatures with appendix) objects
algo_spec | the name of the EMSA to create |
Definition at line 189 of file emsa.cpp.
References Botan::EMSA::create().
|
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::EMSA.
Definition at line 142 of file emsa_pkcs1.cpp.
|
inlineoverridevirtual |
Implements Botan::EMSA.
Definition at line 84 of file emsa_pkcs1.h.
|
inlineoverridevirtual |
Implements Botan::EMSA.
Definition at line 64 of file emsa_pkcs1.h.
|
overridevirtual |
Implements Botan::EMSA.
Definition at line 130 of file emsa_pkcs1.cpp.
|
inlineoverridevirtual |
Return true if using this EMSA correctly requires a signature scheme with message recovery
Implements Botan::EMSA.
Definition at line 90 of file emsa_pkcs1.h.
|
overridevirtual |
Add more data to the signature computation
input | some data |
length | length of input in bytes |
Implements Botan::EMSA.
Definition at line 125 of file emsa_pkcs1.cpp.
|
overridevirtual |
Verify the encoding
coded | the received (coded) message representative |
raw | the computed (local, uncoded) message representative |
key_bits | the size of the key in bits |
Implements Botan::EMSA.
Definition at line 149 of file emsa_pkcs1.cpp.