Botan
1.10.9
|
Typedefs | |
typedef unsigned char | byte |
typedef EC_Group | EC_Domain_Params |
typedef std::runtime_error | Exception |
typedef OctetString | InitializationVector |
typedef std::invalid_argument | Invalid_Argument |
typedef PK_Decryptor_EME | PK_Decryptor_MR_with_EME |
typedef PK_Encryptor_EME | PK_Encryptor_MR_with_EME |
typedef PK_Key_Agreement_Key | PK_KA_Key |
typedef Private_Key | PKCS8_PrivateKey |
typedef PBKDF | S2K |
typedef signed int | s32bit |
typedef OctetString | SymmetricKey |
typedef unsigned short | u16bit |
typedef unsigned int | u32bit |
typedef unsigned long long | u64bit |
typedef Public_Key | X509_PublicKey |
Functions | |
BigInt | abs (const BigInt &n) |
std::map< std::string, double > | algorithm_benchmark (const std::string &name, Algorithm_Factory &af, RandomNumberGenerator &rng, u32bit milliseconds, size_t buf_size) |
std::map< std::string, bool > | algorithm_kat (const SCAN_Name &algo_name, const std::map< std::string, std::string > &vars, Algorithm_Factory &af) |
void | aont_package (RandomNumberGenerator &rng, BlockCipher *cipher, const byte input[], size_t input_len, byte output[]) |
void | aont_unpackage (BlockCipher *cipher, const byte input[], size_t input_len, byte output[]) |
template<typename T > | |
void | append_tls_length_value (MemoryRegion< byte > &buf, const T *vals, size_t vals_size, size_t tag_size) |
template<typename T > | |
void | append_tls_length_value (MemoryRegion< byte > &buf, const MemoryRegion< T > &vals, size_t tag_size) |
template<typename T > | |
void | append_tls_length_value (MemoryRegion< byte > &buf, const std::vector< T > &vals, size_t tag_size) |
void | assertion_failure (const char *expr_str, const char *msg, const char *func, const char *file, int line) |
size_t | base64_decode (byte output[], const char input[], size_t input_length, size_t &input_consumed, bool final_inputs, bool ignore_ws) |
size_t | base64_decode (byte output[], const char input[], size_t input_length, bool ignore_ws) |
size_t | base64_decode (byte output[], const std::string &input, bool ignore_ws) |
SecureVector< byte > | base64_decode (const char input[], size_t input_length, bool ignore_ws) |
SecureVector< byte > | base64_decode (const std::string &input, bool ignore_ws) |
size_t | base64_encode (char out[], const byte in[], size_t input_length, size_t &input_consumed, bool final_inputs) |
std::string | base64_encode (const byte input[], size_t input_length) |
std::string | base64_encode (const MemoryRegion< byte > &input) |
void | bigint_2word_mul (word a, word b, word *z1, word *z0) |
void | bigint_add2 (word x[], size_t x_size, const word y[], size_t y_size) |
word | bigint_add2_nc (word x[], size_t x_size, const word y[], size_t y_size) |
void | bigint_add3 (word z[], const word x[], size_t x_size, const word y[], size_t y_size) |
word | bigint_add3_nc (word z[], const word x[], size_t x_size, const word y[], size_t y_size) |
s32bit | bigint_cmp (const word x[], size_t x_size, const word y[], size_t y_size) |
void | bigint_comba_mul16 (word z[32], const word x[16], const word y[16]) |
void | bigint_comba_mul4 (word z[8], const word x[4], const word y[4]) |
void | bigint_comba_mul6 (word z[12], const word x[6], const word y[6]) |
void | bigint_comba_mul8 (word z[16], const word x[8], const word y[8]) |
void | bigint_comba_sqr16 (word z[32], const word x[16]) |
void | bigint_comba_sqr4 (word z[8], const word x[4]) |
void | bigint_comba_sqr6 (word z[12], const word x[6]) |
void | bigint_comba_sqr8 (word z[16], const word x[8]) |
size_t | bigint_divcore (word q, word y2, word y1, word x3, word x2, word x1) |
word | bigint_divop (word n1, word n0, word d) |
void | bigint_linmul2 (word x[], size_t x_size, word y) |
void | bigint_linmul3 (word z[], const word x[], size_t x_size, word y) |
word | bigint_modop (word n1, word n0, word d) |
void | bigint_monty_mul (word z[], size_t z_size, const word x[], size_t x_size, size_t x_sw, const word y[], size_t y_size, size_t y_sw, const word p[], size_t p_size, word p_dash, word workspace[]) |
void | bigint_monty_redc (word z[], size_t z_size, const word p[], size_t p_size, word p_dash, word workspace[]) |
void | bigint_monty_sqr (word z[], size_t z_size, const word x[], size_t x_size, size_t x_sw, const word p[], size_t p_size, word p_dash, word workspace[]) |
void | bigint_mul (word z[], size_t z_size, word workspace[], const word x[], size_t x_size, size_t x_sw, const word y[], size_t y_size, size_t y_sw) |
void | bigint_shl1 (word x[], size_t x_size, size_t word_shift, size_t bit_shift) |
void | bigint_shl2 (word y[], const word x[], size_t x_size, size_t word_shift, size_t bit_shift) |
void | bigint_shr1 (word x[], size_t x_size, size_t word_shift, size_t bit_shift) |
void | bigint_shr2 (word y[], const word x[], size_t x_size, size_t word_shift, size_t bit_shift) |
void | bigint_simple_mul (word z[], const word x[], size_t x_size, const word y[], size_t y_size) |
void | bigint_simple_sqr (word z[], const word x[], size_t x_size) |
void | bigint_sqr (word z[], size_t z_size, word workspace[], const word x[], size_t x_size, size_t x_sw) |
word | bigint_sub2 (word x[], size_t x_size, const word y[], size_t y_size) |
void | bigint_sub2_rev (word x[], const word y[], size_t y_size) |
word | bigint_sub3 (word z[], const word x[], size_t x_size, const word y[], size_t y_size) |
size_t | block_size_of (const std::string &name) |
void | botan_md4_x86_32_compress (u32bit digest[4], const byte input[64], u32bit M[16]) |
void | botan_serpent_x86_32_decrypt (const byte in[16], byte out[16], const u32bit ks[132]) |
void | botan_serpent_x86_32_encrypt (const byte in[16], byte out[16], const u32bit ks[132]) |
void | botan_serpent_x86_32_key_schedule (u32bit ks[140]) |
template<typename T > | |
void | bswap_4 (T x[4]) |
calendar_point | calendar_value (u64bit a_time_t) |
bool | check_bcrypt (const std::string &pass, const std::string &hash) |
bool | check_passhash9 (const std::string &pass, const std::string &hash) |
bool | check_prime (const BigInt &n, RandomNumberGenerator &rng) |
PK_Signer * | choose_sig_format (const Private_Key &key, const std::string &hash_fn, AlgorithmIdentifier &sig_algo) |
template<typename T > | |
void | clear_mem (T *ptr, size_t n) |
void | confirm_startup_self_tests (Algorithm_Factory &af) |
template<typename InputIterator , typename OutputIterator , typename Predicate > | |
OutputIterator | copy_if (InputIterator current, InputIterator end, OutputIterator dest, Predicate copy_p) |
template<typename T > | |
void | copy_mem (T *out, const T *in, size_t n) |
AlternativeName | create_alt_name (const Data_Store &info) |
X509_DN | create_dn (const Data_Store &info) |
template<typename T > | |
size_t | ctz (T n) |
ECDSA_Signature | decode_concatenation (const MemoryRegion< byte > &concat) |
ECDSA_PublicKey * | decode_eac1_1_key (const MemoryRegion< byte > &, AlgorithmIdentifier &) |
template<typename Pair > | |
void | delete2nd (Pair &pair) |
void | divide (const BigInt &x, const BigInt &y_arg, BigInt &q, BigInt &r) |
size_t | dl_work_factor (size_t bits) |
SecureVector< byte > | EC2OSP (const PointGFp &point, byte format) |
BigInt | gcd (const BigInt &a, const BigInt &b) |
std::string | generate_bcrypt (const std::string &pass, RandomNumberGenerator &rng, u16bit work_factor) |
bool | generate_dsa_primes (RandomNumberGenerator &rng, Algorithm_Factory &af, BigInt &p, BigInt &q, size_t pbits, size_t qbits, const MemoryRegion< byte > &seed_c) |
SecureVector< byte > | generate_dsa_primes (RandomNumberGenerator &rng, Algorithm_Factory &af, BigInt &p, BigInt &q, size_t pbits, size_t qbits) |
std::string | generate_passhash9 (const std::string &pass, RandomNumberGenerator &rng, u16bit work_factor, byte alg_id) |
BigInt | generate_srp6_verifier (const std::string &identifier, const std::string &password, const MemoryRegion< byte > &salt, const std::string &group_id, const std::string &hash_id) |
BlockCipher * | get_block_cipher (const std::string &algo_spec) |
template<typename T > | |
byte | get_byte (size_t byte_num, T input) |
Keyed_Filter * | get_cipher (const std::string &algo_spec, Cipher_Dir direction) |
Keyed_Filter * | get_cipher (const std::string &algo_spec, const SymmetricKey &key, const InitializationVector &iv, Cipher_Dir direction) |
Keyed_Filter * | get_cipher (const std::string &algo_spec, const SymmetricKey &key, Cipher_Dir direction) |
Keyed_Filter * | get_cipher_mode (const BlockCipher *block_cipher, Cipher_Dir direction, const std::string &mode, const std::string &padding) |
EME * | get_eme (const std::string &algo_spec) |
EMSA * | get_emsa (const std::string &algo_spec) |
HashFunction * | get_hash (const std::string &algo_spec) |
KDF * | get_kdf (const std::string &algo_spec) |
MessageAuthenticationCode * | get_mac (const std::string &algo_spec) |
u64bit | get_nanoseconds_clock () |
PBE * | get_pbe (const std::string &algo_spec) |
PBE * | get_pbe (const OID &pbe_oid, DataSource ¶ms) |
PBKDF * | get_pbkdf (const std::string &algo_spec) |
PK_Decryptor * | get_pk_decryptor (const Private_Key &key, const std::string &eme) |
PK_Encryptor * | get_pk_encryptor (const Public_Key &key, const std::string &eme) |
PK_Key_Agreement * | get_pk_kas (const PK_Key_Agreement_Key &key, const std::string &kdf) |
PK_Signer * | get_pk_signer (const Private_Key &key, const std::string &emsa, Signature_Format sig_format=IEEE_1363) |
PK_Verifier * | get_pk_verifier (const Public_Key &key, const std::string &emsa, Signature_Format sig_format=IEEE_1363) |
PBKDF * | get_s2k (const std::string &algo_spec) |
StreamCipher * | get_stream_cipher (const std::string &algo_spec) |
template<typename T > | |
size_t | hamming_weight (T n) |
bool | has_mlock () |
bool | have_algorithm (const std::string &name) |
bool | have_block_cipher (const std::string &algo_spec) |
bool | have_hash (const std::string &algo_spec) |
bool | have_mac (const std::string &algo_spec) |
bool | have_stream_cipher (const std::string &algo_spec) |
size_t | hex_decode (byte output[], const char input[], size_t input_length, size_t &input_consumed, bool ignore_ws) |
size_t | hex_decode (byte output[], const char input[], size_t input_length, bool ignore_ws) |
size_t | hex_decode (byte output[], const std::string &input, bool ignore_ws) |
SecureVector< byte > | hex_decode (const char input[], size_t input_length, bool ignore_ws) |
SecureVector< byte > | hex_decode (const std::string &input, bool ignore_ws) |
void | hex_encode (char output[], const byte input[], size_t input_length, bool uppercase) |
std::string | hex_encode (const MemoryRegion< byte > &input, bool uppercase) |
std::string | hex_encode (const byte input[], size_t input_length, bool uppercase) |
template<typename T > | |
size_t | high_bit (T n) |
byte | ieee1363_hash_id (const std::string &name) |
BigInt | inverse_mod (const BigInt &n, const BigInt &mod) |
std::string | ipv4_to_string (u32bit ip) |
s32bit | jacobi (const BigInt &a, const BigInt &n) |
size_t | keylength_multiple_of (const std::string &name) |
BigInt | lcm (const BigInt &a, const BigInt &b) |
template<typename T > | |
T | load_be (const byte in[], size_t off) |
template<typename T > | |
void | load_be (const byte in[], T &x0, T &x1) |
template<typename T > | |
void | load_be (const byte in[], T &x0, T &x1, T &x2, T &x3) |
template<typename T > | |
void | load_be (const byte in[], T &x0, T &x1, T &x2, T &x3, T &x4, T &x5, T &x6, T &x7) |
template<typename T > | |
void | load_be (T out[], const byte in[], size_t count) |
template<> | |
u16bit | load_be< u16bit > (const byte in[], size_t off) |
template<> | |
u32bit | load_be< u32bit > (const byte in[], size_t off) |
template<> | |
u64bit | load_be< u64bit > (const byte in[], size_t off) |
template<typename T > | |
T | load_le (const byte in[], size_t off) |
template<typename T > | |
void | load_le (const byte in[], T &x0, T &x1) |
template<typename T > | |
void | load_le (const byte in[], T &x0, T &x1, T &x2, T &x3) |
template<typename T > | |
void | load_le (const byte in[], T &x0, T &x1, T &x2, T &x3, T &x4, T &x5, T &x6, T &x7) |
template<typename T > | |
void | load_le (T out[], const byte in[], size_t count) |
template<> | |
u16bit | load_le< u16bit > (const byte in[], size_t off) |
template<> | |
u32bit | load_le< u32bit > (const byte in[], size_t off) |
template<> | |
u64bit | load_le< u64bit > (const byte in[], size_t off) |
bool | lock_mem (void *ptr, size_t bytes) |
template<typename T > | |
size_t | low_bit (T n) |
size_t | low_zero_bits (const BigInt &n) |
EAC1_1_CVC | make_cvc_cert (PK_Signer &signer, MemoryRegion< byte > const &public_key, ASN1_Car const &car, ASN1_Chr const &chr, byte holder_auth_templ, ASN1_Ced ced, ASN1_Cex cex, RandomNumberGenerator &rng) |
Private_Key * | make_private_key (const AlgorithmIdentifier &alg_id, const MemoryRegion< byte > &key_bits, RandomNumberGenerator &rng) |
Public_Key * | make_public_key (const AlgorithmIdentifier &alg_id, const MemoryRegion< byte > &key_bits) |
u16bit | make_u16bit (byte i0, byte i1) |
u32bit | make_u32bit (byte i0, byte i1, byte i2, byte i3) |
u64bit | make_u64bit (byte i0, byte i1, byte i2, byte i3, byte i4, byte i5, byte i6, byte i7) |
size_t | max_keylength_of (const std::string &name) |
size_t | min_keylength_of (const std::string &name) |
BigInt | mul_add (const BigInt &a, const BigInt &b, const BigInt &c) |
PointGFp | multi_exponentiate (const PointGFp &p1, const BigInt &z1, const PointGFp &p2, const BigInt &z2) |
template<typename K , typename V > | |
void | multimap_insert (std::multimap< K, V > &multimap, const K &key, const V &value) |
bool | operator!= (EAC1_1_Req const &lhs, EAC1_1_Req const &rhs) |
bool | operator!= (const ECDSA_Signature &lhs, const ECDSA_Signature &rhs) |
bool | operator!= (const CRL_Entry &a1, const CRL_Entry &a2) |
bool | operator!= (EAC1_1_CVC const &lhs, EAC1_1_CVC const &rhs) |
bool | operator!= (const AlgorithmIdentifier &a1, const AlgorithmIdentifier &a2) |
bool | operator!= (EAC1_1_ADO const &lhs, EAC1_1_ADO const &rhs) |
bool BOTAN_DLL | operator!= (const X509_Time &, const X509_Time &) |
bool | operator!= (const OID &a, const OID &b) |
bool | operator!= (const OctetString &s1, const OctetString &s2) |
bool | operator!= (const EC_Group &lhs, const EC_Group &rhs) |
bool | operator!= (const CurveGFp &lhs, const CurveGFp &rhs) |
bool | operator!= (const X509_DN &dn1, const X509_DN &dn2) |
bool | operator!= (const PointGFp &lhs, const PointGFp &rhs) |
bool | operator!= (const EAC_Time &t1, const EAC_Time &t2) |
bool | operator!= (const ASN1_EAC_String &lhs, const ASN1_EAC_String &rhs) |
bool | operator!= (const X509_Certificate &cert1, const X509_Certificate &cert2) |
bool | operator!= (const BigInt &a, const BigInt &b) |
BigInt | operator% (const BigInt &n, const BigInt &mod) |
word | operator% (const BigInt &n, word mod) |
BigInt | operator* (const BigInt &x, const BigInt &y) |
PointGFp | operator* (const PointGFp &point, const BigInt &scalar) |
PointGFp | operator* (const BigInt &scalar, const PointGFp &point) |
BigInt | operator+ (const BigInt &x, const BigInt &y) |
OID | operator+ (const OID &oid, u32bit component) |
OctetString | operator+ (const OctetString &k1, const OctetString &k2) |
PointGFp | operator+ (const PointGFp &lhs, const PointGFp &rhs) |
template<typename T > | |
MemoryRegion< T > & | operator+= (MemoryRegion< T > &out, const MemoryRegion< T > &in) |
template<typename T > | |
MemoryRegion< T > & | operator+= (MemoryRegion< T > &out, T in) |
template<typename T , typename L > | |
MemoryRegion< T > & | operator+= (MemoryRegion< T > &out, const std::pair< const T *, L > &in) |
template<typename T , typename L > | |
MemoryRegion< T > & | operator+= (MemoryRegion< T > &out, const std::pair< T *, L > &in) |
BigInt | operator- (const BigInt &x, const BigInt &y) |
PointGFp | operator- (const PointGFp &lhs) |
PointGFp | operator- (const PointGFp &lhs, const PointGFp &rhs) |
BigInt | operator/ (const BigInt &x, const BigInt &y) |
bool BOTAN_DLL | operator< (const X509_Time &, const X509_Time &) |
bool | operator< (const OID &a, const OID &b) |
bool | operator< (const X509_DN &dn1, const X509_DN &dn2) |
bool | operator< (const EAC_Time &t1, const EAC_Time &t2) |
bool | operator< (const BigInt &a, const BigInt &b) |
std::ostream & | operator<< (std::ostream &stream, const BigInt &n) |
int | operator<< (int fd, Pipe &pipe) |
BigInt | operator<< (const BigInt &x, size_t shift) |
BOTAN_DLL std::ostream & | operator<< (std::ostream &out, Pipe &pipe) |
bool BOTAN_DLL | operator<= (const X509_Time &, const X509_Time &) |
bool | operator<= (const EAC_Time &t1, const EAC_Time &t2) |
bool | operator<= (const BigInt &a, const BigInt &b) |
bool | operator== (const CRL_Entry &a1, const CRL_Entry &a2) |
bool | operator== (const AlgorithmIdentifier &a1, const AlgorithmIdentifier &a2) |
bool BOTAN_DLL | operator== (const X509_Time &, const X509_Time &) |
bool | operator== (const OctetString &s1, const OctetString &s2) |
bool | operator== (const ASN1_EAC_String &lhs, const ASN1_EAC_String &rhs) |
bool | operator== (const X509_DN &dn1, const X509_DN &dn2) |
bool | operator== (const EAC_Time &t1, const EAC_Time &t2) |
bool | operator== (const BigInt &a, const BigInt &b) |
bool BOTAN_DLL | operator> (const X509_Time &, const X509_Time &) |
bool | operator> (const EAC_Time &t1, const EAC_Time &t2) |
bool | operator> (const BigInt &a, const BigInt &b) |
bool BOTAN_DLL | operator>= (const X509_Time &, const X509_Time &) |
bool | operator>= (const EAC_Time &t1, const EAC_Time &t2) |
bool | operator>= (const BigInt &a, const BigInt &b) |
int | operator>> (int fd, Pipe &pipe) |
std::istream & | operator>> (std::istream &stream, BigInt &n) |
BigInt | operator>> (const BigInt &x, size_t shift) |
BOTAN_DLL std::istream & | operator>> (std::istream &in, Pipe &pipe) |
OctetString | operator^ (const OctetString &k1, const OctetString &k2) |
PointGFp | OS2ECP (const MemoryRegion< byte > &data, const CurveGFp &curve) |
PointGFp | OS2ECP (const byte data[], size_t data_len, const CurveGFp &curve) |
size_t | output_length_of (const std::string &name) |
std::vector< std::string > | parse_algorithm_name (const std::string &namex) |
std::vector< u32bit > | parse_asn1_oid (const std::string &oid) |
bool | passes_self_tests (Algorithm_Factory &af) |
SecureVector< byte > | PGP_decode (DataSource &source, std::string &label, std::map< std::string, std::string > &headers) |
SecureVector< byte > | PGP_decode (DataSource &source, std::string &label) |
std::string | PGP_encode (const byte input[], size_t length, const std::string &label, const std::map< std::string, std::string > &headers) |
std::string | PGP_encode (const byte input[], size_t length, const std::string &type) |
MemoryVector< byte > | pkcs_hash_id (const std::string &name) |
BigInt | power_mod (const BigInt &base, const BigInt &exp, const BigInt &mod) |
template<typename T > | |
bool | power_of_2 (T arg) |
template<typename T > | |
void | prefetch_readonly (const T *addr, size_t length) |
template<typename T > | |
void | prefetch_readwrite (const T *addr, size_t length) |
bool | primality_test (const BigInt &n, RandomNumberGenerator &rng, size_t level) |
bool | quick_check_prime (const BigInt &n, RandomNumberGenerator &rng) |
BigInt | random_prime (RandomNumberGenerator &rng, size_t bits, const BigInt &coprime, size_t equiv, size_t modulo) |
BigInt | random_safe_prime (RandomNumberGenerator &rng, size_t bits) |
BigInt BOTAN_DLL | ressol (const BigInt &x, const BigInt &p) |
const BlockCipher * | retrieve_block_cipher (const std::string &algo_spec) |
const HashFunction * | retrieve_hash (const std::string &algo_spec) |
const MessageAuthenticationCode * | retrieve_mac (const std::string &algo_spec) |
const StreamCipher * | retrieve_stream_cipher (const std::string &algo_spec) |
u16bit | reverse_bytes (u16bit val) |
u32bit | reverse_bytes (u32bit val) |
u64bit | reverse_bytes (u64bit val) |
SecureVector< byte > | rfc3394_keyunwrap (const MemoryRegion< byte > &key, const SymmetricKey &kek, Algorithm_Factory &af) |
SecureVector< byte > | rfc3394_keywrap (const MemoryRegion< byte > &key, const SymmetricKey &kek, Algorithm_Factory &af) |
template<typename T > | |
T | rotate_left (T input, size_t rot) |
template<typename T > | |
T | rotate_right (T input, size_t rot) |
template<typename T > | |
T | round_down (T n, T align_to) |
template<typename T > | |
T | round_up (T n, T align_to) |
template<typename T > | |
bool | same_mem (const T *p1, const T *p2, size_t n) |
template<typename K , typename V > | |
V | search_map (const std::map< K, V > &mapping, const K &key, const V &null_result=V()) |
template<typename T > | |
void | set_mem (T *ptr, size_t n, byte val) |
template<typename T > | |
size_t | significant_bytes (T n) |
std::vector< std::string > | split_on (const std::string &str, char delim) |
BigInt | square (const BigInt &x) |
std::pair< BigInt, SymmetricKey > | srp6_client_agree (const std::string &identifier, const std::string &password, const std::string &group_id, const std::string &hash_id, const MemoryRegion< byte > &salt, const BigInt &B, RandomNumberGenerator &rng) |
std::string | srp6_group_identifier (const BigInt &N, const BigInt &g) |
size_t | static_provider_weight (const std::string &prov_name) |
void | store_be (u16bit in, byte out[2]) |
void | store_be (u32bit in, byte out[4]) |
void | store_be (u64bit in, byte out[8]) |
template<typename T > | |
void | store_be (byte out[], T x0, T x1) |
template<typename T > | |
void | store_be (byte out[], T x0, T x1, T x2, T x3) |
template<typename T > | |
void | store_be (byte out[], T x0, T x1, T x2, T x3, T x4, T x5, T x6, T x7) |
void | store_le (u16bit in, byte out[2]) |
void | store_le (u32bit in, byte out[4]) |
void | store_le (u64bit in, byte out[8]) |
template<typename T > | |
void | store_le (byte out[], T x0, T x1) |
template<typename T > | |
void | store_le (byte out[], T x0, T x1, T x2, T x3) |
template<typename T > | |
void | store_le (byte out[], T x0, T x1, T x2, T x3, T x4, T x5, T x6, T x7) |
u32bit | string_to_ipv4 (const std::string &str) |
BigInt | sub_mul (const BigInt &a, const BigInt &b, const BigInt &c) |
u64bit | system_time () |
u32bit | timespec_to_u32bit (const std::string ×pec) |
std::string | to_string (u64bit n, size_t min_len) |
u32bit | to_u32bit (const std::string &number) |
void | unlock_mem (void *ptr, size_t bytes) |
bool | verify_prime (const BigInt &n, RandomNumberGenerator &rng) |
u32bit | version_datestamp () |
u32bit | version_major () |
u32bit | version_minor () |
u32bit | version_patch () |
std::string | version_string () |
void | word3_muladd (word *w2, word *w1, word *w0, word a, word b) |
void | word3_muladd_2 (word *w2, word *w1, word *w0, word a, word b) |
word | word8_add2 (word x[8], const word y[8], word carry) |
word | word8_add3 (word z[8], const word x[8], const word y[8], word carry) |
word | word8_linmul2 (word x[8], word y, word carry) |
word | word8_linmul3 (word z[8], const word x[8], word y, word carry) |
word | word8_linmul3 (word z[4], const word x[4], word y, word carry) |
word | word8_madd3 (word z[8], const word x[8], word y, word carry) |
word | word8_muladd (word z[8], const word x[8], word y, word carry) |
word | word8_sub2 (word x[8], const word y[8], word carry) |
word | word8_sub2_rev (word x[8], const word y[8], word carry) |
word | word8_sub3 (word z[8], const word x[8], const word y[8], word carry) |
word | word_add (word x, word y, word *carry) |
word | word_madd2 (word a, word b, word *c) |
word | word_madd3 (word a, word b, word c, word *d) |
word | word_sub (word x, word y, word *carry) |
bool | x500_name_cmp (const std::string &name1, const std::string &name2) |
void | xor_buf (byte out[], const byte in[], size_t length) |
void | xor_buf (byte out[], const byte in[], const byte in2[], size_t length) |
template<typename T > | |
void | zeroise (MemoryRegion< T > &vec) |
Variables | |
const u64bit | Camellia_SBOX1 [256] |
const u64bit | Camellia_SBOX2 [256] |
const u64bit | Camellia_SBOX3 [256] |
const u64bit | Camellia_SBOX4 [256] |
const u64bit | Camellia_SBOX5 [256] |
const u64bit | Camellia_SBOX6 [256] |
const u64bit | Camellia_SBOX7 [256] |
const u64bit | Camellia_SBOX8 [256] |
const u32bit | CAST_SBOX1 [256] |
const u32bit | CAST_SBOX2 [256] |
const u32bit | CAST_SBOX3 [256] |
const u32bit | CAST_SBOX4 [256] |
const u64bit | DES_FPTAB1 [256] |
const u64bit | DES_FPTAB2 [256] |
const u64bit | DES_IPTAB1 [256] |
const u64bit | DES_IPTAB2 [256] |
const u32bit | DES_SPBOX1 [256] |
const u32bit | DES_SPBOX2 [256] |
const u32bit | DES_SPBOX3 [256] |
const u32bit | DES_SPBOX4 [256] |
const u32bit | DES_SPBOX5 [256] |
const u32bit | DES_SPBOX6 [256] |
const u32bit | DES_SPBOX7 [256] |
const u32bit | DES_SPBOX8 [256] |
const size_t | HEX_CODEC_BUFFER_SIZE = 256 |
const size_t | MP_WORD_BITS = BOTAN_MP_WORD_BITS |
const word | MP_WORD_MASK = ~static_cast<word>(0) |
const word | MP_WORD_MAX = MP_WORD_MASK |
const word | MP_WORD_TOP_BIT = static_cast<word>(1) << (8*sizeof(word) - 1) |
const size_t | PRIME_TABLE_SIZE = 6541 |
const u16bit BOTAN_DLL | PRIMES [] |
Dynamically Loaded Engine (C) 2010 Jack Lloyd
Distributed under the terms of the Botan license
Dynamically Loaded Object (C) 2010 Jack Lloyd
Distributed under the terms of the Botan license
The primary namespace for the botan library
typedef unsigned char Botan::byte |
typedef EC_Group Botan::EC_Domain_Params |
Definition at line 139 of file ec_group.h.
typedef std::runtime_error Botan::Exception |
typedef std::invalid_argument Botan::Invalid_Argument |
typedef PK_Key_Agreement_Key Botan::PK_KA_Key |
typedef Private_Key Botan::PKCS8_PrivateKey |
typedef PBKDF Botan::S2K |
typedef signed int Botan::s32bit |
typedef OctetString Botan::SymmetricKey |
typedef unsigned short Botan::u16bit |
typedef unsigned int Botan::u32bit |
typedef unsigned long long Botan::u64bit |
typedef Public_Key Botan::X509_PublicKey |
enum Botan::Alert_Level |
Enumerator | |
---|---|
WARNING | |
FATAL |
Definition at line 57 of file tls_magic.h.
enum Botan::Alert_Type |
Definition at line 62 of file tls_magic.h.
enum Botan::ASN1_Tag |
ASN.1 Type and Class Tags
Definition at line 19 of file asn1_int.h.
Enumerator | |
---|---|
RSA_CERT | |
DSS_CERT | |
DH_RSA_CERT | |
DH_DSS_CERT |
Definition at line 92 of file tls_magic.h.
enum Botan::Character_Set |
The different charsets (nominally) supported by Botan.
Enumerator | |
---|---|
LOCAL_CHARSET | |
UCS2_CHARSET | |
UTF8_CHARSET | |
LATIN1_CHARSET |
enum Botan::Cipher_Dir |
The two possible directions for cipher filters, determining whether they actually perform encryption or decryption.
Enumerator | |
---|---|
ENCRYPTION | |
DECRYPTION |
Definition at line 87 of file sym_algo.h.
Definition at line 99 of file tls_magic.h.
Enumerator | |
---|---|
NO_COMPRESSION |
Definition at line 172 of file tls_magic.h.
Enumerator | |
---|---|
CLIENT | |
SERVER |
Definition at line 29 of file tls_magic.h.
enum Botan::CRL_Code |
X.509v2 CRL Reason Code.
Definition at line 43 of file pubkey_enums.h.
The type of checking to be performed by decoders: NONE - no checks, IGNORE_WS - perform checks, but ignore whitespaces, FULL_CHECK - perform checks, also complain about white spaces.
Enumerator | |
---|---|
NONE | |
IGNORE_WS | |
FULL_CHECK |
This class represents elliptic curce domain parameters
Enumerator | |
---|---|
EC_DOMPAR_ENC_EXPLICIT | |
EC_DOMPAR_ENC_IMPLICITCA | |
EC_DOMPAR_ENC_OID |
Definition at line 22 of file ec_group.h.
Enum marking if protection against fault attacks should be used
Enumerator | |
---|---|
ENABLE_FAULT_PROTECTION | |
DISABLE_FAULT_PROTECTION |
Definition at line 29 of file pubkey.h.
Enumerator | |
---|---|
HELLO_REQUEST | |
CLIENT_HELLO | |
CLIENT_HELLO_SSLV2 | |
SERVER_HELLO | |
CERTIFICATE | |
SERVER_KEX | |
CERTIFICATE_REQUEST | |
SERVER_HELLO_DONE | |
CERTIFICATE_VERIFY | |
CLIENT_KEX | |
FINISHED | |
HANDSHAKE_CCS | |
HANDSHAKE_NONE |
Definition at line 40 of file tls_magic.h.
X.509v3 Key Constraints.
Enumerator | |
---|---|
NO_CONSTRAINTS | |
DIGITAL_SIGNATURE | |
NON_REPUDIATION | |
KEY_ENCIPHERMENT | |
DATA_ENCIPHERMENT | |
KEY_AGREEMENT | |
KEY_CERT_SIGN | |
CRL_SIGN | |
ENCIPHER_ONLY | |
DECIPHER_ONLY |
Definition at line 18 of file pubkey_enums.h.
enum Botan::Record_Type |
Enumerator | |
---|---|
CONNECTION_CLOSED | |
CHANGE_CIPHER_SPEC | |
ALERT | |
HANDSHAKE | |
APPLICATION_DATA |
Definition at line 31 of file tls_magic.h.
The two types of signature format supported by Botan.
Enumerator | |
---|---|
IEEE_1363 | |
DER_SEQUENCE |
Definition at line 24 of file pubkey.h.
enum Botan::Size_Limits |
Protocol Constants for SSL/TLS
Enumerator | |
---|---|
MAX_PLAINTEXT_SIZE | |
MAX_COMPRESSED_SIZE | |
MAX_CIPHERTEXT_SIZE |
Definition at line 16 of file tls_magic.h.
Definition at line 145 of file tls_magic.h.
Definition at line 176 of file tls_magic.h.
enum Botan::Version_Code |
Enumerator | |
---|---|
NO_VERSION_SET | |
SSL_V3 | |
TLS_V10 | |
TLS_V11 |
Definition at line 22 of file tls_magic.h.
enum Botan::X509_Code |
X.509 Certificate Validation Result
Definition at line 20 of file x509stor.h.
enum Botan::X509_Encoding |
The two types of X509 encoding supported by Botan.
Enumerator | |
---|---|
RAW_BER | |
PEM |
Definition at line 67 of file pubkey_enums.h.
Return the absolute value
n | an integer |
Definition at line 44 of file numthry.h.
References Botan::BigInt::abs().
std::map< std::string, double > BOTAN_DLL Botan::algorithm_benchmark | ( | const std::string & | name, |
Algorithm_Factory & | af, | ||
RandomNumberGenerator & | rng, | ||
u32bit | milliseconds, | ||
size_t | buf_size | ||
) |
Algorithm benchmark
name | the name of the algorithm to test (cipher, hash, or MAC) |
af | the algorithm factory used to create objects |
rng | the rng to use to generate random inputs |
milliseconds | total time for the benchmark to run |
buf_size | size of buffer to benchmark against, in KiB |
Definition at line 122 of file benchmark.cpp.
References mac, Botan::Algorithm_Factory::prototype_block_cipher(), Botan::Algorithm_Factory::prototype_hash_function(), Botan::Algorithm_Factory::prototype_mac(), Botan::Algorithm_Factory::prototype_stream_cipher(), Botan::Algorithm_Factory::providers_of(), and Botan::RandomNumberGenerator::randomize().
BOTAN_DLL std::map< std::string, bool > Botan::algorithm_kat | ( | const SCAN_Name & | algo_name, |
const std::map< std::string, std::string > & | vars, | ||
Algorithm_Factory & | af | ||
) |
Run a set of algorithm KATs (known answer tests)
algo_name | the algorithm we are testing |
vars | a set of input variables for this test, all hex encoded. Keys used: "input", "output", "key", and "iv" |
af | an algorithm factory |
Definition at line 38 of file selftest.cpp.
References Botan::SCAN_Name::algo_name_and_args(), Botan::SCAN_Name::cipher_mode(), Botan::SCAN_Name::cipher_mode_pad(), DECRYPTION, ENCRYPTION, get_cipher_mode(), Botan::OctetString::length(), Botan::Algorithm_Factory::prototype_block_cipher(), Botan::Algorithm_Factory::prototype_hash_function(), Botan::Algorithm_Factory::prototype_mac(), Botan::Algorithm_Factory::prototype_stream_cipher(), Botan::Algorithm_Factory::providers_of(), search_map(), Botan::Keyed_Filter::set_iv(), Botan::Keyed_Filter::set_key(), and Botan::Keyed_Filter::valid_iv_length().
void BOTAN_DLL Botan::aont_package | ( | RandomNumberGenerator & | rng, |
BlockCipher * | cipher, | ||
const byte | input[], | ||
size_t | input_len, | ||
byte | output[] | ||
) |
Rivest's Package Tranform
rng | the random number generator to use |
cipher | the block cipher to use |
input | the input data buffer |
input_len | the length of the input data in bytes |
output | the output data buffer (must be at least input_len + cipher->BLOCK_SIZE bytes long) |
Definition at line 17 of file package.cpp.
References Botan::OctetString::begin(), Botan::BlockCipher::block_size(), clear_mem(), copy_mem(), Botan::BlockCipher::encrypt(), get_byte(), Botan::Pipe::process_msg(), Botan::Pipe::read(), Botan::Pipe::remaining(), Botan::SymmetricAlgorithm::set_key(), Botan::SymmetricAlgorithm::valid_keylength(), xor_buf(), and zeroise().
void BOTAN_DLL Botan::aont_unpackage | ( | BlockCipher * | cipher, |
const byte | input[], | ||
size_t | input_len, | ||
byte | output[] | ||
) |
Rivest's Package Tranform (Inversion)
cipher | the block cipher to use |
input | the input data buffer |
input_len | the length of the input data in bytes |
output | the output data buffer (must be at least input_len - cipher->BLOCK_SIZE bytes long) |
Definition at line 69 of file package.cpp.
References Botan::BlockCipher::block_size(), copy_mem(), Botan::BlockCipher::encrypt(), get_byte(), Botan::Pipe::process_msg(), Botan::Pipe::read(), Botan::Pipe::remaining(), Botan::SymmetricAlgorithm::set_key(), Botan::SymmetricAlgorithm::valid_keylength(), xor_buf(), and zeroise().
void Botan::append_tls_length_value | ( | MemoryRegion< byte > & | buf, |
const T * | vals, | ||
size_t | vals_size, | ||
size_t | tag_size | ||
) |
Helper function for encoding length-tagged vectors
Definition at line 145 of file tls_reader.h.
References get_byte(), and Botan::MemoryRegion< T >::push_back().
Referenced by append_tls_length_value().
void Botan::append_tls_length_value | ( | MemoryRegion< byte > & | buf, |
const MemoryRegion< T > & | vals, | ||
size_t | tag_size | ||
) |
Definition at line 169 of file tls_reader.h.
References append_tls_length_value(), and Botan::MemoryRegion< T >::size().
void Botan::append_tls_length_value | ( | MemoryRegion< byte > & | buf, |
const std::vector< T > & | vals, | ||
size_t | tag_size | ||
) |
Definition at line 177 of file tls_reader.h.
References append_tls_length_value(), and Botan::MemoryRegion< T >::size().
void Botan::assertion_failure | ( | const char * | expr_str, |
const char * | msg, | ||
const char * | func, | ||
const char * | file, | ||
int | line | ||
) |
Definition at line 14 of file assert.cpp.
size_t BOTAN_DLL Botan::base64_decode | ( | byte | output[], |
const char | input[], | ||
size_t | input_length, | ||
size_t & | input_consumed, | ||
bool | final_inputs, | ||
bool | ignore_ws = true |
||
) |
Perform base64 decoding
output | an array of at least input_length*3/4 bytes |
input | some base64 input |
input_length | length of input in bytes |
input_consumed | is an output parameter which says how many bytes of input were actually consumed. If less than input_length, then the range input[consumed:length] should be passed in later along with more input. |
final_inputs | true iff this is the last input, in which case padding is allowed |
ignore_ws | ignore whitespace on input; if false, throw an exception if whitespace is encountered |
Definition at line 100 of file base64.cpp.
References clear_mem().
Referenced by base64_decode(), Botan::Base64_Decoder::end_msg(), and Botan::Base64_Decoder::write().
size_t BOTAN_DLL Botan::base64_decode | ( | byte | output[], |
const char | input[], | ||
size_t | input_length, | ||
bool | ignore_ws = true |
||
) |
Perform base64 decoding
output | an array of at least input_length*3/4 bytes |
input | some base64 input |
input_length | length of input in bytes |
ignore_ws | ignore whitespace on input; if false, throw an exception if whitespace is encountered |
Definition at line 207 of file base64.cpp.
References base64_decode().
size_t BOTAN_DLL Botan::base64_decode | ( | byte | output[], |
const std::string & | input, | ||
bool | ignore_ws = true |
||
) |
Perform base64 decoding
output | an array of at least input_length/3*4 bytes |
input | some base64 input |
ignore_ws | ignore whitespace on input; if false, throw an exception if whitespace is encountered |
Definition at line 222 of file base64.cpp.
References base64_decode().
SecureVector< byte > BOTAN_DLL Botan::base64_decode | ( | const char | input[], |
size_t | input_length, | ||
bool | ignore_ws = true |
||
) |
Perform base64 decoding
input | some base64 input |
input_length | the length of input in bytes |
ignore_ws | ignore whitespace on input; if false, throw an exception if whitespace is encountered |
Definition at line 229 of file base64.cpp.
References base64_decode(), and Botan::MemoryRegion< T >::resize().
SecureVector< byte > BOTAN_DLL Botan::base64_decode | ( | const std::string & | input, |
bool | ignore_ws = true |
||
) |
Perform base64 decoding
input | some base64 input |
ignore_ws | ignore whitespace on input; if false, throw an exception if whitespace is encountered |
Definition at line 244 of file base64.cpp.
References base64_decode().
size_t BOTAN_DLL Botan::base64_encode | ( | char | output[], |
const byte | input[], | ||
size_t | input_length, | ||
size_t & | input_consumed, | ||
bool | final_inputs | ||
) |
Perform base64 encoding
output | an array of at least input_length*4/3 bytes |
input | is some binary data |
input_length | length of input in bytes |
input_consumed | is an output parameter which says how many bytes of input were actually consumed. If less than input_length, then the range input[consumed:length] should be passed in later along with more input. |
final_inputs | true iff this is the last input, in which case padding chars will be applied if needed |
Definition at line 36 of file base64.cpp.
Referenced by base64_encode().
std::string BOTAN_DLL Botan::base64_encode | ( | const byte | input[], |
size_t | input_length | ||
) |
Perform base64 encoding
input | some input |
input_length | length of input in bytes |
Definition at line 79 of file base64.cpp.
References base64_encode(), and BOTAN_ASSERT_EQUAL.
std::string BOTAN_DLL Botan::base64_encode | ( | const MemoryRegion< byte > & | input | ) |
Perform base64 encoding
input | some input |
Definition at line 95 of file base64.cpp.
References base64_encode(), and Botan::MemoryRegion< T >::size().
|
inline |
void Botan::bigint_add2 | ( | word | x[], |
size_t | x_size, | ||
const word | y[], | ||
size_t | y_size | ||
) |
Definition at line 68 of file mp_asm.cpp.
References bigint_add2_nc().
Referenced by mul_add(), Botan::BigInt::operator+=(), and Botan::BigInt::operator-=().
word Botan::bigint_add2_nc | ( | word | x[], |
size_t | x_size, | ||
const word | y[], | ||
size_t | y_size | ||
) |
Definition at line 22 of file mp_asm.cpp.
References word8_add2(), and word_add().
Referenced by bigint_add2().
void Botan::bigint_add3 | ( | word | z[], |
const word | x[], | ||
size_t | x_size, | ||
const word | y[], | ||
size_t | y_size | ||
) |
Definition at line 77 of file mp_asm.cpp.
References bigint_add3_nc().
Referenced by operator+(), and operator-().
word Botan::bigint_add3_nc | ( | word | z[], |
const word | x[], | ||
size_t | x_size, | ||
const word | y[], | ||
size_t | y_size | ||
) |
Definition at line 43 of file mp_asm.cpp.
References word8_add3(), and word_add().
Referenced by bigint_add3().
s32bit Botan::bigint_cmp | ( | const word | x[], |
size_t | x_size, | ||
const word | y[], | ||
size_t | y_size | ||
) |
Compare x and y
Definition at line 41 of file mp_misc.cpp.
Referenced by Botan::BigInt::cmp(), operator+(), Botan::BigInt::operator+=(), operator-(), and Botan::BigInt::operator-=().
void Botan::bigint_comba_mul16 | ( | word | z[32], |
const word | x[16], | ||
const word | y[16] | ||
) |
Definition at line 594 of file mp_comba.cpp.
References word3_muladd().
Referenced by bigint_mul().
void Botan::bigint_comba_mul4 | ( | word | z[8], |
const word | x[4], | ||
const word | y[4] | ||
) |
Definition at line 51 of file mp_comba.cpp.
References word3_muladd().
Referenced by bigint_mul().
void Botan::bigint_comba_mul6 | ( | word | z[12], |
const word | x[6], | ||
const word | y[6] | ||
) |
Definition at line 142 of file mp_comba.cpp.
References word3_muladd().
Referenced by bigint_mul().
void Botan::bigint_comba_mul8 | ( | word | z[16], |
const word | x[8], | ||
const word | y[8] | ||
) |
Definition at line 284 of file mp_comba.cpp.
References word3_muladd().
Referenced by bigint_mul().
void Botan::bigint_comba_sqr16 | ( | word | z[32], |
const word | x[16] | ||
) |
Definition at line 387 of file mp_comba.cpp.
References word3_muladd(), and word3_muladd_2().
Referenced by bigint_sqr().
void Botan::bigint_comba_sqr4 | ( | word | z[8], |
const word | x[4] | ||
) |
Definition at line 18 of file mp_comba.cpp.
References word3_muladd(), and word3_muladd_2().
Referenced by bigint_sqr().
void Botan::bigint_comba_sqr6 | ( | word | z[12], |
const word | x[6] | ||
) |
Definition at line 90 of file mp_comba.cpp.
References word3_muladd(), and word3_muladd_2().
Referenced by bigint_sqr().
void Botan::bigint_comba_sqr8 | ( | word | z[16], |
const word | x[8] | ||
) |
Definition at line 209 of file mp_comba.cpp.
References word3_muladd(), and word3_muladd_2().
Referenced by bigint_sqr().
size_t Botan::bigint_divcore | ( | word | q, |
word | y2, | ||
word | y1, | ||
word | x3, | ||
word | x2, | ||
word | x1 | ||
) |
word Botan::bigint_divop | ( | word | n1, |
word | n0, | ||
word | d | ||
) |
Compute ((n1<<bits) + n0) / d
Definition at line 67 of file mp_misc.cpp.
References MP_WORD_BITS, and MP_WORD_TOP_BIT.
Referenced by bigint_modop(), and divide().
void Botan::bigint_linmul2 | ( | word | x[], |
size_t | x_size, | ||
word | y | ||
) |
Definition at line 149 of file mp_asm.cpp.
References word8_linmul2(), and word_madd2().
Referenced by Botan::BigInt::operator*=().
void Botan::bigint_linmul3 | ( | word | z[], |
const word | x[], | ||
size_t | x_size, | ||
word | y | ||
) |
Definition at line 167 of file mp_asm.cpp.
References word8_linmul3(), and word_madd2().
Referenced by bigint_mul(), bigint_sqr(), operator*(), and Botan::BigInt::operator*=().
word Botan::bigint_modop | ( | word | n1, |
word | n0, | ||
word | d | ||
) |
Compute ((n1<<bits) + n0) % d
Definition at line 92 of file mp_misc.cpp.
References bigint_divop(), and word_madd2().
Referenced by operator%(), and Botan::BigInt::operator%=().
void Botan::bigint_monty_mul | ( | word | z[], |
size_t | z_size, | ||
const word | x[], | ||
size_t | x_size, | ||
size_t | x_sw, | ||
const word | y[], | ||
size_t | y_size, | ||
size_t | y_sw, | ||
const word | p[], | ||
size_t | p_size, | ||
word | p_dash, | ||
word | workspace[] | ||
) |
Definition at line 69 of file mp_monty.cpp.
References bigint_monty_redc(), and bigint_mul().
Referenced by Botan::Montgomery_Exponentiator::execute(), and Botan::Montgomery_Exponentiator::set_base().
void Botan::bigint_monty_redc | ( | word | z[], |
size_t | z_size, | ||
const word | p[], | ||
size_t | p_size, | ||
word | p_dash, | ||
word | workspace[] | ||
) |
Montgomery Reduction
z | integer to reduce (also output in first p_size+1 words) |
z_size | size of z (should be >= 2*p_size+1) |
p | modulus |
p_size | size of p |
p_dash | Montgomery value |
workspace | array of at least 2*(p_size+1) words |
Definition at line 21 of file mp_monty.cpp.
References clear_mem(), copy_mem(), word8_madd3(), word_madd3(), and word_sub().
Referenced by bigint_monty_mul(), bigint_monty_sqr(), and Botan::Montgomery_Exponentiator::execute().
void Botan::bigint_monty_sqr | ( | word | z[], |
size_t | z_size, | ||
const word | x[], | ||
size_t | x_size, | ||
size_t | x_sw, | ||
const word | p[], | ||
size_t | p_size, | ||
word | p_dash, | ||
word | workspace[] | ||
) |
Definition at line 84 of file mp_monty.cpp.
References bigint_monty_redc(), and bigint_sqr().
Referenced by Botan::Montgomery_Exponentiator::execute().
void Botan::bigint_mul | ( | word | z[], |
size_t | z_size, | ||
word | workspace[], | ||
const word | x[], | ||
size_t | x_size, | ||
size_t | x_sw, | ||
const word | y[], | ||
size_t | y_size, | ||
size_t | y_sw | ||
) |
Definition at line 248 of file mp_karat.cpp.
References bigint_comba_mul16(), bigint_comba_mul4(), bigint_comba_mul6(), bigint_comba_mul8(), bigint_linmul3(), bigint_simple_mul(), and clear_mem().
Referenced by bigint_monty_mul(), mul_add(), operator*(), and Botan::BigInt::operator*=().
void Botan::bigint_shl1 | ( | word | x[], |
size_t | x_size, | ||
size_t | word_shift, | ||
size_t | bit_shift | ||
) |
Definition at line 18 of file mp_shift.cpp.
References clear_mem(), and MP_WORD_BITS.
Referenced by Botan::BigInt::operator-=(), and Botan::BigInt::operator<<=().
void Botan::bigint_shl2 | ( | word | y[], |
const word | x[], | ||
size_t | x_size, | ||
size_t | word_shift, | ||
size_t | bit_shift | ||
) |
Definition at line 97 of file mp_shift.cpp.
References MP_WORD_BITS.
Referenced by operator-(), and operator<<().
void Botan::bigint_shr1 | ( | word | x[], |
size_t | x_size, | ||
size_t | word_shift, | ||
size_t | bit_shift | ||
) |
Definition at line 42 of file mp_shift.cpp.
References clear_mem(), copy_mem(), and MP_WORD_BITS.
Referenced by Botan::BigInt::operator>>=().
void Botan::bigint_shr2 | ( | word | y[], |
const word | x[], | ||
size_t | x_size, | ||
size_t | word_shift, | ||
size_t | bit_shift | ||
) |
void Botan::bigint_simple_mul | ( | word | z[], |
const word | x[], | ||
size_t | x_size, | ||
const word | y[], | ||
size_t | y_size | ||
) |
Definition at line 20 of file mp_mulop.cpp.
References clear_mem(), word8_madd3(), and word_madd3().
Referenced by bigint_mul().
void Botan::bigint_simple_sqr | ( | word | z[], |
const word | x[], | ||
size_t | x_size | ||
) |
Definition at line 54 of file mp_mulop.cpp.
References clear_mem(), word8_madd3(), and word_madd3().
Referenced by bigint_sqr().
void Botan::bigint_sqr | ( | word | z[], |
size_t | z_size, | ||
word | workspace[], | ||
const word | x[], | ||
size_t | x_size, | ||
size_t | x_sw | ||
) |
Definition at line 303 of file mp_karat.cpp.
References bigint_comba_sqr16(), bigint_comba_sqr4(), bigint_comba_sqr6(), bigint_comba_sqr8(), bigint_linmul3(), bigint_simple_sqr(), and clear_mem().
Referenced by bigint_monty_sqr(), and square().
word Botan::bigint_sub2 | ( | word | x[], |
size_t | x_size, | ||
const word | y[], | ||
size_t | y_size | ||
) |
Definition at line 87 of file mp_asm.cpp.
References word8_sub2(), and word_sub().
Referenced by Botan::BigInt::operator+=(), and Botan::BigInt::operator-=().
void Botan::bigint_sub2_rev | ( | word | x[], |
const word | y[], | ||
size_t | y_size | ||
) |
x = y - x; assumes y >= x
Definition at line 108 of file mp_asm.cpp.
References word8_sub2_rev(), and word_sub().
Referenced by Botan::BigInt::operator-=().
word Botan::bigint_sub3 | ( | word | z[], |
const word | x[], | ||
size_t | x_size, | ||
const word | y[], | ||
size_t | y_size | ||
) |
Definition at line 127 of file mp_asm.cpp.
References word8_sub3(), and word_sub().
Referenced by operator+(), Botan::BigInt::operator+=(), and operator-().
BOTAN_DLL size_t Botan::block_size_of | ( | const std::string & | algo_spec | ) |
Find out the block size of a certain symmetric algorithm.
algo_spec | the name of the algorithm |
Definition at line 35 of file lookup.cpp.
References Botan::Library_State::algorithm_factory(), Botan::Global_State_Management::global_state(), Botan::Algorithm_Factory::prototype_block_cipher(), and Botan::Algorithm_Factory::prototype_hash_function().
Referenced by Botan::SessionKeys::SessionKeys(), Botan::Record_Writer::set_keys(), and Botan::Record_Reader::set_keys().
MD4 compression function in x86-32 asm
digest | the current digest |
input | the input block |
M | the message buffer |
Entry point for Serpent decryption in x86 asm
in | the input block |
out | the output block |
ks | the key schedule |
Referenced by Botan::Serpent_X86_32::decrypt_n().
Entry point for Serpent encryption in x86 asm
in | the input block |
out | the output block |
ks | the key schedule |
Referenced by Botan::Serpent_X86_32::encrypt_n().
void Botan::botan_serpent_x86_32_key_schedule | ( | u32bit | ks[140] | ) |
Entry point for Serpent key schedule in x86 asm
ks | holds the initial working key (padded), and is set to the final key schedule |
|
inline |
Swap 4 Ts in an array
Definition at line 112 of file bswap.h.
References reverse_bytes().
Referenced by load_be(), and load_le().
BOTAN_DLL calendar_point Botan::calendar_value | ( | u64bit | time_point | ) |
time_point | a time point from the system clock |
Definition at line 81 of file time.cpp.
Referenced by Botan::EAC_Time::EAC_Time(), and Botan::X509_Time::X509_Time().
bool BOTAN_DLL Botan::check_bcrypt | ( | const std::string & | password, |
const std::string & | hash | ||
) |
Check a previously created password hash
password | the password to check against |
hash | the stored hash to check against |
Definition at line 128 of file bcrypt.cpp.
References to_u32bit().
bool BOTAN_DLL Botan::check_passhash9 | ( | const std::string & | password, |
const std::string & | hash | ||
) |
Check a previously created password hash
password | the password to check against |
hash | the stored hash to check against |
Definition at line 84 of file passhash9.cpp.
References Botan::OctetString::bits_of(), Botan::PKCS5_PBKDF2::derive_key(), Botan::Pipe::end_msg(), load_be< u16bit >(), Botan::Pipe::read_all(), same_mem(), Botan::MemoryRegion< T >::size(), Botan::Pipe::start_msg(), and Botan::Pipe::write().
|
inline |
Check for primality
n | a positive integer to test for primality |
rng | a random number generator |
Definition at line 143 of file numthry.h.
References primality_test().
Referenced by Botan::IF_Scheme_PrivateKey::check_key(), Botan::DL_Group::DL_Group(), generate_dsa_primes(), random_prime(), random_safe_prime(), and Botan::DL_Group::verify_group().
BOTAN_DLL PK_Signer * Botan::choose_sig_format | ( | const Private_Key & | key, |
const std::string & | hash_fn, | ||
AlgorithmIdentifier & | alg_id | ||
) |
Choose the default signature format for a certain public key signature scheme.
key | will be the key to choose a padding scheme for |
hash_fn | is the desired hash function |
alg_id | will be set to the chosen scheme |
Definition at line 218 of file x509_ca.cpp.
References Botan::Public_Key::algo_name(), algo_name, Botan::Public_Key::algorithm_identifier(), DER_SEQUENCE, IEEE_1363, Botan::OIDS::lookup(), Botan::Public_Key::max_input_bits(), Botan::Public_Key::message_parts(), Botan::Algorithm::name(), Botan::AlgorithmIdentifier::oid, Botan::Buffered_Computation::output_length(), Botan::AlgorithmIdentifier::parameters, and retrieve_hash().
Referenced by Botan::X509::create_cert_req(), Botan::X509::create_self_signed_cert(), and Botan::X509_CA::X509_CA().
|
inline |
Zeroize memory
ptr | a pointer to an array |
n | the number of Ts pointed to by ptr |
Definition at line 32 of file mem_ops.h.
Referenced by aont_package(), base64_decode(), bigint_monty_redc(), bigint_mul(), bigint_shl1(), bigint_shr1(), bigint_simple_mul(), bigint_simple_sqr(), bigint_sqr(), hex_decode(), Botan::Unix_EntropySource::poll(), Botan::MemoryRegion< T >::resize(), and zeroise().
BOTAN_DLL void Botan::confirm_startup_self_tests | ( | Algorithm_Factory & | af | ) |
Run a set of self tests on some basic algorithms like AES and SHA-1
af | an algorithm factory |
Self_Test_Error | if a failure occured |
Definition at line 226 of file selftest.cpp.
Referenced by Botan::Library_State::initialize(), and passes_self_tests().
OutputIterator Botan::copy_if | ( | InputIterator | current, |
InputIterator | end, | ||
OutputIterator | dest, | ||
Predicate | copy_p | ||
) |
Copy-on-Predicate Algorithm
current | the first iterator value |
end | the final iterator value |
dest | an output iterator |
copy_p | the predicate |
Definition at line 23 of file stl_util.h.
|
inline |
Copy memory
out | the destination array |
in | the source array |
n | the number of elements of in/out |
Definition at line 22 of file mem_ops.h.
Referenced by aont_package(), aont_unpackage(), Botan::BigInt::assign(), bigint_monty_redc(), bigint_shr1(), Botan::MemoryRegion< word >::copy(), Botan::BER_Decoder::decode(), Botan::CryptoBox::encrypt(), Botan::Record_Reader::get_record(), Botan::BigInt::operator+=(), operator+=(), Botan::DataSource_Memory::peek(), Botan::ANSI_X931_RNG::randomize(), Botan::Randpool::randomize(), Botan::HMAC_RNG::randomize(), Botan::DataSource_Memory::read(), Botan::MemoryRegion< T >::resize(), rfc3394_keyunwrap(), rfc3394_keywrap(), Botan::CMS_Encoder::set_data(), Botan::Serpent::set_round_keys(), Botan::PK_Verifier_Filter::set_signature(), Botan::Buffered_Filter::write(), Botan::Hex_Decoder::write(), and Botan::Base64_Decoder::write().
BOTAN_DLL AlternativeName Botan::create_alt_name | ( | const Data_Store & | info | ) |
Definition at line 442 of file x509cert.cpp.
References Botan::AlternativeName::add_attribute(), Botan::PEM_Code::matches(), Botan::Data_Store::search_with(), and split_on().
Referenced by Botan::PKCS10_Request::subject_alt_name().
BOTAN_DLL X509_DN Botan::create_dn | ( | const Data_Store & | info | ) |
Definition at line 414 of file x509cert.cpp.
References Botan::X509_DN::add_attribute(), and Botan::Data_Store::search_with().
Referenced by Botan::X509_Certificate::issuer_dn(), Botan::X509_CRL::issuer_dn(), Botan::PKCS10_Request::subject_dn(), and Botan::X509_Certificate::subject_dn().
|
inline |
Count the trailing zero bits in n
n | an integer value |
Definition at line 93 of file bit_ops.h.
Referenced by low_zero_bits().
ECDSA_Signature Botan::decode_concatenation | ( | const MemoryRegion< byte > & | concat | ) |
Definition at line 46 of file ecdsa_sig.cpp.
References Botan::BigInt::decode(), r, s, and Botan::MemoryRegion< T >::size().
Referenced by Botan::EAC1_1_gen_CVC< Derived >::decode_info().
BOTAN_DLL ECDSA_PublicKey * Botan::decode_eac1_1_key | ( | const MemoryRegion< byte > & | enc_key, |
AlgorithmIdentifier & | sig_algo | ||
) |
Decode an EAC encoding ECDSA key
Definition at line 91 of file cvc_cert.cpp.
void Botan::delete2nd | ( | Pair & | pair | ) |
Delete the second half of a pair of objects
Definition at line 67 of file stl_util.h.
BigInt Division
x | an integer |
y | a non-zero integer |
q | will be set to x / y |
r | will be set to x % y |
Definition at line 34 of file divide.cpp.
References bigint_divcore(), bigint_divop(), Botan::BigInt::cmp(), Botan::BigInt::get_reg(), Botan::BigInt::is_negative(), Botan::BigInt::is_zero(), MP_WORD_BITS, MP_WORD_MAX, MP_WORD_TOP_BIT, n, Botan::BigInt::Positive, Botan::MemoryRegion< T >::resize(), Botan::BigInt::set_sign(), Botan::BigInt::sig_words(), and Botan::BigInt::word_at().
Referenced by Botan::BigInt::encode(), operator%(), and operator/().
size_t Botan::dl_work_factor | ( | size_t | prime_group_size | ) |
Estimate work factor for discrete logarithm
prime_group_size | size of the group in bits |
Definition at line 14 of file workfactor.cpp.
Referenced by Botan::DH_PrivateKey::DH_PrivateKey(), Botan::DL_Group::DL_Group(), Botan::ElGamal_PrivateKey::ElGamal_PrivateKey(), and Botan::ElGamal_Encryption_Operation::encrypt().
SecureVector< byte > BOTAN_DLL Botan::EC2OSP | ( | const PointGFp & | point, |
byte | format | ||
) |
Definition at line 482 of file point_gfp.cpp.
References Botan::BigInt::bytes(), Botan::PointGFp::COMPRESSED, Botan::BigInt::encode_1363(), Botan::PointGFp::get_affine_x(), Botan::PointGFp::get_affine_y(), Botan::BigInt::get_bit(), Botan::PointGFp::get_curve(), Botan::CurveGFp::get_p(), Botan::PointGFp::HYBRID, Botan::PointGFp::is_zero(), Botan::MemoryRegion< T >::push_back(), and Botan::PointGFp::UNCOMPRESSED.
Referenced by Botan::EC_Group::DER_encode(), Botan::ECDH_PublicKey::public_value(), and Botan::EC_PublicKey::x509_subject_public_key().
Compute the greatest common divisor
x | a positive integer |
y | a positive integer |
Definition at line 167 of file numthry.cpp.
References Botan::BigInt::is_nonzero(), Botan::BigInt::is_zero(), low_zero_bits(), Botan::BigInt::Positive, and Botan::BigInt::set_sign().
Referenced by lcm(), and random_prime().
std::string BOTAN_DLL Botan::generate_bcrypt | ( | const std::string & | password, |
RandomNumberGenerator & | rng, | ||
u16bit | work_factor = 10 |
||
) |
Create a password hash using Bcrypt
password | the password |
rng | a random number generator |
work_factor | how much work to do to slow down guessing attacks |
Definition at line 121 of file bcrypt.cpp.
References Botan::RandomNumberGenerator::random_vec().
bool BOTAN_DLL Botan::generate_dsa_primes | ( | RandomNumberGenerator & | rng, |
Algorithm_Factory & | af, | ||
BigInt & | p_out, | ||
BigInt & | q_out, | ||
size_t | pbits, | ||
size_t | qbits, | ||
const MemoryRegion< byte > & | seed | ||
) |
Generate DSA parameters using the FIPS 186 kosherizer
rng | a random number generator |
af | an algorithm factory |
p_out | where the prime p will be stored |
q_out | where the prime q will be stored |
pbits | how long p will be in bits |
qbits | how long q will be in bits |
seed | the seed used to generate the parameters |
Definition at line 41 of file dsa_gen.cpp.
References Botan::BigInt::binary_decode(), Botan::BigInt::bits(), check_prime(), Botan::Algorithm_Factory::make_hash_function(), n, s, Botan::BigInt::set_bit(), Botan::MemoryRegion< T >::size(), and to_string().
Referenced by Botan::DL_Group::DL_Group(), and generate_dsa_primes().
SecureVector< byte > BOTAN_DLL Botan::generate_dsa_primes | ( | RandomNumberGenerator & | rng, |
Algorithm_Factory & | af, | ||
BigInt & | p_out, | ||
BigInt & | q_out, | ||
size_t | pbits, | ||
size_t | qbits | ||
) |
Generate DSA parameters using the FIPS 186 kosherizer
rng | a random number generator |
af | an algorithm factory |
p_out | where the prime p will be stored |
q_out | where the prime q will be stored |
pbits | how long p will be in bits |
qbits | how long q will be in bits |
Definition at line 119 of file dsa_gen.cpp.
References generate_dsa_primes(), and Botan::RandomNumberGenerator::random_vec().
std::string BOTAN_DLL Botan::generate_passhash9 | ( | const std::string & | password, |
RandomNumberGenerator & | rng, | ||
u16bit | work_factor = 10 , |
||
byte | alg_id = 0 |
||
) |
Create a password hash using PBKDF2
password | the password |
rng | a random number generator |
work_factor | how much work to do to slow down guessing attacks |
alg_id | specifies which PRF to use with PBKDF2 0 is HMAC(SHA-1) 1 is HMAC(SHA-256) 2 is CMAC(Blowfish) all other values are currently undefined |
Definition at line 48 of file passhash9.cpp.
References Botan::PKCS5_PBKDF2::derive_key(), Botan::Pipe::end_msg(), get_byte(), Botan::RandomNumberGenerator::randomize(), Botan::Pipe::read_all_as_string(), Botan::MemoryRegion< T >::size(), Botan::Pipe::start_msg(), to_string(), and Botan::Pipe::write().
BigInt BOTAN_DLL Botan::generate_srp6_verifier | ( | const std::string & | identifier, |
const std::string & | password, | ||
const MemoryRegion< byte > & | salt, | ||
const std::string & | group_id, | ||
const std::string & | hash_id | ||
) |
Generate a new SRP-6 verifier
identifier | a username or other client identifier |
password | the secret used to authenticate user |
salt | a randomly chosen value, at least 128 bits long |
Definition at line 130 of file srp6.cpp.
References Botan::DL_Group::get_g(), Botan::DL_Group::get_p(), and power_mod().
|
inline |
Block cipher factory method.
algo_spec | the name of the desired block cipher |
Definition at line 87 of file lookup.h.
References Botan::Library_State::algorithm_factory(), Botan::Global_State_Management::global_state(), and Botan::Algorithm_Factory::make_block_cipher().
|
inline |
Byte extraction
byte_num | which byte to extract, 0 == highest byte |
input | the value to extract from |
Definition at line 21 of file get_byte.h.
Referenced by aont_package(), aont_unpackage(), append_tls_length_value(), Botan::BigInt::byte_at(), Botan::CryptoBox::decrypt(), Botan::DES::decrypt_n(), Botan::Square::decrypt_n(), Botan::Twofish::decrypt_n(), Botan::Blowfish::decrypt_n(), Botan::TripleDES::decrypt_n(), Botan::CryptoBox::encrypt(), Botan::Square::encrypt_n(), Botan::Twofish::encrypt_n(), Botan::DES::encrypt_n(), Botan::Blowfish::encrypt_n(), Botan::TripleDES::encrypt_n(), generate_passhash9(), Botan::Record_Reader::get_record(), ipv4_to_string(), Botan::Turing::set_iv(), significant_bytes(), Botan::RTSS_Share::split(), store_be(), store_le(), and Botan::Buffered_Computation::update_be().
BOTAN_DLL Keyed_Filter * Botan::get_cipher | ( | const std::string & | algo_spec, |
Cipher_Dir | direction | ||
) |
Factory method for general symmetric cipher filters. No key will be set in the filter.
algo_spec | the name of the desired cipher |
direction | determines whether the filter will be an encrypting or decrypting filter |
Definition at line 124 of file lookup.cpp.
References Botan::Library_State::algorithm_factory(), Botan::Global_State_Management::global_state(), and Botan::Algorithm_Factory::Engine_Iterator::next().
Referenced by Botan::CryptoBox::decrypt(), Botan::CryptoBox::encrypt(), get_cipher(), Botan::Record_Writer::set_keys(), and Botan::Record_Reader::set_keys().
BOTAN_DLL Keyed_Filter * Botan::get_cipher | ( | const std::string & | algo_spec, |
const SymmetricKey & | key, | ||
const InitializationVector & | iv, | ||
Cipher_Dir | direction | ||
) |
Factory method for general symmetric cipher filters.
algo_spec | the name of the desired cipher |
key | the key to be used for encryption/decryption performed by the filter |
iv | the initialization vector to be used |
direction | determines whether the filter will be an encrypting or decrypting filter |
Definition at line 143 of file lookup.cpp.
References get_cipher(), Botan::OctetString::length(), Botan::Keyed_Filter::set_iv(), and Botan::Keyed_Filter::set_key().
BOTAN_DLL Keyed_Filter * Botan::get_cipher | ( | const std::string & | algo_spec, |
const SymmetricKey & | key, | ||
Cipher_Dir | direction | ||
) |
Factory method for general symmetric cipher filters.
algo_spec | the name of the desired cipher |
key | the key to be used for encryption/decryption performed by the filter |
direction | determines whether the filter will be an encrypting or decrypting filter |
Definition at line 160 of file lookup.cpp.
References get_cipher().
Keyed_Filter * Botan::get_cipher_mode | ( | const BlockCipher * | block_cipher, |
Cipher_Dir | direction, | ||
const std::string & | mode, | ||
const std::string & | padding | ||
) |
Create a cipher mode filter object
block_cipher | a block cipher object |
direction | are we encrypting or decrypting? |
mode | the name of the cipher mode to use |
padding | the mode padding to use (only used for ECB, CBC) |
Definition at line 77 of file core_modes.cpp.
References Botan::BlockCipher::block_size(), Botan::BlockCipher::clone(), ENCRYPTION, parse_algorithm_name(), and to_u32bit().
Referenced by algorithm_kat(), and Botan::Core_Engine::get_cipher().
BOTAN_DLL EME * Botan::get_eme | ( | const std::string & | algo_spec | ) |
Factory method for EME (message-encoding methods for encryption) objects
algo_spec | the name of the EME to create |
Definition at line 143 of file get_enc.cpp.
References Botan::SCAN_Name::algo_name(), Botan::Library_State::algorithm_factory(), Botan::SCAN_Name::arg(), Botan::SCAN_Name::arg_count(), Botan::SCAN_Name::arg_count_between(), Botan::Global_State_Management::global_state(), and Botan::Algorithm_Factory::make_hash_function().
Referenced by Botan::PK_Decryptor_EME::PK_Decryptor_EME(), and Botan::PK_Encryptor_EME::PK_Encryptor_EME().
BOTAN_DLL EMSA * Botan::get_emsa | ( | const std::string & | algo_spec | ) |
Factory method for EMSA (message-encoding methods for signatures with appendix) objects
algo_spec | the name of the EME to create |
Definition at line 86 of file get_enc.cpp.
References Botan::SCAN_Name::algo_name(), Botan::Library_State::algorithm_factory(), Botan::SCAN_Name::arg(), Botan::SCAN_Name::arg_as_integer(), Botan::SCAN_Name::arg_count(), Botan::SCAN_Name::arg_count_between(), Botan::Global_State_Management::global_state(), and Botan::Algorithm_Factory::make_hash_function().
Referenced by Botan::PK_Signer::PK_Signer(), and Botan::PK_Verifier::PK_Verifier().
|
inline |
Hash function factory method.
algo_spec | the name of the desired hash function |
Definition at line 113 of file lookup.h.
References Botan::Library_State::algorithm_factory(), Botan::Global_State_Management::global_state(), and Botan::Algorithm_Factory::make_hash_function().
BOTAN_DLL KDF * Botan::get_kdf | ( | const std::string & | algo_spec | ) |
Factory method for KDF (key derivation function)
algo_spec | the name of the KDF to create |
Definition at line 174 of file get_enc.cpp.
References Botan::SCAN_Name::algo_name(), Botan::Library_State::algorithm_factory(), Botan::SCAN_Name::arg(), Botan::SCAN_Name::arg_count(), Botan::Global_State_Management::global_state(), and Botan::Algorithm_Factory::make_hash_function().
Referenced by Botan::PK_Key_Agreement::PK_Key_Agreement().
|
inline |
MAC factory method.
algo_spec | the name of the desired MAC |
Definition at line 126 of file lookup.h.
References Botan::Library_State::algorithm_factory(), Botan::Global_State_Management::global_state(), and Botan::Algorithm_Factory::make_mac().
BOTAN_DLL u64bit Botan::get_nanoseconds_clock | ( | ) |
BOTAN_DLL PBE * Botan::get_pbe | ( | const std::string & | algo_spec | ) |
Factory function for PBEs.
algo_spec | the name of the PBE algorithm to retrieve |
Definition at line 27 of file get_pbe.cpp.
References Botan::SCAN_Name::algo_name(), Botan::Library_State::algorithm_factory(), Botan::SCAN_Name::arg(), Botan::SCAN_Name::arg_count(), Botan::HashFunction::clone(), Botan::BlockCipher::clone(), Botan::Library_State::deref_alias(), ENCRYPTION, Botan::Global_State_Management::global_state(), Botan::Algorithm_Factory::prototype_block_cipher(), Botan::Algorithm_Factory::prototype_hash_function(), and split_on().
Referenced by Botan::PKCS8::BER_encode().
BOTAN_DLL PBE * Botan::get_pbe | ( | const OID & | pbe_oid, |
DataSource & | params | ||
) |
Factory function for PBEs.
pbe_oid | the oid of the desired PBE |
params | a DataSource providing the DER encoded parameters to use |
Definition at line 77 of file get_pbe.cpp.
References Botan::SCAN_Name::algo_name(), Botan::Library_State::algorithm_factory(), Botan::SCAN_Name::arg(), Botan::SCAN_Name::arg_count(), Botan::SCAN_Name::as_string(), Botan::OID::as_string(), Botan::HashFunction::clone(), Botan::BlockCipher::clone(), Botan::PBE::decode_params(), DECRYPTION, Botan::Library_State::deref_alias(), Botan::Global_State_Management::global_state(), Botan::OIDS::lookup(), Botan::Algorithm_Factory::prototype_block_cipher(), Botan::Algorithm_Factory::prototype_hash_function(), and split_on().
BOTAN_DLL PBKDF * Botan::get_pbkdf | ( | const std::string & | algo_spec | ) |
Password based key derivation function factory method
algo_spec | the name of the desired PBKDF algorithm |
Definition at line 73 of file get_enc.cpp.
References Botan::Library_State::algorithm_factory(), Botan::Global_State_Management::global_state(), and Botan::Algorithm_Factory::make_pbkdf().
Referenced by get_s2k().
|
inline |
Public key decryptor factory method.
key | the key that will work inside the decryptor |
eme | determines the algorithm and encoding |
|
inline |
Public key encryptor factory method.
key | the key that will work inside the encryptor |
eme | determines the algorithm and encoding |
|
inline |
Public key key agreement factory method.
key | the key that will work inside the key agreement |
kdf | the kdf algorithm to use |
|
inline |
Public key signer factory method.
key | the key that will work inside the signer |
emsa | determines the algorithm, encoding and hash algorithm |
sig_format | the signature format to be used |
|
inline |
Public key verifier factory method.
key | the key that will work inside the verifier |
emsa | determines the algorithm, encoding and hash algorithm |
sig_format | the signature format to be used |
|
inline |
algo_spec | the name of the desired algorithm |
Definition at line 144 of file lookup.h.
References get_pbkdf().
|
inline |
Stream cipher factory method.
algo_spec | the name of the desired stream cipher |
Definition at line 100 of file lookup.h.
References Botan::Library_State::algorithm_factory(), Botan::Global_State_Management::global_state(), and Botan::Algorithm_Factory::make_stream_cipher().
|
inline |
bool Botan::has_mlock | ( | ) |
Check if we can at least potentially lock memory
Definition at line 19 of file mlock.cpp.
References lock_mem(), and unlock_mem().
Referenced by Botan::Library_State::initialize().
BOTAN_DLL bool Botan::have_algorithm | ( | const std::string & | algo_spec | ) |
Check if an algorithm exists.
algo_spec | the name of the algorithm to check for |
Definition at line 17 of file lookup.cpp.
References Botan::Library_State::algorithm_factory(), Botan::Global_State_Management::global_state(), Botan::Algorithm_Factory::prototype_block_cipher(), Botan::Algorithm_Factory::prototype_hash_function(), Botan::Algorithm_Factory::prototype_mac(), and Botan::Algorithm_Factory::prototype_stream_cipher().
|
inline |
Check if a block cipher algorithm exists.
algo_spec | the name of the algorithm to check for |
Definition at line 235 of file lookup.h.
References Botan::Library_State::algorithm_factory(), Botan::Global_State_Management::global_state(), and Botan::Algorithm_Factory::prototype_block_cipher().
Referenced by Botan::SessionKeys::SessionKeys(), Botan::Record_Writer::set_keys(), and Botan::Record_Reader::set_keys().
|
inline |
Check if a hash algorithm exists.
algo_spec | the name of the algorithm to check for |
Definition at line 261 of file lookup.h.
References Botan::Library_State::algorithm_factory(), Botan::Global_State_Management::global_state(), and Botan::Algorithm_Factory::prototype_hash_function().
Referenced by Botan::Record_Writer::set_keys(), and Botan::Record_Reader::set_keys().
|
inline |
Check if a MAC algorithm exists.
algo_spec | the name of the algorithm to check for |
Definition at line 274 of file lookup.h.
References Botan::Library_State::algorithm_factory(), Botan::Global_State_Management::global_state(), and Botan::Algorithm_Factory::prototype_mac().
|
inline |
Check if a stream cipher algorithm exists.
algo_spec | the name of the algorithm to check for |
Definition at line 248 of file lookup.h.
References Botan::Library_State::algorithm_factory(), Botan::Global_State_Management::global_state(), and Botan::Algorithm_Factory::prototype_stream_cipher().
Referenced by Botan::Record_Writer::set_keys(), and Botan::Record_Reader::set_keys().
size_t BOTAN_DLL Botan::hex_decode | ( | byte | output[], |
const char | input[], | ||
size_t | input_length, | ||
size_t & | input_consumed, | ||
bool | ignore_ws = true |
||
) |
Perform hex decoding
output | an array of at least input_length/2 bytes |
input | some hex input |
input_length | length of input in bytes |
input_consumed | is an output parameter which says how many bytes of input were actually consumed. If less than input_length, then the range input[consumed:length] should be passed in later along with more input. |
ignore_ws | ignore whitespace on input; if false, throw an exception if whitespace is encountered |
Definition at line 55 of file hex.cpp.
References clear_mem().
Referenced by Botan::OctetString::change(), Botan::BigInt::decode(), Botan::Hex_Decoder::end_msg(), Botan::Data_Store::get1_memvec(), hex_decode(), Botan::RTSS_Share::RTSS_Share(), and Botan::Hex_Decoder::write().
size_t BOTAN_DLL Botan::hex_decode | ( | byte | output[], |
const char | input[], | ||
size_t | input_length, | ||
bool | ignore_ws = true |
||
) |
Perform hex decoding
output | an array of at least input_length/2 bytes |
input | some hex input |
input_length | length of input in bytes |
ignore_ws | ignore whitespace on input; if false, throw an exception if whitespace is encountered |
Definition at line 146 of file hex.cpp.
References hex_decode().
size_t BOTAN_DLL Botan::hex_decode | ( | byte | output[], |
const std::string & | input, | ||
bool | ignore_ws = true |
||
) |
Perform hex decoding
output | an array of at least input_length/2 bytes |
input | some hex input |
ignore_ws | ignore whitespace on input; if false, throw an exception if whitespace is encountered |
Definition at line 161 of file hex.cpp.
References hex_decode().
SecureVector< byte > BOTAN_DLL Botan::hex_decode | ( | const char | input[], |
size_t | input_length, | ||
bool | ignore_ws = true |
||
) |
Perform hex decoding
input | some hex input |
input_length | the length of input in bytes |
ignore_ws | ignore whitespace on input; if false, throw an exception if whitespace is encountered |
Definition at line 168 of file hex.cpp.
References hex_decode(), and Botan::MemoryRegion< T >::resize().
SecureVector< byte > BOTAN_DLL Botan::hex_decode | ( | const std::string & | input, |
bool | ignore_ws = true |
||
) |
Perform hex decoding
input | some hex input |
ignore_ws | ignore whitespace on input; if false, throw an exception if whitespace is encountered |
Definition at line 183 of file hex.cpp.
References hex_decode().
void BOTAN_DLL Botan::hex_encode | ( | char | output[], |
const byte | input[], | ||
size_t | input_length, | ||
bool | uppercase = true |
||
) |
Perform hex encoding
output | an array of at least input_length*2 bytes |
input | is some binary data |
input_length | length of input in bytes |
uppercase | should output be upper or lower case? |
Definition at line 14 of file hex.cpp.
Referenced by Botan::Data_Store::add(), Botan::OctetString::as_string(), Botan::BigInt::encode(), hex_encode(), Botan::RTSS_Share::to_string(), and Botan::X509_Certificate::to_string().
std::string BOTAN_DLL Botan::hex_encode | ( | const MemoryRegion< byte > & | input, |
bool | uppercase = true |
||
) |
Perform hex encoding
input | some input |
uppercase | should output be upper or lower case? |
Definition at line 37 of file hex.cpp.
References hex_encode(), and Botan::MemoryRegion< T >::size().
std::string BOTAN_DLL Botan::hex_encode | ( | const byte | input[], |
size_t | input_length, | ||
bool | uppercase = true |
||
) |
Perform hex encoding
input | some input |
input_length | length of input in bytes |
uppercase | should output be upper or lower case? |
Definition at line 43 of file hex.cpp.
References hex_encode().
|
inline |
Return the index of the highest set bit T is an unsigned integer type
n | an integer value |
Definition at line 33 of file bit_ops.h.
Referenced by Botan::OID::encode_into().
BOTAN_DLL byte Botan::ieee1363_hash_id | ( | const std::string & | hash_name | ) |
Return the IEEE 1363 hash identifier
hash_name | the name of the hash function |
Definition at line 93 of file hash_id.cpp.
Referenced by Botan::EMSA2::EMSA2().
Modular inversion
x | a positive integer |
modulus | a positive integer |
Definition at line 202 of file numthry.cpp.
References Botan::BigInt::is_even(), Botan::BigInt::is_negative(), Botan::BigInt::is_odd(), Botan::BigInt::is_zero(), low_zero_bits(), mod, and n.
Referenced by Botan::IF_Scheme_PrivateKey::check_key(), Botan::CurveGFp::CurveGFp(), Botan::ElGamal_Decryption_Operation::decrypt(), Botan::DH_KA_Operation::DH_KA_Operation(), Botan::ECDH_KA_Operation::ECDH_KA_Operation(), Botan::PointGFp::get_affine_x(), Botan::PointGFp::get_affine_y(), Botan::IF_Scheme_PrivateKey::IF_Scheme_PrivateKey(), Botan::Montgomery_Exponentiator::Montgomery_Exponentiator(), Botan::RSA_Private_Operation::RSA_Private_Operation(), Botan::RSA_PrivateKey::RSA_PrivateKey(), Botan::RW_PrivateKey::RW_PrivateKey(), Botan::RW_Signature_Operation::sign(), Botan::DSA_Signature_Operation::sign(), Botan::ECDSA_Signature_Operation::sign(), Botan::DSA_Verification_Operation::verify(), Botan::ECDSA_Verification_Operation::verify(), and Botan::GOST_3410_Verification_Operation::verify().
BOTAN_DLL std::string Botan::ipv4_to_string | ( | u32bit | ip_addr | ) |
Convert an IPv4 address to a string
ip_addr | the IPv4 address to convert |
Definition at line 277 of file parsing.cpp.
References get_byte(), and to_string().
Referenced by Botan::AlternativeName::decode_from().
Compute the Jacobi symbol. If n is prime, this is equivalent to the Legendre symbol.
a | is a non-negative integer |
n | is an odd integer > 1 |
Definition at line 15 of file jacobi.cpp.
References Botan::BigInt::is_even(), Botan::BigInt::is_negative(), Botan::BigInt::is_zero(), low_zero_bits(), n, and std::swap().
Referenced by ressol(), and Botan::RW_Signature_Operation::sign().
BOTAN_DLL size_t Botan::keylength_multiple_of | ( | const std::string & | algo_spec | ) |
Find out the size any valid key is a multiple of for a certain algorithm.
algo_spec | the name of the algorithm |
Definition at line 105 of file lookup.cpp.
References Botan::Library_State::algorithm_factory(), Botan::Global_State_Management::global_state(), Botan::SymmetricAlgorithm::key_spec(), Botan::Key_Length_Specification::keylength_multiple(), mac, Botan::Algorithm_Factory::prototype_block_cipher(), Botan::Algorithm_Factory::prototype_mac(), and Botan::Algorithm_Factory::prototype_stream_cipher().
Least common multiple
x | a positive integer |
y | a positive integer |
Definition at line 194 of file numthry.cpp.
References gcd().
Referenced by Botan::RSA_PrivateKey::check_key(), Botan::RW_PrivateKey::check_key(), Botan::IF_Scheme_PrivateKey::IF_Scheme_PrivateKey(), Botan::RSA_PrivateKey::RSA_PrivateKey(), and Botan::RW_PrivateKey::RW_PrivateKey().
|
inline |
Load a big-endian word
in | a pointer to some bytes |
off | an offset into the array |
Definition at line 100 of file loadstor.h.
Referenced by Botan::SHA_160::compress_n(), Botan::Noekeon_SIMD::decrypt_n(), and Botan::Noekeon_SIMD::encrypt_n().
|
inline |
Load two big-endian words
in | a pointer to some bytes |
x0 | where the first word will be written |
x1 | where the second word will be written |
Definition at line 325 of file loadstor.h.
|
inline |
Load four big-endian words
in | a pointer to some bytes |
x0 | where the first word will be written |
x1 | where the second word will be written |
x2 | where the third word will be written |
x3 | where the fourth word will be written |
Definition at line 340 of file loadstor.h.
|
inline |
Load eight big-endian words
in | a pointer to some bytes |
x0 | where the first word will be written |
x1 | where the second word will be written |
x2 | where the third word will be written |
x3 | where the fourth word will be written |
x4 | where the fifth word will be written |
x5 | where the sixth word will be written |
x6 | where the seventh word will be written |
x7 | where the eighth word will be written |
Definition at line 362 of file loadstor.h.
|
inline |
Load a variable number of big-endian words
out | the output array of words |
in | the input array of bytes |
count | how many words are in in |
Definition at line 383 of file loadstor.h.
References bswap_4(), and reverse_bytes().
|
inline |
Load a big-endian u16bit
in | a pointer to some bytes |
off | an offset into the array |
Definition at line 132 of file loadstor.h.
References make_u16bit().
Referenced by check_passhash9(), Botan::MISTY1::decrypt_n(), Botan::KASUMI::decrypt_n(), Botan::MISTY1::encrypt_n(), and Botan::KASUMI::encrypt_n().
|
inline |
Load a big-endian u32bit
in | a pointer to some bytes |
off | an offset into the array |
Definition at line 166 of file loadstor.h.
References make_u32bit().
Referenced by Botan::AlternativeName::decode_from(), Botan::CAST_128::decrypt_n(), Botan::Noekeon::decrypt_n(), Botan::XTEA::decrypt_n(), Botan::SEED::decrypt_n(), Botan::Blowfish::decrypt_n(), Botan::TEA::decrypt_n(), Botan::CAST_256::decrypt_n(), Botan::XTEA::encrypt_n(), Botan::Noekeon::encrypt_n(), Botan::CAST_128::encrypt_n(), Botan::TEA::encrypt_n(), Botan::CAST_256::encrypt_n(), Botan::SEED::encrypt_n(), Botan::Blowfish::encrypt_n(), Botan::SIMD_Scalar::load_be(), and Botan::WiderWake_41_BE::set_iv().
|
inline |
Load a big-endian u64bit
in | a pointer to some bytes |
off | an offset into the array |
Definition at line 200 of file loadstor.h.
References make_u64bit().
Referenced by rfc3394_keyunwrap().
|
inline |
Load a little-endian word
in | a pointer to some bytes |
off | an offset into the array |
Definition at line 116 of file loadstor.h.
Referenced by Botan::MD4::compress_n(), and Botan::MD5::compress_n().
|
inline |
Load two little-endian words
in | a pointer to some bytes |
x0 | where the first word will be written |
x1 | where the second word will be written |
Definition at line 236 of file loadstor.h.
|
inline |
Load four little-endian words
in | a pointer to some bytes |
x0 | where the first word will be written |
x1 | where the second word will be written |
x2 | where the third word will be written |
x3 | where the fourth word will be written |
Definition at line 251 of file loadstor.h.
|
inline |
Load eight little-endian words
in | a pointer to some bytes |
x0 | where the first word will be written |
x1 | where the second word will be written |
x2 | where the third word will be written |
x3 | where the fourth word will be written |
x4 | where the fifth word will be written |
x5 | where the sixth word will be written |
x6 | where the seventh word will be written |
x7 | where the eighth word will be written |
Definition at line 273 of file loadstor.h.
|
inline |
Load a variable number of little-endian words
out | the output array of words |
in | the input array of bytes |
count | how many words are in in |
Definition at line 294 of file loadstor.h.
References bswap_4(), and reverse_bytes().
|
inline |
Load a little-endian u16bit
in | a pointer to some bytes |
off | an offset into the array |
Definition at line 149 of file loadstor.h.
References make_u16bit().
Referenced by Botan::RC2::decrypt_n(), Botan::Skipjack::decrypt_n(), Botan::Skipjack::encrypt_n(), and Botan::RC2::encrypt_n().
|
inline |
Load a little-endian u32bit
in | a pointer to some bytes |
off | an offset into the array |
Definition at line 183 of file loadstor.h.
References make_u32bit().
Referenced by Botan::MARS::decrypt_n(), Botan::RC6::decrypt_n(), Botan::Serpent::decrypt_n(), Botan::RC5::decrypt_n(), Botan::Twofish::decrypt_n(), Botan::GOST_28147_89::decrypt_n(), Botan::Serpent::encrypt_n(), Botan::RC5::encrypt_n(), Botan::RC6::encrypt_n(), Botan::MARS::encrypt_n(), Botan::Twofish::encrypt_n(), Botan::GOST_28147_89::encrypt_n(), Botan::SIMD_Scalar::load_le(), and Botan::Salsa20::set_iv().
|
inline |
Load a little-endian u64bit
in | a pointer to some bytes |
off | an offset into the array |
Definition at line 218 of file loadstor.h.
References make_u64bit().
bool Botan::lock_mem | ( | void * | addr, |
size_t | length | ||
) |
Lock memory into RAM if possible
addr | the start of the memory block |
length | the length of the memory block in bytes |
Definition at line 31 of file mlock.cpp.
Referenced by has_mlock().
|
inline |
size_t BOTAN_DLL Botan::low_zero_bits | ( | const BigInt & | x | ) |
x | an integer |
Definition at line 141 of file numthry.cpp.
References ctz(), Botan::BigInt::is_nonzero(), Botan::BigInt::is_positive(), and Botan::BigInt::size().
Referenced by gcd(), inverse_mod(), jacobi(), and ressol().
EAC1_1_CVC BOTAN_DLL Botan::make_cvc_cert | ( | PK_Signer & | signer, |
const MemoryRegion< byte > & | public_key, | ||
ASN1_Car const & | car, | ||
ASN1_Chr const & | chr, | ||
byte | holder_auth_templ, | ||
ASN1_Ced | ced, | ||
ASN1_Cex | cex, | ||
RandomNumberGenerator & | rng | ||
) |
Create an arbitrary EAC 1.1 CVC. The desired key encoding must be set within the key (if applicable).
signer | the signer used to sign the certificate |
public_key | the DER encoded public key to appear in the certificate |
car | the CAR of the certificate |
chr | the CHR of the certificate |
holder_auth_templ | the holder authorization value byte to appear in the CHAT of the certificate |
ced | the CED to appear in the certificate |
cex | the CEX to appear in the certificate |
rng | a random number generator |
Definition at line 98 of file cvc_cert.cpp.
References APPLICATION, Botan::EAC1_1_gen_CVC< EAC1_1_CVC >::build_cert_body(), Botan::DER_Encoder::encode(), Botan::DER_Encoder::end_cons(), Botan::DER_Encoder::get_contents(), Botan::OIDS::lookup(), Botan::EAC1_1_gen_CVC< EAC1_1_CVC >::make_signed(), OCTET_STRING, Botan::MemoryRegion< T >::push_back(), Botan::DER_Encoder::raw_bytes(), and Botan::DER_Encoder::start_cons().
Referenced by Botan::CVC_EAC::create_self_signed_cert(), Botan::DE_EAC::link_cvca(), and Botan::DE_EAC::sign_request().
Private_Key * Botan::make_private_key | ( | const AlgorithmIdentifier & | alg_id, |
const MemoryRegion< byte > & | key_bits, | ||
RandomNumberGenerator & | rng | ||
) |
Definition at line 104 of file pk_algs.cpp.
References Botan::OID::as_string(), Botan::OIDS::lookup(), and Botan::AlgorithmIdentifier::oid.
Referenced by Botan::PKCS8::load_key().
Public_Key * Botan::make_public_key | ( | const AlgorithmIdentifier & | alg_id, |
const MemoryRegion< byte > & | key_bits | ||
) |
Definition at line 49 of file pk_algs.cpp.
References Botan::OID::as_string(), Botan::OIDS::lookup(), and Botan::AlgorithmIdentifier::oid.
Referenced by Botan::X509::load_key().
Make a u16bit from two bytes
i0 | the first byte |
i1 | the second byte |
Definition at line 47 of file loadstor.h.
Referenced by Botan::Record_Reader::get_record(), Botan::TLS_Data_Reader::get_u16bit(), load_be< u16bit >(), load_le< u16bit >(), Botan::Client_Key_Exchange::pre_master_secret(), and Botan::RTSS_Share::reconstruct().
Make a u32bit from four bytes
i0 | the first byte |
i1 | the second byte |
i2 | the third byte |
i3 | the fourth byte |
Definition at line 60 of file loadstor.h.
Referenced by load_be< u32bit >(), and load_le< u32bit >().
|
inline |
Make a u32bit from eight bytes
i0 | the first byte |
i1 | the second byte |
i2 | the third byte |
i3 | the fourth byte |
i4 | the fifth byte |
i5 | the sixth byte |
i6 | the seventh byte |
i7 | the eighth byte |
Definition at line 80 of file loadstor.h.
Referenced by load_be< u64bit >(), and load_le< u64bit >().
BOTAN_DLL size_t Botan::max_keylength_of | ( | const std::string & | algo_spec | ) |
Find out the maximum key size of a certain symmetric algorithm.
algo_spec | the name of the algorithm |
Definition at line 86 of file lookup.cpp.
References Botan::Library_State::algorithm_factory(), Botan::Global_State_Management::global_state(), Botan::SymmetricAlgorithm::key_spec(), mac, Botan::Key_Length_Specification::maximum_keylength(), Botan::Algorithm_Factory::prototype_block_cipher(), Botan::Algorithm_Factory::prototype_mac(), and Botan::Algorithm_Factory::prototype_stream_cipher().
BOTAN_DLL size_t Botan::min_keylength_of | ( | const std::string & | algo_spec | ) |
Find out the minimum key size of a certain symmetric algorithm.
algo_spec | the name of the algorithm |
Definition at line 67 of file lookup.cpp.
References Botan::Library_State::algorithm_factory(), Botan::Global_State_Management::global_state(), Botan::SymmetricAlgorithm::key_spec(), mac, Botan::Key_Length_Specification::minimum_keylength(), Botan::Algorithm_Factory::prototype_block_cipher(), Botan::Algorithm_Factory::prototype_mac(), and Botan::Algorithm_Factory::prototype_stream_cipher().
Fused multiply-add
a | an integer |
b | an integer |
c | an integer |
Definition at line 33 of file mp_numth.cpp.
References bigint_add2(), bigint_mul(), Botan::BigInt::data(), Botan::BigInt::get_reg(), Botan::BigInt::is_negative(), Botan::BigInt::is_zero(), Botan::BigInt::Negative, Botan::BigInt::Positive, r, Botan::BigInt::sig_words(), Botan::BigInt::sign(), and Botan::BigInt::size().
Referenced by Botan::DSA_Signature_Operation::sign(), Botan::RW_Signature_Operation::sign(), and Botan::ECDSA_Signature_Operation::sign().
PointGFp Botan::multi_exponentiate | ( | const PointGFp & | p1, |
const BigInt & | z1, | ||
const PointGFp & | p2, | ||
const BigInt & | z2 | ||
) |
Multiexponentiation
p1 | a point |
z1 | a scalar |
p2 | a point |
z2 | a scalar |
Definition at line 257 of file point_gfp.cpp.
References Botan::BigInt::bits(), Botan::BigInt::get_bit(), Botan::BigInt::is_negative(), and Botan::PointGFp::negate().
Referenced by Botan::ECDSA_Verification_Operation::verify(), and Botan::GOST_3410_Verification_Operation::verify().
void Botan::multimap_insert | ( | std::multimap< K, V > & | multimap, |
const K & | key, | ||
const V & | value | ||
) |
Insert a key/value pair into a multimap
Definition at line 76 of file stl_util.h.
Referenced by Botan::Data_Store::add(), Botan::X509_DN::add_attribute(), Botan::AlternativeName::add_attribute(), Botan::AlternativeName::add_othername(), Botan::X509_DN::contents(), Botan::AlternativeName::contents(), Botan::X509_DN::get_attributes(), and Botan::Data_Store::search_with().
|
inline |
|
inline |
Definition at line 52 of file ecdsa_sig.h.
Test two CRL entries for inequality in at least one field.
Definition at line 55 of file crl_ent.cpp.
|
inline |
Definition at line 79 of file cvc_cert.h.
bool BOTAN_DLL Botan::operator!= | ( | const AlgorithmIdentifier & | a1, |
const AlgorithmIdentifier & | a2 | ||
) |
Definition at line 84 of file alg_id.cpp.
|
inline |
Definition at line 278 of file asn1_tm.cpp.
References Botan::X509_Time::cmp().
BOTAN_DLL bool Botan::operator!= | ( | const OctetString & | x, |
const OctetString & | y | ||
) |
Compare two strings
x | an octet string |
y | an octet string |
Definition at line 106 of file symkey.cpp.
Definition at line 132 of file ec_group.h.
Equality operator
lhs | a curve |
rhs | a curve |
Definition at line 142 of file curve_gfp.h.
Definition at line 173 of file x509_dn.cpp.
Definition at line 227 of file point_gfp.h.
Definition at line 230 of file asn1_eac_tm.cpp.
References Botan::EAC_Time::cmp().
|
inline |
Definition at line 235 of file eac_asn_obj.h.
BOTAN_DLL bool Botan::operator!= | ( | const X509_Certificate & | , |
const X509_Certificate & | |||
) |
Check two certificates for inequality
Definition at line 302 of file x509cert.cpp.
Definition at line 525 of file bigint.h.
References Botan::BigInt::cmp().
Definition at line 119 of file big_ops3.cpp.
References divide(), Botan::BigInt::is_negative(), Botan::BigInt::is_positive(), Botan::BigInt::is_zero(), mod, and r.
word BOTAN_DLL Botan::operator% | ( | const BigInt & | n, |
word | mod | ||
) |
Definition at line 136 of file big_ops3.cpp.
References bigint_modop(), mod, Botan::BigInt::Negative, power_of_2(), Botan::BigInt::sig_words(), Botan::BigInt::sign(), and Botan::BigInt::word_at().
Definition at line 83 of file big_ops3.cpp.
References bigint_linmul3(), bigint_mul(), Botan::BigInt::data(), Botan::BigInt::Positive, Botan::BigInt::sig_words(), Botan::BigInt::sign(), Botan::BigInt::size(), and Botan::BigInt::word_at().
Definition at line 250 of file point_gfp.h.
Multiplication Operator
scalar | the scalar value |
point | the point value |
Definition at line 290 of file point_gfp.cpp.
References Botan::BigInt::abs(), Botan::BigInt::bits(), Botan::BigInt::byte_at(), Botan::BigInt::get_bit(), Botan::PointGFp::get_curve(), Botan::BigInt::get_substring(), Botan::BigInt::is_negative(), Botan::BigInt::is_zero(), and Botan::PointGFp::negate().
Definition at line 19 of file big_ops3.cpp.
References bigint_add3(), bigint_cmp(), bigint_sub3(), Botan::BigInt::data(), Botan::BigInt::Positive, Botan::BigInt::sig_words(), and Botan::BigInt::sign().
Append another component onto the OID.
oid | the OID to add the new component to |
new_comp | the new component to add |
Definition at line 87 of file asn1_oid.cpp.
BOTAN_DLL OctetString Botan::operator+ | ( | const OctetString & | x, |
const OctetString & | y | ||
) |
Concatenate two strings
x | an octet string |
y | an octet string |
Definition at line 114 of file symkey.cpp.
References Botan::OctetString::bits_of().
Definition at line 238 of file point_gfp.h.
MemoryRegion<T>& Botan::operator+= | ( | MemoryRegion< T > & | out, |
const MemoryRegion< T > & | in | ||
) |
Definition at line 373 of file secmem.h.
References copy_mem(), Botan::MemoryRegion< T >::resize(), and Botan::MemoryRegion< T >::size().
MemoryRegion<T>& Botan::operator+= | ( | MemoryRegion< T > & | out, |
T | in | ||
) |
Definition at line 383 of file secmem.h.
References Botan::MemoryRegion< T >::push_back().
MemoryRegion<T>& Botan::operator+= | ( | MemoryRegion< T > & | out, |
const std::pair< const T *, L > & | in | ||
) |
Definition at line 391 of file secmem.h.
References copy_mem(), Botan::MemoryRegion< T >::resize(), and Botan::MemoryRegion< T >::size().
MemoryRegion<T>& Botan::operator+= | ( | MemoryRegion< T > & | out, |
const std::pair< T *, L > & | in | ||
) |
Definition at line 401 of file secmem.h.
References copy_mem(), Botan::MemoryRegion< T >::resize(), and Botan::MemoryRegion< T >::size().
Definition at line 48 of file big_ops3.cpp.
References bigint_add3(), bigint_cmp(), bigint_shl2(), bigint_sub3(), Botan::BigInt::data(), Botan::BigInt::Positive, Botan::BigInt::reverse_sign(), Botan::BigInt::sig_words(), and Botan::BigInt::sign().
Definition at line 233 of file point_gfp.h.
References Botan::PointGFp::negate().
Definition at line 244 of file point_gfp.h.
Definition at line 109 of file big_ops3.cpp.
Definition at line 286 of file asn1_tm.cpp.
References Botan::X509_Time::cmp().
Compare two OIDs.
Definition at line 105 of file asn1_oid.cpp.
References Botan::OID::get_id().
Definition at line 250 of file asn1_eac_tm.cpp.
References Botan::EAC_Time::cmp().
Definition at line 531 of file bigint.h.
References Botan::BigInt::cmp().
BOTAN_DLL std::ostream & Botan::operator<< | ( | std::ostream & | stream, |
const BigInt & | n | ||
) |
Definition at line 16 of file big_io.cpp.
References base, Botan::BigInt::Decimal, Botan::BigInt::encode(), Botan::BigInt::Hexadecimal, Botan::BigInt::Octal, and Botan::MemoryRegion< T >::size().
int BOTAN_DLL Botan::operator<< | ( | int | out, |
Pipe & | pipe | ||
) |
Stream output operator; dumps the results from pipe's default message to the output stream.
out | file descriptor for an open output stream |
pipe | the pipe |
Definition at line 17 of file fd_unix.cpp.
References Botan::Pipe::read(), Botan::Pipe::remaining(), and Botan::MemoryRegion< T >::size().
Definition at line 156 of file big_ops3.cpp.
References bigint_shl2(), Botan::BigInt::data(), Botan::BigInt::get_reg(), MP_WORD_BITS, Botan::BigInt::sig_words(), and Botan::BigInt::sign().
std::ostream & Botan::operator<< | ( | std::ostream & | out, |
Pipe & | pipe | ||
) |
Stream output operator; dumps the results from pipe's default message to the output stream.
out | an output stream |
pipe | the pipe |
Definition at line 16 of file pipe_io.cpp.
References Botan::Pipe::read(), Botan::Pipe::remaining(), and Botan::MemoryRegion< T >::size().
Definition at line 281 of file asn1_tm.cpp.
References Botan::X509_Time::cmp().
Definition at line 235 of file asn1_eac_tm.cpp.
References Botan::EAC_Time::cmp().
Definition at line 527 of file bigint.h.
References Botan::BigInt::cmp().
Test two CRL entries for equality in all fields.
Definition at line 41 of file crl_ent.cpp.
References Botan::CRL_Entry::expire_time(), Botan::CRL_Entry::reason_code(), and Botan::CRL_Entry::serial_number().
bool BOTAN_DLL Botan::operator== | ( | const AlgorithmIdentifier & | a1, |
const AlgorithmIdentifier & | a2 | ||
) |
Definition at line 72 of file alg_id.cpp.
References Botan::AlgorithmIdentifier::oid, and Botan::AlgorithmIdentifier::parameters.
Definition at line 276 of file asn1_tm.cpp.
References Botan::X509_Time::cmp().
BOTAN_DLL bool Botan::operator== | ( | const OctetString & | x, |
const OctetString & | y | ||
) |
Compare two strings
x | an octet string |
y | an octet string |
Definition at line 98 of file symkey.cpp.
References Botan::OctetString::bits_of().
bool BOTAN_DLL Botan::operator== | ( | const ASN1_EAC_String & | lhs, |
const ASN1_EAC_String & | rhs | ||
) |
Definition at line 114 of file asn1_eac_str.cpp.
References Botan::ASN1_EAC_String::iso_8859().
Definition at line 143 of file x509_dn.cpp.
References Botan::X509_DN::get_attributes(), and x500_name_cmp().
Definition at line 225 of file asn1_eac_tm.cpp.
References Botan::EAC_Time::cmp().
Definition at line 523 of file bigint.h.
References Botan::BigInt::cmp().
Definition at line 288 of file asn1_tm.cpp.
References Botan::X509_Time::cmp().
Definition at line 245 of file asn1_eac_tm.cpp.
References Botan::EAC_Time::cmp().
Definition at line 533 of file bigint.h.
References Botan::BigInt::cmp().
Definition at line 283 of file asn1_tm.cpp.
References Botan::X509_Time::cmp().
Definition at line 240 of file asn1_eac_tm.cpp.
References Botan::EAC_Time::cmp().
Definition at line 529 of file bigint.h.
References Botan::BigInt::cmp().
int BOTAN_DLL Botan::operator>> | ( | int | in, |
Pipe & | pipe | ||
) |
File descriptor input operator; dumps the remaining bytes of input to the (assumed open) pipe message.
in | file descriptor for an open input stream |
pipe | the pipe |
Definition at line 39 of file fd_unix.cpp.
References Botan::MemoryRegion< T >::size(), and Botan::Pipe::write().
BOTAN_DLL std::istream & Botan::operator>> | ( | std::istream & | stream, |
BigInt & | n | ||
) |
Definition at line 45 of file big_io.cpp.
Definition at line 174 of file big_ops3.cpp.
References bigint_shr2(), Botan::BigInt::bits(), Botan::BigInt::data(), MP_WORD_BITS, Botan::BigInt::sig_words(), and Botan::BigInt::sign().
std::istream & Botan::operator>> | ( | std::istream & | in, |
Pipe & | pipe | ||
) |
Stream input operator; dumps the remaining bytes of input to the (assumed open) pipe message.
in | the input stream |
pipe | the pipe |
Definition at line 32 of file pipe_io.cpp.
References Botan::MemoryRegion< T >::size(), and Botan::Pipe::write().
BOTAN_DLL OctetString Botan::operator^ | ( | const OctetString & | x, |
const OctetString & | y | ||
) |
XOR two strings
x | an octet string |
y | an octet string |
Definition at line 125 of file symkey.cpp.
References Botan::OctetString::begin(), Botan::MemoryRegion< T >::copy(), Botan::OctetString::length(), and xor_buf().
|
inline |
Definition at line 261 of file point_gfp.h.
References OS2ECP(), and Botan::MemoryRegion< T >::size().
Definition at line 554 of file point_gfp.cpp.
References Botan::BigInt::decode(), and Botan::PointGFp::on_the_curve().
Referenced by Botan::ECDH_KA_Operation::agree(), Botan::EC_Group::EC_Group(), Botan::EC_PublicKey::EC_PublicKey(), and OS2ECP().
BOTAN_DLL size_t Botan::output_length_of | ( | const std::string & | algo_spec | ) |
Find out the output length of a certain symmetric algorithm.
algo_spec | the name of the algorithm |
Definition at line 51 of file lookup.cpp.
References Botan::Library_State::algorithm_factory(), Botan::Global_State_Management::global_state(), mac, Botan::Buffered_Computation::output_length(), Botan::Algorithm_Factory::prototype_hash_function(), and Botan::Algorithm_Factory::prototype_mac().
Referenced by Botan::SessionKeys::SessionKeys().
BOTAN_DLL std::vector< std::string > Botan::parse_algorithm_name | ( | const std::string & | scan_name | ) |
Parse a SCAN-style algorithm name
scan_name | the name |
Definition at line 96 of file parsing.cpp.
Referenced by get_cipher_mode(), and Botan::X509_Object::hash_used_for_signature().
BOTAN_DLL std::vector< u32bit > Botan::parse_asn1_oid | ( | const std::string & | oid | ) |
Parse an ASN.1 OID
oid | the OID in string form |
Definition at line 180 of file parsing.cpp.
References to_u32bit().
Referenced by Botan::OID::OID().
BOTAN_DLL bool Botan::passes_self_tests | ( | Algorithm_Factory & | af | ) |
Run a set of self tests on some basic algorithms like AES and SHA-1
af | an algorithm factory |
Definition at line 209 of file selftest.cpp.
References confirm_startup_self_tests().
BOTAN_DLL SecureVector< byte > Botan::PGP_decode | ( | DataSource & | source, |
std::string & | label, | ||
std::map< std::string, std::string > & | headers | ||
) |
source | the input source |
label | is set to the human-readable label |
headers | is set to any headers |
Definition at line 70 of file openpgp.cpp.
References Botan::Pipe::end_msg(), Botan::Charset::is_space(), Botan::Pipe::read_all(), Botan::Pipe::read_all_as_string(), Botan::DataSource::read_byte(), Botan::Pipe::start_msg(), and Botan::Pipe::write().
Referenced by PGP_decode().
BOTAN_DLL SecureVector< byte > Botan::PGP_decode | ( | DataSource & | source, |
std::string & | label | ||
) |
source | the input source |
label | is set to the human-readable label |
Definition at line 189 of file openpgp.cpp.
References PGP_decode().
BOTAN_DLL std::string Botan::PGP_encode | ( | const byte | input[], |
size_t | length, | ||
const std::string & | label, | ||
const std::map< std::string, std::string > & | headers | ||
) |
input | the input data |
length | length of input in bytes |
label | the human-readable label |
headers | a set of key/value pairs included in the header |
Definition at line 19 of file openpgp.cpp.
References Botan::Pipe::process_msg(), and Botan::Pipe::read_all_as_string().
Referenced by PGP_encode().
BOTAN_DLL std::string Botan::PGP_encode | ( | const byte | input[], |
size_t | length, | ||
const std::string & | label | ||
) |
input | the input data |
length | length of input in bytes |
label | the human-readable label |
Definition at line 60 of file openpgp.cpp.
References PGP_encode().
BOTAN_DLL MemoryVector< byte > Botan::pkcs_hash_id | ( | const std::string & | hash_name | ) |
Return the PKCS #1 hash identifier
hash_name | the name of the hash function |
Invalid_Argument | if the hash has no known PKCS #1 hash id |
Definition at line 60 of file hash_id.cpp.
Referenced by Botan::EMSA3::EMSA3().
Modular exponentation
b | an integer base |
x | a positive exponent |
m | a positive modulus |
Definition at line 251 of file numthry.cpp.
References Botan::Power_Mod::execute(), pow_mod, Botan::Power_Mod::set_base(), and Botan::Power_Mod::set_exponent().
Referenced by Botan::DL_Scheme_PrivateKey::check_key(), Botan::DH_PrivateKey::DH_PrivateKey(), Botan::DSA_PrivateKey::DSA_PrivateKey(), Botan::ElGamal_PrivateKey::ElGamal_PrivateKey(), generate_srp6_verifier(), Botan::NR_PrivateKey::NR_PrivateKey(), ressol(), Botan::RW_Signature_Operation::sign(), srp6_client_agree(), Botan::SRP6_Server_Session::step1(), and Botan::SRP6_Server_Session::step2().
|
inline |
Power of 2 test. T should be an unsigned integer type
arg | an integer value |
Definition at line 21 of file bit_ops.h.
Referenced by operator%(), Botan::BigInt::operator%=(), and Botan::BigInt::operator/=().
|
inline |
Definition at line 16 of file prefetch.h.
References Botan::CPUID::cache_line_size().
|
inline |
Definition at line 27 of file prefetch.h.
References Botan::CPUID::cache_line_size().
bool BOTAN_DLL Botan::primality_test | ( | const BigInt & | n, |
RandomNumberGenerator & | rng, | ||
size_t | level = 1 |
||
) |
Primality Testing
n | a positive integer to test for primality |
rng | a random number generator |
level | how hard to test |
Definition at line 262 of file numthry.cpp.
References Botan::BigInt::bits(), Botan::BigInt::is_even(), PRIME_TABLE_SIZE, PRIMES, Botan::BigInt::randomize(), and Botan::BigInt::word_at().
Referenced by check_prime(), quick_check_prime(), and verify_prime().
|
inline |
Quickly check for primality
n | a positive integer to test for primality |
rng | a random number generator |
Definition at line 134 of file numthry.h.
References primality_test().
BigInt BOTAN_DLL Botan::random_prime | ( | RandomNumberGenerator & | rng, |
size_t | bits, | ||
const BigInt & | coprime = 1 , |
||
size_t | equiv = 1 , |
||
size_t | equiv_mod = 2 |
||
) |
Randomly generate a prime
rng | a random number generator |
bits | how large the resulting prime should be in bits |
coprime | a positive integer the result should be coprime to |
equiv | a non-negative number that the result should be equivalent to modulo equiv_mod |
equiv_mod | the modulus equiv should be checked against |
Definition at line 17 of file make_prm.cpp.
References Botan::BigInt::bits(), check_prime(), gcd(), Botan::RandomNumberGenerator::next_byte(), PRIME_TABLE_SIZE, PRIMES, Botan::BigInt::set_bit(), Botan::MemoryRegion< T >::size(), and to_string().
Referenced by Botan::DL_Group::DL_Group(), random_safe_prime(), Botan::RSA_PrivateKey::RSA_PrivateKey(), and Botan::RW_PrivateKey::RW_PrivateKey().
BigInt BOTAN_DLL Botan::random_safe_prime | ( | RandomNumberGenerator & | rng, |
size_t | bits | ||
) |
Return a 'safe' prime, of the form p=2*q+1 with q prime
rng | a random number generator |
bits | is how long the resulting prime should be |
Definition at line 87 of file make_prm.cpp.
References check_prime(), random_prime(), and to_string().
Referenced by Botan::DL_Group::DL_Group().
Compute the square root of x modulo a prime using the Shanks-Tonnelli algorithm
x | the input |
p | the prime |
Definition at line 17 of file ressol.cpp.
References jacobi(), low_zero_bits(), Botan::Modular_Reducer::multiply(), n, Botan::BigInt::Power2, power_mod(), r, s, and Botan::Modular_Reducer::square().
|
inline |
Retrieve an object prototype from the global factory
algo_spec | an algorithm name |
Definition at line 29 of file lookup.h.
References Botan::Library_State::algorithm_factory(), Botan::Global_State_Management::global_state(), and Botan::Algorithm_Factory::prototype_block_cipher().
|
inline |
Retrieve an object prototype from the global factory
algo_spec | an algorithm name |
Definition at line 55 of file lookup.h.
References Botan::Library_State::algorithm_factory(), Botan::Global_State_Management::global_state(), and Botan::Algorithm_Factory::prototype_hash_function().
Referenced by choose_sig_format().
|
inline |
Retrieve an object prototype from the global factory
algo_spec | an algorithm name |
Definition at line 68 of file lookup.h.
References Botan::Library_State::algorithm_factory(), Botan::Global_State_Management::global_state(), and Botan::Algorithm_Factory::prototype_mac().
|
inline |
Retrieve an object prototype from the global factory
algo_spec | an algorithm name |
Definition at line 42 of file lookup.h.
References Botan::Library_State::algorithm_factory(), Botan::Global_State_Management::global_state(), and Botan::Algorithm_Factory::prototype_stream_cipher().
Swap a 16 bit integer
Definition at line 24 of file bswap.h.
References rotate_left().
Referenced by Botan::SIMD_Scalar::bswap(), bswap_4(), load_be(), load_le(), and reverse_bytes().
Swap a 32 bit integer
Definition at line 32 of file bswap.h.
References rotate_left(), and rotate_right().
SecureVector< byte > BOTAN_DLL Botan::rfc3394_keyunwrap | ( | const MemoryRegion< byte > & | key, |
const SymmetricKey & | kek, | ||
Algorithm_Factory & | af | ||
) |
Decrypt a key under a key encryption key using the algorithm described in RFC 3394
key | the encrypted key to decrypt |
kek | the key encryption key |
af | an algorithm factory |
Definition at line 77 of file rfc3394.cpp.
References Botan::MemoryRegion< T >::begin(), copy_mem(), Botan::OctetString::length(), load_be< u64bit >(), n, Botan::MemoryRegion< T >::size(), store_be(), and xor_buf().
SecureVector< byte > BOTAN_DLL Botan::rfc3394_keywrap | ( | const MemoryRegion< byte > & | key, |
const SymmetricKey & | kek, | ||
Algorithm_Factory & | af | ||
) |
Encrypt a key under a key encryption key using the algorithm described in RFC 3394
key | the plaintext key to encrypt |
kek | the key encryption key |
af | an algorithm factory |
Definition at line 35 of file rfc3394.cpp.
References Botan::MemoryRegion< T >::begin(), copy_mem(), Botan::OctetString::length(), n, Botan::MemoryRegion< T >::size(), store_be(), and xor_buf().
|
inline |
Bit rotation left
input | the input word |
rot | the number of bits to rotate |
Definition at line 21 of file rotate.h.
Referenced by Botan::SHA_160::compress_n(), Botan::Noekeon::decrypt_n(), Botan::DES::decrypt_n(), Botan::KASUMI::decrypt_n(), Botan::RC6::decrypt_n(), Botan::Twofish::decrypt_n(), Botan::TripleDES::decrypt_n(), Botan::Noekeon::encrypt_n(), Botan::DES::encrypt_n(), Botan::RC2::encrypt_n(), Botan::RC5::encrypt_n(), Botan::RC6::encrypt_n(), Botan::Twofish::encrypt_n(), Botan::KASUMI::encrypt_n(), Botan::TripleDES::encrypt_n(), Botan::HAS_160_F::F1(), Botan::RIPEMD_128_F::F1(), Botan::HAS_160_F::F2(), Botan::RIPEMD_128_F::F2(), Botan::HAS_160_F::F3(), Botan::RIPEMD_128_F::F3(), Botan::HAS_160_F::F4(), Botan::RIPEMD_128_F::F4(), Botan::GOST_28147_89::GOST_28147_89(), reverse_bytes(), and Botan::SIMD_Scalar::rotate_left().
|
inline |
Bit rotation right
input | the input word |
rot | the number of bits to rotate |
Definition at line 34 of file rotate.h.
Referenced by Botan::Noekeon::decrypt_n(), Botan::RC5::decrypt_n(), Botan::RC6::decrypt_n(), Botan::Twofish::decrypt_n(), Botan::RC2::decrypt_n(), Botan::Noekeon::encrypt_n(), Botan::Twofish::encrypt_n(), reverse_bytes(), and Botan::SIMD_Scalar::rotate_right().
|
inline |
Round down
n | an integer |
align_to | the alignment boundary |
Definition at line 36 of file rounding.h.
Referenced by Botan::Buffered_Filter::write().
|
inline |
Round up
n | an integer |
align_to | the alignment boundary |
Definition at line 22 of file rounding.h.
References n.
Referenced by Botan::Pooling_Allocator::allocate(), and Botan::Pooling_Allocator::deallocate().
|
inline |
Memory comparison, input insensitive
p1 | a pointer to an array |
p2 | a pointer to another array |
n | the number of Ts in p1 and p2 |
Definition at line 57 of file mem_ops.h.
References n.
Referenced by check_passhash9(), Botan::CryptoBox::decrypt(), Botan::MemoryRegion< word >::operator==(), Botan::RTSS_Share::reconstruct(), and Botan::MessageAuthenticationCode::verify_mac().
|
inline |
Searching through a std::map
mapping | the map to search |
key | is what to look for |
null_result | is the value to return if key is not in mapping |
Definition at line 43 of file stl_util.h.
Referenced by algorithm_kat(), and Botan::Algorithm_Cache< T >::get().
|
inline |
Set memory to a fixed value
ptr | a pointer to an array |
n | the number of Ts pointed to by ptr |
val | the value to set each byte to |
|
inline |
Return the number of significant bytes in n
n | an integer value |
Definition at line 62 of file bit_ops.h.
References get_byte().
BOTAN_DLL std::vector< std::string > Botan::split_on | ( | const std::string & | str, |
char | delim | ||
) |
Split a string
str | the input string |
delim | the delimitor |
Definition at line 152 of file parsing.cpp.
Referenced by Botan::EAC_Signed_Object::check_signature(), Botan::X509_Object::check_signature(), create_alt_name(), Botan::DataSource_Command::DataSource_Command(), Botan::Core_Engine::get_cipher(), get_pbe(), Botan::X509_Object::hash_used_for_signature(), Botan::LibraryInitializer::initialize(), string_to_ipv4(), Botan::Win32_CAPI_EntropySource::Win32_CAPI_EntropySource(), and Botan::X509_Cert_Options::X509_Cert_Options().
x | an integer |
Definition at line 18 of file mp_numth.cpp.
References bigint_sqr(), Botan::BigInt::data(), Botan::BigInt::get_reg(), Botan::BigInt::Positive, Botan::BigInt::sig_words(), and Botan::BigInt::size().
Referenced by Botan::Modular_Reducer::cube(), Botan::Modular_Reducer::Modular_Reducer(), and Botan::Modular_Reducer::square().
std::pair< BigInt, SymmetricKey > BOTAN_DLL Botan::srp6_client_agree | ( | const std::string & | username, |
const std::string & | password, | ||
const std::string & | group_id, | ||
const std::string & | hash_id, | ||
const MemoryRegion< byte > & | salt, | ||
const BigInt & | B, | ||
RandomNumberGenerator & | rng | ||
) |
SRP6a Client side
username | the username we are attempting login for |
password | the password we are attempting to use |
group_id | specifies the shared SRP group |
hash_id | specifies a secure hash function |
salt | is the salt value sent by the server |
B | is the server's public value |
rng | is a random number generator |
Definition at line 96 of file srp6.cpp.
References Botan::BigInt::bytes(), Botan::BigInt::encode_1363(), Botan::DL_Group::get_g(), Botan::DL_Group::get_p(), and power_mod().
Return the group id for this SRP param set, or else thrown an exception
Definition at line 72 of file srp6.cpp.
References Botan::BigInt::bits(), and to_string().
size_t Botan::static_provider_weight | ( | const std::string & | prov_name | ) |
prov_name | a provider name |
Return a static provider weighing
Definition at line 15 of file prov_weight.cpp.
Referenced by Botan::Algorithm_Cache< T >::get().
Store a big-endian u16bit
in | the input u16bit |
out | the byte array to write to |
Definition at line 412 of file loadstor.h.
References get_byte().
Referenced by Botan::SHA_160::copy_out(), Botan::CAST_128::decrypt_n(), Botan::DES::decrypt_n(), Botan::Noekeon::decrypt_n(), Botan::SEED::decrypt_n(), Botan::TEA::decrypt_n(), Botan::XTEA::decrypt_n(), Botan::Blowfish::decrypt_n(), Botan::CAST_256::decrypt_n(), Botan::KASUMI::decrypt_n(), Botan::MISTY1::decrypt_n(), Botan::TripleDES::decrypt_n(), Botan::MISTY1::encrypt_n(), Botan::Blowfish::encrypt_n(), Botan::Noekeon::encrypt_n(), Botan::SEED::encrypt_n(), Botan::TEA::encrypt_n(), Botan::CAST_256::encrypt_n(), Botan::XTEA::encrypt_n(), Botan::KASUMI::encrypt_n(), Botan::CAST_128::encrypt_n(), Botan::DES::encrypt_n(), Botan::TripleDES::encrypt_n(), rfc3394_keyunwrap(), rfc3394_keywrap(), Botan::SIMD_Scalar::store_be(), store_be(), and Botan::MDx_HashFunction::write_count().
Store a big-endian u32bit
in | the input u32bit |
out | the byte array to write to |
Definition at line 442 of file loadstor.h.
References get_byte().
Store a big-endian u64bit
in | the input u64bit |
out | the byte array to write to |
Definition at line 476 of file loadstor.h.
References get_byte().
|
inline |
Store two big-endian words
out | the output byte array |
x0 | the first word |
x1 | the second word |
Definition at line 533 of file loadstor.h.
References store_be().
|
inline |
Store four big-endian words
out | the output byte array |
x0 | the first word |
x1 | the second word |
x2 | the third word |
x3 | the fourth word |
Definition at line 565 of file loadstor.h.
References store_be().
|
inline |
Store eight big-endian words
out | the output byte array |
x0 | the first word |
x1 | the second word |
x2 | the third word |
x3 | the fourth word |
x4 | the fifth word |
x5 | the sixth word |
x6 | the seventh word |
x7 | the eighth word |
Definition at line 612 of file loadstor.h.
References store_be().
Store a little-endian u16bit
in | the input u16bit |
out | the byte array to write to |
Definition at line 427 of file loadstor.h.
References get_byte().
Referenced by Botan::MD4::copy_out(), Botan::MD5::copy_out(), Botan::MARS::decrypt_n(), Botan::Twofish::decrypt_n(), Botan::RC5::decrypt_n(), Botan::RC6::decrypt_n(), Botan::RC2::decrypt_n(), Botan::Serpent::decrypt_n(), Botan::Skipjack::decrypt_n(), Botan::GOST_28147_89::decrypt_n(), Botan::Skipjack::encrypt_n(), Botan::Serpent::encrypt_n(), Botan::RC6::encrypt_n(), Botan::RC2::encrypt_n(), Botan::RC5::encrypt_n(), Botan::Twofish::encrypt_n(), Botan::MARS::encrypt_n(), Botan::GOST_28147_89::encrypt_n(), Botan::SIMD_Scalar::store_le(), store_le(), and Botan::MDx_HashFunction::write_count().
Store a little-endian u32bit
in | the input u32bit |
out | the byte array to write to |
Definition at line 459 of file loadstor.h.
References get_byte().
Store a little-endian u64bit
in | the input u64bit |
out | the byte array to write to |
Definition at line 497 of file loadstor.h.
References get_byte().
|
inline |
Store two little-endian words
out | the output byte array |
x0 | the first word |
x1 | the second word |
Definition at line 520 of file loadstor.h.
References store_le().
|
inline |
Store four little-endian words
out | the output byte array |
x0 | the first word |
x1 | the second word |
x2 | the third word |
x3 | the fourth word |
Definition at line 548 of file loadstor.h.
References store_le().
|
inline |
Store eight little-endian words
out | the output byte array |
x0 | the first word |
x1 | the second word |
x2 | the third word |
x3 | the fourth word |
x4 | the fifth word |
x5 | the sixth word |
x6 | the seventh word |
x7 | the eighth word |
Definition at line 586 of file loadstor.h.
References store_le().
BOTAN_DLL u32bit Botan::string_to_ipv4 | ( | const std::string & | ip_str | ) |
Convert a string representation of an IPv4 address to a number
ip_str | the string representation |
Definition at line 252 of file parsing.cpp.
References split_on(), and to_u32bit().
Fused subtract-multiply
a | an integer |
b | an integer |
c | an integer |
Definition at line 60 of file mp_numth.cpp.
References Botan::BigInt::is_negative(), and r.
Referenced by Botan::RW_Signature_Operation::sign().
BOTAN_DLL u64bit Botan::system_time | ( | ) |
Definition at line 73 of file time.cpp.
Referenced by Botan::X509_Store::add_crl(), Botan::DE_EAC::create_cvca(), Botan::CRL_Entry::CRL_Entry(), Botan::DE_EAC::link_cvca(), Botan::DE_EAC::sign_request(), Botan::X509_Store::validate_cert(), and Botan::X509_Cert_Options::X509_Cert_Options().
BOTAN_DLL u32bit Botan::timespec_to_u32bit | ( | const std::string & | timespec | ) |
Convert a time specification to a number
timespec | the time specification |
Definition at line 65 of file parsing.cpp.
References Botan::Charset::is_digit(), and to_u32bit().
BOTAN_DLL std::string Botan::to_string | ( | u64bit | n, |
size_t | min_len = 0 |
||
) |
Convert a number to a string
n | the integer to convert to a string |
min_len | the min length of the output string |
Definition at line 42 of file parsing.cpp.
References Botan::Charset::digit2char().
Referenced by Botan::Data_Store::add(), Botan::EAC_Time::as_string(), Botan::OID::as_string(), Botan::X509_Time::as_string(), Botan::ASN1_String::ASN1_String(), Botan::DL_Group::BER_decode(), Botan::CFB_Decryption::CFB_Decryption(), Botan::CFB_Encryption::CFB_Encryption(), Botan::PK_Verifier::check_signature(), Botan::CipherSuite::CipherSuite(), Botan::DL_Group::DER_encode(), Botan::PKCS5_PBKDF2::derive_key(), Botan::DL_Group::DL_Group(), Botan::Dynamically_Loaded_Engine::Dynamically_Loaded_Engine(), Botan::EAX_Base::EAX_Base(), generate_dsa_primes(), generate_passhash9(), ipv4_to_string(), Botan::Keccak_1600::Keccak_1600(), Botan::MISTY1::MISTY1(), Botan::Tiger::name(), Botan::RC5::name(), Botan::ARC4::name(), Botan::SAFER_SK::name(), Botan::Keccak_1600::name(), Botan::Skein_512::name(), Botan::Lion::name(), Botan::DL_Group::PEM_encode(), random_prime(), random_safe_prime(), Botan::RC5::RC5(), Botan::EAC_Time::readable_string(), Botan::X509_Time::readable_string(), Botan::RSA_PrivateKey::RSA_PrivateKey(), Botan::RW_PrivateKey::RW_PrivateKey(), Botan::X509_Time::set_to(), Botan::DE_EAC::sign_request(), Botan::PK_Signer::signature(), srp6_group_identifier(), Botan::Tiger::Tiger(), and Botan::Charset::transcode().
BOTAN_DLL u32bit Botan::to_u32bit | ( | const std::string & | str | ) |
Convert a string to a number
str | the string to convert |
Definition at line 18 of file parsing.cpp.
References Botan::Charset::char2digit(), and n.
Referenced by Botan::SCAN_Name::arg_as_integer(), check_bcrypt(), Botan::Data_Store::get1_u32bit(), get_cipher_mode(), parse_asn1_oid(), Botan::X509_Time::set_to(), Botan::EAC_Time::set_to(), string_to_ipv4(), and timespec_to_u32bit().
void Botan::unlock_mem | ( | void * | addr, |
size_t | length | ||
) |
Unlock memory locked with lock_mem()
addr | the start of the memory block |
length | the length of the memory block in bytes |
Definition at line 45 of file mlock.cpp.
Referenced by has_mlock().
|
inline |
Verify primality - this function is slow but useful if you want to ensure that a possibly malicious entity did not provide you with something that 'looks like' a prime
n | a positive integer to test for primality |
rng | a random number generator |
Definition at line 154 of file numthry.h.
References primality_test().
BOTAN_DLL u32bit Botan::version_datestamp | ( | ) |
Return the date this version of botan was released, in an integer of the form YYYYMMDD. For instance a version released on May 21, 2013 would return the integer 20130521. If the currently running version is not an official release, this function will return 0 instead.
Definition at line 44 of file version.cpp.
BOTAN_DLL u32bit Botan::version_major | ( | ) |
Get the major version number.
Definition at line 49 of file version.cpp.
BOTAN_DLL u32bit Botan::version_minor | ( | ) |
Get the minor version number.
Definition at line 50 of file version.cpp.
BOTAN_DLL u32bit Botan::version_patch | ( | ) |
BOTAN_DLL std::string Botan::version_string | ( | ) |
Get a human-readable string identifying the version of Botan. No particular format should be assumed.
Definition at line 23 of file version.cpp.
References STR.
|
inline |
Definition at line 175 of file mp_asmi.h.
References word_madd2().
Referenced by bigint_comba_mul16(), bigint_comba_mul4(), bigint_comba_mul6(), bigint_comba_mul8(), bigint_comba_sqr16(), bigint_comba_sqr4(), bigint_comba_sqr6(), and bigint_comba_sqr8().
|
inline |
Definition at line 186 of file mp_asmi.h.
References word_add(), and word_madd2().
Referenced by bigint_comba_sqr16(), bigint_comba_sqr4(), bigint_comba_sqr6(), and bigint_comba_sqr8().
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
Definition at line 159 of file mp_asmi.h.
References word_madd3().
Referenced by bigint_monty_redc(), bigint_simple_mul(), and bigint_simple_sqr().
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
Definition at line 21 of file mp_asmi.h.
Referenced by bigint_add2_nc(), bigint_add3_nc(), word3_muladd_2(), word8_add2(), and word8_add3().
|
inline |
Definition at line 86 of file mp_asm.h.
References BOTAN_WORD_MUL.
Referenced by bigint_divcore(), bigint_linmul2(), bigint_linmul3(), bigint_modop(), word3_muladd(), word3_muladd_2(), word8_linmul2(), and word8_linmul3().
|
inline |
Definition at line 102 of file mp_asm.h.
References BOTAN_WORD_MUL.
Referenced by bigint_monty_redc(), bigint_simple_mul(), bigint_simple_sqr(), and word8_madd3().
|
inline |
Definition at line 66 of file mp_asmi.h.
Referenced by bigint_monty_redc(), bigint_sub2(), bigint_sub2_rev(), bigint_sub3(), word8_sub2(), word8_sub2_rev(), and word8_sub3().
BOTAN_DLL bool Botan::x500_name_cmp | ( | const std::string & | name1, |
const std::string & | name2 | ||
) |
Compare two names using the X.509 comparison algorithm
name1 | the first name |
name2 | the second name |
Definition at line 213 of file parsing.cpp.
References Botan::Charset::caseless_cmp(), and Botan::Charset::is_space().
Referenced by operator==().
XOR arrays. Postcondition out[i] = in[i] ^ out[i] forall i = 0...length
out | the input/output buffer |
in | the read-only input buffer |
length | the length of the buffers |
Definition at line 21 of file xor_buf.h.
Referenced by Botan::Randpool::add_entropy(), aont_package(), aont_unpackage(), Botan::Salsa20::cipher(), Botan::Turing::cipher(), Botan::OFB::cipher(), Botan::ARC4::cipher(), Botan::CTR_BE::cipher(), Botan::WiderWake_41_BE::cipher(), Botan::DESX::decrypt_n(), Botan::LubyRackoff::decrypt_n(), Botan::Lion::decrypt_n(), Botan::PKCS5_PBKDF2::derive_key(), Botan::DESX::encrypt_n(), Botan::LubyRackoff::encrypt_n(), Botan::Lion::encrypt_n(), Botan::MGF1::mask(), operator^(), Botan::OctetString::operator^=(), Botan::Randpool::reseed(), rfc3394_keyunwrap(), and rfc3394_keywrap().
void Botan::zeroise | ( | MemoryRegion< T > & | vec | ) |
Zeroise the values; length remains unchanged
vec | the vector to zeroise |
Definition at line 415 of file secmem.h.
References clear_mem(), and Botan::MemoryRegion< T >::size().
Referenced by aont_package(), aont_unpackage(), Botan::HMAC::clear(), Botan::ANSI_X919_MAC::clear(), Botan::AES_128_SSSE3::clear(), Botan::IDEA::clear(), Botan::Twofish::clear(), Botan::TEA::clear(), Botan::ANSI_X931_RNG::clear(), Botan::XTEA::clear(), Botan::ARC4::clear(), Botan::CAST_128::clear(), Botan::KASUMI::clear(), Botan::MARS::clear(), Botan::MISTY1::clear(), Botan::Noekeon::clear(), Botan::DES::clear(), Botan::RC5::clear(), Botan::RC6::clear(), Botan::SAFER_SK::clear(), Botan::DESX::clear(), Botan::SEED::clear(), Botan::Serpent::clear(), Botan::CAST_256::clear(), Botan::Skipjack::clear(), Botan::Square::clear(), Botan::BMW_512::clear(), Botan::MD4::clear(), Botan::MD5::clear(), Botan::RIPEMD_128::clear(), Botan::RIPEMD_160::clear(), Botan::SHA_160::clear(), Botan::Whirlpool::clear(), Botan::CBC_MAC::clear(), Botan::AES_128_NI::clear(), Botan::Randpool::clear(), Botan::AES_128::clear(), Botan::HAS_160::clear(), Botan::MD2::clear(), Botan::CMAC::clear(), Botan::SSL3_MAC::clear(), Botan::GOST_34_11::clear(), Botan::Tiger::clear(), Botan::RC2::clear(), Botan::HMAC_RNG::clear(), Botan::Turing::clear(), Botan::LubyRackoff::clear(), Botan::Salsa20::clear(), Botan::WiderWake_41_BE::clear(), Botan::Keccak_1600::clear(), Botan::Skein_512::clear(), Botan::Lion::clear(), Botan::CTR_BE::clear(), Botan::OFB::clear(), Botan::AES_192_SSSE3::clear(), Botan::MDx_HashFunction::clear(), Botan::TripleDES::clear(), Botan::AES_192_NI::clear(), Botan::AES_192::clear(), Botan::GOST_28147_89::clear(), Botan::AES_256_SSSE3::clear(), Botan::AES_256::clear(), Botan::AES_256_NI::clear(), Botan::BigInt::clear(), Botan::Montgomery_Exponentiator::execute(), Botan::MDx_HashFunction::final_result(), Botan::BigInt::operator+=(), Botan::OctetString::operator^=(), Botan::HMAC_RNG::reseed(), Botan::Record_Writer::reset(), Botan::Montgomery_Exponentiator::set_base(), Botan::OFB::set_iv(), Botan::CTS_Encryption::set_iv(), Botan::CTR_BE::set_iv(), Botan::CFB_Encryption::set_iv(), Botan::CFB_Decryption::set_iv(), and Botan::CTS_Decryption::set_iv().
const u64bit Botan::Camellia_SBOX1[256] |
Definition at line 15 of file camellia_sbox.h.
const u64bit Botan::Camellia_SBOX2[256] |
Definition at line 81 of file camellia_sbox.h.
const u64bit Botan::Camellia_SBOX3[256] |
Definition at line 147 of file camellia_sbox.h.
const u64bit Botan::Camellia_SBOX4[256] |
Definition at line 213 of file camellia_sbox.h.
const u64bit Botan::Camellia_SBOX5[256] |
Definition at line 279 of file camellia_sbox.h.
const u64bit Botan::Camellia_SBOX6[256] |
Definition at line 345 of file camellia_sbox.h.
const u64bit Botan::Camellia_SBOX7[256] |
Definition at line 411 of file camellia_sbox.h.
const u64bit Botan::Camellia_SBOX8[256] |
Definition at line 477 of file camellia_sbox.h.
const u64bit Botan::DES_FPTAB1 |
Definition at line 504 of file des_tab.cpp.
Referenced by Botan::DES::decrypt_n(), Botan::TripleDES::decrypt_n(), Botan::DES::encrypt_n(), and Botan::TripleDES::encrypt_n().
const u64bit Botan::DES_FPTAB2 |
Definition at line 570 of file des_tab.cpp.
Referenced by Botan::DES::decrypt_n(), Botan::TripleDES::decrypt_n(), Botan::DES::encrypt_n(), and Botan::TripleDES::encrypt_n().
const u64bit Botan::DES_IPTAB1 |
Definition at line 372 of file des_tab.cpp.
Referenced by Botan::DES::decrypt_n(), Botan::TripleDES::decrypt_n(), Botan::DES::encrypt_n(), and Botan::TripleDES::encrypt_n().
const u64bit Botan::DES_IPTAB2 |
Definition at line 438 of file des_tab.cpp.
Referenced by Botan::DES::decrypt_n(), Botan::TripleDES::decrypt_n(), Botan::DES::encrypt_n(), and Botan::TripleDES::encrypt_n().
const u32bit Botan::DES_SPBOX1 |
Definition at line 12 of file des_tab.cpp.
const u32bit Botan::DES_SPBOX2 |
Definition at line 57 of file des_tab.cpp.
const u32bit Botan::DES_SPBOX3 |
Definition at line 102 of file des_tab.cpp.
const u32bit Botan::DES_SPBOX4 |
Definition at line 147 of file des_tab.cpp.
const u32bit Botan::DES_SPBOX5 |
Definition at line 192 of file des_tab.cpp.
const u32bit Botan::DES_SPBOX6 |
Definition at line 237 of file des_tab.cpp.
const u32bit Botan::DES_SPBOX7 |
Definition at line 282 of file des_tab.cpp.
const u32bit Botan::DES_SPBOX8 |
Definition at line 327 of file des_tab.cpp.
const size_t Botan::HEX_CODEC_BUFFER_SIZE = 256 |
Size used for internal buffer in hex encoder/decoder
Definition at line 20 of file hex_filt.cpp.
const size_t Botan::MP_WORD_BITS = BOTAN_MP_WORD_BITS |
Definition at line 18 of file mp_core.h.
Referenced by Botan::BigInt::BigInt(), bigint_divop(), bigint_shl1(), bigint_shl2(), bigint_shr1(), bigint_shr2(), Botan::BigInt::bits(), Botan::BigInt::clear_bit(), divide(), Botan::BigInt::get_bit(), Botan::BigInt::mask_bits(), Botan::Modular_Reducer::Modular_Reducer(), operator<<(), Botan::BigInt::operator<<=(), operator>>(), Botan::BigInt::operator>>=(), Botan::Modular_Reducer::reduce(), and Botan::BigInt::set_bit().
const word Botan::MP_WORD_MASK = ~static_cast<word>(0) |
Definition at line 27 of file mp_types.h.
Referenced by Botan::BigInt::BigInt().
const word Botan::MP_WORD_MAX = MP_WORD_MASK |
Definition at line 29 of file mp_types.h.
Referenced by divide().
const word Botan::MP_WORD_TOP_BIT = static_cast<word>(1) << (8*sizeof(word) - 1) |
Definition at line 28 of file mp_types.h.
Referenced by bigint_divop(), Botan::BigInt::bits(), and divide().
const size_t Botan::PRIME_TABLE_SIZE = 6541 |
The size of the PRIMES[] array
Definition at line 220 of file numthry.h.
Referenced by primality_test(), and random_prime().
const u16bit Botan::PRIMES |
A const array of all primes less than 65535
Definition at line 12 of file primes.cpp.
Referenced by primality_test(), and random_prime().