Botan 3.6.1
Crypto and TLS for C&
|
Functions | |
bool | encryption_consistency_check (RandomNumberGenerator &rng, const Private_Key &key, std::string_view padding) |
bool | encryption_consistency_check (RandomNumberGenerator &rng, const Private_Key &private_key, const Public_Key &public_key, std::string_view padding) |
bool | signature_consistency_check (RandomNumberGenerator &rng, const Private_Key &key, std::string_view padding) |
bool | signature_consistency_check (RandomNumberGenerator &rng, const Private_Key &private_key, const Public_Key &public_key, std::string_view padding) |
|
inline |
Tests whether the key is consistent for encryption; whether encrypting and then decrypting gives to the original plaintext.
rng | the rng to use |
key | the key to test |
padding | the encryption padding method to use |
Definition at line 51 of file keypair.h.
References encryption_consistency_check().
bool Botan::KeyPair::encryption_consistency_check | ( | RandomNumberGenerator & | rng, |
const Private_Key & | private_key, | ||
const Public_Key & | public_key, | ||
std::string_view | padding ) |
Tests whether the key is consistent for encryption; whether encrypting and then decrypting gives to the original plaintext.
rng | the rng to use |
private_key | the key to test |
public_key | the key to test |
padding | the encryption padding method to use |
Definition at line 18 of file keypair.cpp.
References Botan::PK_Decryptor::decrypt(), Botan::PK_Encryptor::encrypt(), Botan::PK_Encryptor_EME::maximum_input_size(), Botan::RandomNumberGenerator::random_vec(), and Botan::unlock().
Referenced by Botan::ElGamal_PrivateKey::check_key(), and encryption_consistency_check().
|
inline |
Tests whether the key is consistent for signatures; whether a signature can be created and then verified
rng | the rng to use |
key | the key to test |
padding | the signature padding method to use |
Definition at line 63 of file keypair.h.
References signature_consistency_check().
bool Botan::KeyPair::signature_consistency_check | ( | RandomNumberGenerator & | rng, |
const Private_Key & | private_key, | ||
const Public_Key & | public_key, | ||
std::string_view | padding ) |
Tests whether the key is consistent for signatures; whether a signature can be created and then verified
rng | the rng to use |
private_key | the key to test |
public_key | the key to test |
padding | the signature padding method to use |
Definition at line 49 of file keypair.cpp.
References Botan::RandomNumberGenerator::randomize(), Botan::PK_Signer::sign_message(), and Botan::PK_Verifier::verify_message().
Referenced by Botan::DSA_PrivateKey::check_key(), Botan::ECDSA_PrivateKey::check_key(), Botan::ECGDSA_PrivateKey::check_key(), Botan::ECKCDSA_PrivateKey::check_key(), Botan::RSA_PrivateKey::check_key(), Botan::SM2_PrivateKey::check_key(), and signature_consistency_check().