|
Botan
1.11.4
|
Namespaces | |
| namespace | ASN1 |
| namespace | BER |
| namespace | Camellia_F |
| namespace | Cert_Extension |
| namespace | Charset |
| namespace | CryptoBox |
| namespace | CVC_EAC |
| namespace | DE_EAC |
| namespace | FPE |
| namespace | Global_State_Management |
| namespace | HAS_160_F |
| namespace | KeyPair |
| namespace | OCSP |
| namespace | OIDS |
| namespace | PEM_Code |
| namespace | PK_Ops |
| namespace | PKCS8 |
| namespace | RIPEMD_128_F |
| namespace | SHA1_F |
| namespace | SHA1_SSE2_F |
| namespace | SHA2_32 |
| namespace | SHA2_64 |
| namespace | TLS |
| namespace | X509 |
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 |
| template<typename T > | |
| using | secure_deque = std::vector< T, secure_allocator< T >> |
| template<typename T > | |
| using | secure_vector = std::vector< T, secure_allocator< T >> |
| 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, std::chrono::milliseconds 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) |
| std::map< std::string, std::string > | algorithm_kat_detailed (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[]) |
| void | assertion_failure (const char *expr_str, const char *assertion_made, 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) |
| secure_vector< byte > | base64_decode (const char input[], size_t input_length, bool ignore_ws) |
| secure_vector< 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) |
| template<typename Alloc > | |
| std::string | base64_encode (const std::vector< byte, Alloc > &input) |
| std::string | base64_encode (const byte input[], size_t input_length) |
| 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]) |
| 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[], 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]) |
| template<typename T , typename Alloc > | |
| size_t | buffer_insert (std::vector< T, Alloc > &buf, size_t buf_offset, const T input[], size_t input_length) |
| template<typename T , typename Alloc , typename Alloc2 > | |
| size_t | buffer_insert (std::vector< T, Alloc > &buf, size_t buf_offset, const std::vector< T, Alloc2 > &input) |
| calendar_point | calendar_value (const std::chrono::system_clock::time_point &time_point) |
| 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) |
| size_t | clamp (size_t n, size_t lower_bound, size_t upper_bound) |
| template<typename T > | |
| void | clear_mem (T *ptr, size_t n) |
| void | confirm_startup_self_tests (Algorithm_Factory &af) |
| 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 std::vector< byte > &concat) |
| ECDSA_PublicKey * | decode_eac1_1_key (const std::vector< byte > &, AlgorithmIdentifier &) |
| void | divide (const BigInt &x, const BigInt &y_arg, BigInt &q, BigInt &r) |
| size_t | dl_work_factor (size_t bits) |
| secure_vector< byte > | EC2OSP (const PointGFp &point, byte format) |
| std::string | erase_chars (const std::string &str, const std::set< char > &chars) |
| Key_Constraints | find_constraints (const Public_Key &pub_key, Key_Constraints limits) |
| 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 std::vector< byte > &seed_c) |
| std::vector< 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 std::vector< byte > &salt, const std::string &group_id, const std::string &hash_id) |
| AEAD_Mode * | get_aead (const std::string &algo_spec, Cipher_Dir direction) |
| 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) |
| PBE * | get_pbe (const std::string &algo_spec, const std::string &passphrase, std::chrono::milliseconds msec, RandomNumberGenerator &rng) |
| PBE * | get_pbe (const OID &pbe_oid, const std::vector< byte > ¶ms, const std::string &passphrase) |
| PBKDF * | get_pbkdf (const std::string &algo_spec) |
| 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 | 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) |
| std::vector< byte > | hex_decode (const char input[], size_t input_length, bool ignore_ws) |
| std::vector< byte > | hex_decode (const std::string &input, bool ignore_ws) |
| secure_vector< byte > | hex_decode_locked (const char input[], size_t input_length, bool ignore_ws) |
| secure_vector< byte > | hex_decode_locked (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 byte input[], size_t input_length, bool uppercase) |
| template<typename Alloc > | |
| std::string | hex_encode (const std::vector< byte, Alloc > &input, bool uppercase=true) |
| 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) |
| template<typename T > | |
| bool | is_power_of_2 (T arg) |
| s32bit | jacobi (const BigInt &a, const BigInt &n) |
| 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) |
| 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, const std::vector< byte > &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 secure_vector< byte > &key_bits, RandomNumberGenerator &rng) |
| Public_Key * | make_public_key (const AlgorithmIdentifier &alg_id, const secure_vector< 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) |
| template<typename T , typename Pred > | |
| void | map_remove_if (Pred pred, T &assoc) |
| word | monty_inverse (word input) |
| 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!= (const AlgorithmIdentifier &a1, const AlgorithmIdentifier &a2) |
| bool | operator!= (EAC1_1_CVC const &lhs, EAC1_1_CVC const &rhs) |
| bool | operator!= (EAC1_1_ADO const &lhs, EAC1_1_ADO const &rhs) |
| template<typename T > | |
| bool | operator!= (const secure_allocator< T > &, const secure_allocator< T > &) |
| 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 EAC_Time &t1, const EAC_Time &t2) |
| bool | operator!= (const ASN1_EAC_String &lhs, const ASN1_EAC_String &rhs) |
| bool | operator!= (const PointGFp &lhs, const PointGFp &rhs) |
| bool | operator!= (const X509_Time &t1, const X509_Time &t2) |
| 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 , typename Alloc , typename Alloc2 > | |
| std::vector< T, Alloc > & | operator+= (std::vector< T, Alloc > &out, const std::vector< T, Alloc2 > &in) |
| template<typename T , typename Alloc > | |
| std::vector< T, Alloc > & | operator+= (std::vector< T, Alloc > &out, T in) |
| template<typename T , typename Alloc , typename L > | |
| std::vector< T, Alloc > & | operator+= (std::vector< T, Alloc > &out, const std::pair< const T *, L > &in) |
| template<typename T , typename Alloc , typename L > | |
| std::vector< T, Alloc > & | operator+= (std::vector< T, Alloc > &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 | 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 X509_Time &t1, const X509_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) |
| std::ostream & | operator<< (std::ostream &out, const X509_DN &dn) |
| BOTAN_DLL std::ostream & | operator<< (std::ostream &out, Pipe &pipe) |
| bool | operator<= (const EAC_Time &t1, const EAC_Time &t2) |
| bool | operator<= (const X509_Time &t1, const X509_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) |
| template<typename T > | |
| bool | operator== (const secure_allocator< T > &, const secure_allocator< T > &) |
| 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 X509_Time &t1, const X509_Time &t2) |
| bool | operator== (const BigInt &a, const BigInt &b) |
| bool | operator> (const EAC_Time &t1, const EAC_Time &t2) |
| bool | operator> (const X509_Time &t1, const X509_Time &t2) |
| bool | operator> (const BigInt &a, const BigInt &b) |
| bool | operator>= (const EAC_Time &t1, const EAC_Time &t2) |
| bool | operator>= (const X509_Time &t1, const X509_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) |
| template<typename T , typename Alloc , typename Alloc2 > | |
| std::vector< T, Alloc > & | operator^= (std::vector< T, Alloc > &out, const std::vector< T, Alloc2 > &in) |
| template<typename Alloc > | |
| PointGFp | OS2ECP (const std::vector< byte, Alloc > &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) |
| secure_vector< byte > | PGP_decode (DataSource &source, std::string &label, std::map< std::string, std::string > &headers) |
| secure_vector< 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) |
| std::vector< byte > | pkcs_hash_id (const std::string &name) |
| BigInt | power_mod (const BigInt &base, const BigInt &exp, const BigInt &mod) |
| 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) |
| std::string | replace_char (const std::string &str, char from_char, char to_char) |
| std::string | replace_chars (const std::string &str, const std::set< char > &chars, char to_char) |
| 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) |
| secure_vector< byte > | rfc3394_keyunwrap (const secure_vector< byte > &key, const SymmetricKey &kek, Algorithm_Factory &af) |
| secure_vector< byte > | rfc3394_keywrap (const secure_vector< 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 K , typename V , typename R > | |
| R | search_map (const std::map< K, V > &mapping, const K &key, const R &null_result, const R &found_result) |
| 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 std::vector< 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) |
| std::string | string_join (const std::vector< std::string > &strs, char delim) |
| u32bit | string_to_ipv4 (const std::string &str) |
| BigInt | sub_mul (const BigInt &a, const BigInt &b, const BigInt &c) |
| std::map< std::string, double > | time_algorithm_ops (const std::string &name, Algorithm_Factory &af, const std::string &provider, RandomNumberGenerator &rng, std::chrono::nanoseconds runtime, size_t buf_size) |
| u32bit | timespec_to_u32bit (const std::string ×pec) |
| std::vector< byte > | to_byte_vector (const std::string &s) |
| u32bit | to_u32bit (const std::string &str) |
| template<typename T > | |
| std::vector< T > | unlock (const secure_vector< T > &in) |
| template<typename T > | |
| bool | value_exists (const std::vector< T > &vec, const T &val) |
| 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) |
| Path_Validation_Result | x509_path_validate (const X509_Certificate &end_cert, const Path_Validation_Restrictions &restrictions, const std::vector< Certificate_Store * > &certstores) |
| Path_Validation_Result | x509_path_validate (const std::vector< X509_Certificate > &end_certs, const Path_Validation_Restrictions &restrictions, const Certificate_Store &store) |
| Path_Validation_Result | x509_path_validate (const X509_Certificate &end_cert, const Path_Validation_Restrictions &restrictions, const Certificate_Store &store) |
| Path_Validation_Result | x509_path_validate (const std::vector< X509_Certificate > &end_certs, const Path_Validation_Restrictions &restrictions, const std::vector< Certificate_Store * > &certstores) |
| 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 Alloc , typename Alloc2 > | |
| void | xor_buf (std::vector< byte, Alloc > &out, const std::vector< byte, Alloc2 > &in, size_t n) |
| template<typename Alloc > | |
| void | xor_buf (std::vector< byte, Alloc > &out, const byte *in, size_t n) |
| template<typename Alloc , typename Alloc2 > | |
| void | xor_buf (std::vector< byte, Alloc > &out, const byte *in, const std::vector< byte, Alloc2 > &in2, size_t n) |
| template<typename T , typename Alloc > | |
| void | zap (std::vector< T, Alloc > &vec) |
| BOTAN_DLL void | zero_mem (void *ptr, size_t n) |
| template<typename T , typename Alloc > | |
| void | zeroise (std::vector< T, Alloc > &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 |
| using Botan::secure_deque = typedef std::vector<T, secure_allocator<T>> |
Definition at line 17 of file tls_blocking.h.
| using Botan::secure_vector = typedef std::vector<T, secure_allocator<T>> |
| 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::ASN1_Tag |
ASN.1 Type and Class Tags
Definition at line 19 of file asn1_obj.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.
| enum Botan::CRL_Code |
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.
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 key_constraint.h.
| enum Botan::X509_Encoding |
|
inline |
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, | ||
| std::chrono::milliseconds | 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 141 of file benchmark.cpp.
References Botan::Algorithm_Factory::providers_of(), and time_algorithm_ops().
| 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 149 of file selftest.cpp.
References algorithm_kat_detailed().
| BOTAN_DLL std::map< std::string, std::string > Botan::algorithm_kat_detailed | ( | 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 52 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(), hex_decode(), 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().
Referenced by algorithm_kat().
| 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_DLL Botan::assertion_failure | ( | const char * | expr_str, |
| const char * | assertion_made, | ||
| const char * | func, | ||
| const char * | file, | ||
| int | line | ||
| ) |
| 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 94 of file base64.cpp.
References clear_mem().
Referenced by base64_decode(), Botan::Base64_Decoder::end_msg(), Botan::SRP6_Authenticator_File::SRP6_Authenticator_File(), 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 201 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 216 of file base64.cpp.
References base64_decode().
| secure_vector< 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 223 of file base64.cpp.
References base64_decode().
| secure_vector< 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 238 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 35 of file base64.cpp.
Referenced by Botan::OCSP::Request::base64_encode(), and base64_encode().
| std::string Botan::base64_encode | ( | const std::vector< byte, Alloc > & | input | ) |
Perform base64 encoding
| input | some input |
Definition at line 50 of file base64.h.
References 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 78 of file base64.cpp.
References base64_encode(), and BOTAN_ASSERT_EQUAL.
|
inline |
| void Botan::bigint_add2 | ( | word | x[], |
| size_t | x_size, | ||
| const word | y[], | ||
| size_t | y_size | ||
| ) |
Two operand addition
| x | the first operand (and output) |
| x_size | size of x |
| y | the second operand |
| y_size | size of y (must be >= x_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 | ||
| ) |
Two operand addition with carry out
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 | ||
| ) |
Three operand addition
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 | ||
| ) |
Three operand addition with carry out
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 18 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] | ||
| ) |
| void Botan::bigint_comba_mul4 | ( | word | z[8], |
| const word | x[4], | ||
| const word | y[4] | ||
| ) |
| void Botan::bigint_comba_mul6 | ( | word | z[12], |
| const word | x[6], | ||
| const word | y[6] | ||
| ) |
| void Botan::bigint_comba_mul8 | ( | word | z[16], |
| const word | x[8], | ||
| const word | y[8] | ||
| ) |
| 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().
| word Botan::bigint_divop | ( | word | n1, |
| word | n0, | ||
| word | d | ||
| ) |
Compute ((n1<<bits) + n0) / d
Definition at line 44 of file mp_misc.cpp.
References MP_WORD_BITS, and MP_WORD_TOP_BIT.
Referenced by bigint_modop(), divide(), and monty_inverse().
| 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 69 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 71 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[], |
| const word | p[], | ||
| size_t | p_size, | ||
| word | p_dash, | ||
| word | workspace[] | ||
| ) |
Montgomery Reduction
| z | integer to reduce, of size exactly 2*(p_size+1). Output is in the first p_size+1 words, higher words are set to zero. |
| 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 86 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 213 of file mp_karat.cpp.
References bigint_comba_mul16(), bigint_comba_mul4(), bigint_comba_mul6(), bigint_comba_mul8(), bigint_linmul3(), and bigint_simple_mul().
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 265 of file mp_karat.cpp.
References bigint_comba_sqr16(), bigint_comba_sqr4(), bigint_comba_sqr6(), bigint_comba_sqr8(), bigint_linmul3(), and bigint_simple_sqr().
Referenced by bigint_monty_sqr(), and square().
| word Botan::bigint_sub2 | ( | word | x[], |
| size_t | x_size, | ||
| const word | y[], | ||
| size_t | y_size | ||
| ) |
Two operand subtraction
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 | ||
| ) |
Two operand subtraction, 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 | ||
| ) |
Three operand subtraction
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().
| void Botan::botan_md4_x86_32_compress | ( | u32bit | digest[4], |
| const byte | input[64], | ||
| u32bit | M[16] | ||
| ) |
MD4 compression function in x86-32 asm
| digest | the current digest |
| input | the input block |
| M | the message buffer |
| void Botan::botan_serpent_x86_32_decrypt | ( | const byte | in[16], |
| byte | out[16], | ||
| const u32bit | ks[132] | ||
| ) |
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().
| void Botan::botan_serpent_x86_32_encrypt | ( | const byte | in[16], |
| byte | out[16], | ||
| const u32bit | ks[132] | ||
| ) |
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().
| size_t Botan::buffer_insert | ( | std::vector< T, Alloc > & | buf, |
| size_t | buf_offset, | ||
| const T | input[], | ||
| size_t | input_length | ||
| ) |
Definition at line 103 of file secmem.h.
References copy_mem().
Referenced by Botan::MDx_HashFunction::add_data(), Botan::OFB::set_iv(), Botan::CTR_BE::set_iv(), Botan::XTS_Encryption::set_iv(), Botan::XTS_Decryption::set_iv(), Botan::Base64_Encoder::write(), and Botan::Hex_Encoder::write().
| size_t Botan::buffer_insert | ( | std::vector< T, Alloc > & | buf, |
| size_t | buf_offset, | ||
| const std::vector< T, Alloc2 > & | input | ||
| ) |
| BOTAN_DLL calendar_point Botan::calendar_value | ( | const std::chrono::system_clock::time_point & | time_point | ) |
Definition at line 39 of file calendar.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 133 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 89 of file passhash9.cpp.
References Botan::OctetString::bits_of(), Botan::PBKDF::derive_key(), Botan::Pipe::end_msg(), load_be< u16bit >(), Botan::Pipe::read_all(), same_mem(), Botan::Pipe::start_msg(), Botan::ASN1::to_string(), and Botan::Pipe::write().
|
inline |
Check for primality
| n | a positive integer to test for primality |
| rng | a random number generator |
Definition at line 151 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 219 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(), and Botan::X509_CA::X509_CA().
|
inline |
|
inline |
Zeroize memory
| ptr | a pointer to an array |
| n | the number of Ts pointed to by ptr |
Definition at line 28 of file mem_ops.h.
References zero_mem().
Referenced by Botan::mlock_allocator::allocate(), Botan::secure_allocator< T >::allocate(), aont_package(), base64_decode(), bigint_monty_redc(), bigint_shl1(), bigint_shr1(), bigint_simple_mul(), bigint_simple_sqr(), Botan::secure_allocator< T >::deallocate(), hex_decode(), Botan::BigInt::mask_bits(), Botan::Unix_EntropySource::poll(), 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 268 of file selftest.cpp.
Referenced by Botan::Library_State::initialize(), and passes_self_tests().
|
inline |
Copy memory
| out | the destination array |
| in | the source array |
| n | the number of elements of in/out |
Definition at line 39 of file mem_ops.h.
Referenced by Botan::TLS::Connection_Cipher_State::aead_nonce(), aont_package(), aont_unpackage(), bigint_monty_redc(), bigint_shr1(), buffer_insert(), Botan::TLS::Heartbeat_Message::contents(), Botan::BER_Decoder::decode(), Botan::CryptoBox::encrypt(), Botan::TLS::Stream_Handshake_IO::format(), operator+=(), operator^(), Botan::DataSource_Memory::peek(), Botan::ANSI_X931_RNG::randomize(), Botan::Randpool::randomize(), Botan::HMAC_RNG::randomize(), Botan::DataSource_Memory::read(), Botan::TLS::read_record(), rfc3394_keyunwrap(), rfc3394_keywrap(), Botan::GCM_Mode::start(), unlock(), Botan::Base64_Encoder::write(), Botan::Buffered_Filter::write(), Botan::Hex_Encoder::write(), Botan::Hex_Decoder::write(), and Botan::Base64_Decoder::write().
| BOTAN_DLL AlternativeName Botan::create_alt_name | ( | const Data_Store & | info | ) |
Definition at line 563 of file x509cert.cpp.
References Botan::AlternativeName::add_attribute(), and Botan::Data_Store::search_for().
Referenced by Botan::PKCS10_Request::subject_alt_name().
| BOTAN_DLL X509_DN Botan::create_dn | ( | const Data_Store & | info | ) |
Definition at line 544 of file x509cert.cpp.
References Botan::X509_DN::add_attribute(), and Botan::Data_Store::search_for().
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 std::vector< byte > & | concat | ) |
Definition at line 46 of file ecdsa_sig.cpp.
References Botan::BigInt::decode(), r, and s.
Referenced by Botan::EAC1_1_gen_CVC< Derived >::decode_info().
| BOTAN_DLL ECDSA_PublicKey * Botan::decode_eac1_1_key | ( | const std::vector< byte > & | enc_key, |
| AlgorithmIdentifier & | sig_algo | ||
| ) |
Decode an EAC encoding ECDSA key
Definition at line 91 of file cvc_cert.cpp.
| void BOTAN_DLL Botan::divide | ( | const BigInt & | x, |
| const BigInt & | y, | ||
| BigInt & | q, | ||
| BigInt & | r | ||
| ) |
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 58 of file divide.cpp.
References bigint_divop(), Botan::BigInt::cmp(), Botan::BigInt::grow_to(), Botan::BigInt::is_negative(), Botan::BigInt::is_zero(), MP_WORD_BITS, MP_WORD_MAX, MP_WORD_TOP_BIT, Botan::BigInt::mutable_data(), n, Botan::BigInt::Positive, 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(), Botan::ElGamal_Encryption_Operation::encrypt(), Botan::IF_Scheme_PublicKey::estimated_strength(), and Botan::DL_Scheme_PublicKey::estimated_strength().
| secure_vector< byte > BOTAN_DLL Botan::EC2OSP | ( | const PointGFp & | point, |
| byte | format | ||
| ) |
Definition at line 484 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(), and Botan::PointGFp::UNCOMPRESSED.
Referenced by Botan::EC_Group::DER_encode(), Botan::ECDH_PublicKey::public_value(), and Botan::EC_PublicKey::x509_subject_public_key().
| BOTAN_DLL std::string Botan::erase_chars | ( | const std::string & | str, |
| const std::set< char > & | chars | ||
| ) |
Erase characters from a string
Definition at line 267 of file parsing.cpp.
Referenced by Botan::TLS::Ciphersuite::to_string().
| BOTAN_DLL Key_Constraints Botan::find_constraints | ( | const Public_Key & | pub_key, |
| Key_Constraints | limits | ||
| ) |
Create the key constraints for a specific public key.
| pub_key | the public key from which the basic set of constraints to be placed in the return value is derived |
| limits | additional limits that will be incorporated into the return value |
Definition at line 46 of file key_constraint.cpp.
References Botan::Public_Key::algo_name(), DATA_ENCIPHERMENT, DIGITAL_SIGNATURE, KEY_AGREEMENT, KEY_ENCIPHERMENT, and NON_REPUDIATION.
Referenced by Botan::X509::create_cert_req(), and Botan::X509_CA::sign_request().
| BigInt BOTAN_DLL Botan::gcd | ( | const BigInt & | x, |
| const BigInt & | y | ||
| ) |
Compute the greatest common divisor
| x | a positive integer |
| y | a positive integer |
Definition at line 170 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 126 of file bcrypt.cpp.
References Botan::RandomNumberGenerator::random_vec(), and unlock().
| 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 std::vector< 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(), and Botan::ASN1::to_string().
Referenced by Botan::DL_Group::DL_Group(), and generate_dsa_primes().
| std::vector< 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::randomize().
| std::string BOTAN_DLL Botan::generate_passhash9 | ( | const std::string & | password, |
| RandomNumberGenerator & | rng, | ||
| u16bit | work_factor = 10, |
||
| byte | alg_id = 1 |
||
| ) |
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) 3 is HMAC(SHA-384) 4 is HMAC(SHA-512) all other values are currently undefined |
Definition at line 52 of file passhash9.cpp.
References Botan::PBKDF::derive_key(), Botan::Pipe::end_msg(), get_byte(), Botan::RandomNumberGenerator::randomize(), Botan::Pipe::read_all_as_string(), Botan::Pipe::start_msg(), Botan::ASN1::to_string(), and Botan::Pipe::write().
| BigInt BOTAN_DLL Botan::generate_srp6_verifier | ( | const std::string & | identifier, |
| const std::string & | password, | ||
| const std::vector< 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 |
| group_id | specifies the shared SRP group |
| hash_id | specifies a secure hash function |
Definition at line 114 of file srp6.cpp.
References Botan::DL_Group::get_g(), Botan::DL_Group::get_p(), and power_mod().
| BOTAN_DLL AEAD_Mode * Botan::get_aead | ( | const std::string & | name, |
| Cipher_Dir | direction | ||
| ) |
Get an AEAD mode by name (eg "AES-128/GCM" or "Serpent/EAX")
Definition at line 25 of file aead.cpp.
References Botan::Library_State::algorithm_factory(), cipher_name, Botan::BlockCipher::clone(), ENCRYPTION, Botan::Global_State_Management::global_state(), Botan::Algorithm_Factory::prototype_block_cipher(), and split_on().
Referenced by Botan::TLS::Connection_Cipher_State::Connection_Cipher_State(), and time_algorithm_ops().
|
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(), Botan::TLS::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(), Botan::TLS::Connection_Cipher_State::format_ad(), generate_passhash9(), ipv4_to_string(), Botan::TLS::Protocol_Version::major_version(), Botan::TLS::Protocol_Version::minor_version(), Botan::TLS::Supported_Elliptic_Curves::serialize(), Botan::TLS::Extensions::serialize(), Botan::TLS::Server_Key_Exchange::Server_Key_Exchange(), significant_bytes(), Botan::RTSS_Share::split(), store_be(), store_le(), Botan::Buffered_Computation::update_be(), and Botan::TLS::write_record().
| 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 67 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(), and get_cipher().
| 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 86 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 103 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 91 of file core_modes.cpp.
References Botan::BlockCipher::block_size(), Botan::BlockCipher::clone(), ENCRYPTION, parse_algorithm_name(), and to_u32bit().
Referenced by algorithm_kat_detailed(), 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 147 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().
Referenced by Botan::OCSP::CertID::CertID(), Botan::X509_Certificate::fingerprint(), and Botan::OCSP::CertID::is_id_for().
| 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 178 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(), Botan::Algorithm_Factory::make_hash_function(), and Botan::Algorithm_Factory::make_mac().
Referenced by Botan::CryptoBox::decrypt(), Botan::CryptoBox::encrypt(), Botan::PK_Key_Agreement::PK_Key_Agreement(), and Botan::TLS::Handshake_State::protocol_specific_prf().
|
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().
Referenced by Botan::CryptoBox::decrypt(), Botan::CryptoBox::encrypt(), and Botan::TLS::Hello_Verify_Request::Hello_Verify_Request().
| BOTAN_DLL PBE * Botan::get_pbe | ( | const std::string & | algo_spec, |
| const std::string & | passphrase, | ||
| std::chrono::milliseconds | msec, | ||
| RandomNumberGenerator & | rng | ||
| ) |
Factory function for PBEs.
| algo_spec | the name of the PBE algorithm to retrieve |
| passphrase | the passphrase to use for encryption |
| msec | how many milliseconds to run the PBKDF |
| rng | a random number generator |
Definition at line 28 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(), Botan::Global_State_Management::global_state(), passphrase, Botan::Algorithm_Factory::prototype_block_cipher(), Botan::Algorithm_Factory::prototype_hash_function(), rng, and split_on().
Referenced by Botan::PKCS8::BER_encode().
| BOTAN_DLL PBE * Botan::get_pbe | ( | const OID & | pbe_oid, |
| const std::vector< byte > & | params, | ||
| const std::string & | passphrase | ||
| ) |
Factory function for PBEs.
| pbe_oid | the oid of the desired PBE |
| params | a DataSource providing the DER encoded parameters to use |
| passphrase | the passphrase to use for decryption |
Definition at line 86 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::Library_State::deref_alias(), Botan::Global_State_Management::global_state(), Botan::OIDS::lookup(), passphrase, 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 Botan::TLS::derive_key(), and get_s2k().
|
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 |
Compute Hamming weights
| n | an integer value |
| 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().
|
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().
|
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().
| 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 49 of file hex.cpp.
References clear_mem().
Referenced by algorithm_kat_detailed(), Botan::Hex_Decoder::end_msg(), Botan::Data_Store::get1_memvec(), hex_decode(), hex_decode_locked(), Botan::OctetString::OctetString(), Botan::X509_Certificate::subject_public_key_bits(), 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 140 of file hex.cpp.
References hex_decode().
| size_t BOTAN_DLL Botan::hex_decode | ( | byte |