|
Botan 3.11.0
Crypto and TLS for C&
|
#include <botan/ffi.h>#include <botan/assert.h>#include <botan/ec_group.h>#include <botan/hash.h>#include <botan/mem_ops.h>#include <botan/pem.h>#include <botan/internal/ffi_mp.h>#include <botan/internal/ffi_pkey.h>#include <botan/internal/ffi_rng.h>#include <botan/internal/ffi_util.h>Go to the source code of this file.
| int botan_mceies_decrypt | ( | botan_privkey_t | mce_key_obj, |
| const char * | aead, | ||
| const uint8_t | ct[], | ||
| size_t | ct_len, | ||
| const uint8_t | ad[], | ||
| size_t | ad_len, | ||
| uint8_t | out[], | ||
| size_t * | out_len ) |
Definition at line 1480 of file ffi_pkey_algs.cpp.
References BOTAN_FFI_ERROR_NOT_IMPLEMENTED, and BOTAN_UNUSED.
| int botan_mceies_encrypt | ( | botan_pubkey_t | mce_key_obj, |
| botan_rng_t | rng_obj, | ||
| const char * | aead, | ||
| const uint8_t | pt[], | ||
| size_t | pt_len, | ||
| const uint8_t | ad[], | ||
| size_t | ad_len, | ||
| uint8_t | out[], | ||
| size_t * | out_len ) |
Definition at line 1492 of file ffi_pkey_algs.cpp.
References BOTAN_FFI_ERROR_NOT_IMPLEMENTED, and BOTAN_UNUSED.
| int botan_privkey_create_dh | ( | botan_privkey_t * | key_obj, |
| botan_rng_t | rng_obj, | ||
| const char * | param_str ) |
Definition at line 597 of file ffi_pkey_algs.cpp.
References botan_privkey_create().
| int botan_privkey_create_dsa | ( | botan_privkey_t * | key, |
| botan_rng_t | rng_obj, | ||
| size_t | pbits, | ||
| size_t | qbits ) |
Definition at line 359 of file ffi_pkey_algs.cpp.
References BOTAN_FFI_ERROR_BAD_PARAMETER, BOTAN_FFI_ERROR_NOT_IMPLEMENTED, BOTAN_FFI_ERROR_NULL_POINTER, BOTAN_UNUSED, Botan_FFI::ffi_guard_thunk(), Botan_FFI::ffi_new_object(), Botan::DL_Group::Prime_Subgroup, and Botan_FFI::safe_get().
| int botan_privkey_create_ecdh | ( | botan_privkey_t * | key_obj, |
| botan_rng_t | rng_obj, | ||
| const char * | param_str ) |
Definition at line 637 of file ffi_pkey_algs.cpp.
References BOTAN_FFI_ERROR_NULL_POINTER, and botan_privkey_create().
| int botan_privkey_create_ecdsa | ( | botan_privkey_t * | key_obj, |
| botan_rng_t | rng_obj, | ||
| const char * | param_str ) |
Definition at line 438 of file ffi_pkey_algs.cpp.
References botan_privkey_create().
| int botan_privkey_create_elgamal | ( | botan_privkey_t * | key, |
| botan_rng_t | rng_obj, | ||
| size_t | pbits, | ||
| size_t | qbits ) |
Definition at line 535 of file ffi_pkey_algs.cpp.
References BOTAN_FFI_ERROR_BAD_PARAMETER, BOTAN_FFI_ERROR_NOT_IMPLEMENTED, BOTAN_FFI_ERROR_NULL_POINTER, BOTAN_UNUSED, Botan_FFI::ffi_guard_thunk(), Botan_FFI::ffi_new_object(), Botan::DL_Group::Prime_Subgroup, Botan_FFI::safe_get(), and Botan::DL_Group::Strong.
| int botan_privkey_create_mceliece | ( | botan_privkey_t * | key_obj, |
| botan_rng_t | rng_obj, | ||
| size_t | n, | ||
| size_t | t ) |
Definition at line 1475 of file ffi_pkey_algs.cpp.
References botan_privkey_create().
| int botan_privkey_create_rsa | ( | botan_privkey_t * | key_obj, |
| botan_rng_t | rng_obj, | ||
| size_t | n_bits ) |
Definition at line 227 of file ffi_pkey_algs.cpp.
References BOTAN_FFI_ERROR_BAD_PARAMETER, and botan_privkey_create().
| int botan_privkey_dsa_get_x | ( | botan_mp_t | x, |
| botan_privkey_t | key ) |
Definition at line 418 of file ffi_pkey_algs.cpp.
References botan_privkey_get_field().
| int botan_privkey_ed25519_get_privkey | ( | botan_privkey_t | key, |
| uint8_t | output[64] ) |
Definition at line 874 of file ffi_pkey_algs.cpp.
References BOTAN_FFI_ERROR_BAD_PARAMETER, BOTAN_FFI_ERROR_INSUFFICIENT_BUFFER_SPACE, BOTAN_FFI_ERROR_NOT_IMPLEMENTED, BOTAN_FFI_SUCCESS, BOTAN_FFI_VISIT, BOTAN_UNUSED, and Botan::copy_mem().
| int botan_privkey_ed448_get_privkey | ( | botan_privkey_t | key, |
| uint8_t | output[57] ) |
Definition at line 948 of file ffi_pkey_algs.cpp.
References BOTAN_FFI_ERROR_BAD_PARAMETER, BOTAN_FFI_ERROR_NOT_IMPLEMENTED, BOTAN_FFI_SUCCESS, BOTAN_FFI_VISIT, BOTAN_UNUSED, and Botan::copy_mem().
| int botan_privkey_get_field | ( | botan_mp_t | output, |
| botan_privkey_t | key, | ||
| const char * | field_name_cstr ) |
Definition at line 215 of file ffi_pkey_algs.cpp.
References BOTAN_FFI_ERROR_NULL_POINTER, BOTAN_FFI_VISIT, and Botan_FFI::safe_get().
Referenced by botan_privkey_dsa_get_x(), botan_privkey_rsa_get_d(), botan_privkey_rsa_get_e(), botan_privkey_rsa_get_n(), botan_privkey_rsa_get_p(), and botan_privkey_rsa_get_q().
| int botan_privkey_load_classic_mceliece | ( | botan_privkey_t * | key, |
| const uint8_t | privkey[], | ||
| size_t | key_len, | ||
| const char * | cmce_mode ) |
Algorithm specific key operation: Classic McEliece
Definition at line 1413 of file ffi_pkey_algs.cpp.
References BOTAN_FFI_ERROR_NOT_IMPLEMENTED, BOTAN_FFI_ERROR_NULL_POINTER, BOTAN_UNUSED, Botan_FFI::ffi_guard_thunk(), Botan_FFI::ffi_new_object(), and Botan::Classic_McEliece_Parameter_Set::from_string().
| int botan_privkey_load_dh | ( | botan_privkey_t * | key, |
| botan_mp_t | p, | ||
| botan_mp_t | g, | ||
| botan_mp_t | x ) |
Definition at line 601 of file ffi_pkey_algs.cpp.
References BOTAN_FFI_ERROR_NOT_IMPLEMENTED, BOTAN_FFI_ERROR_NULL_POINTER, BOTAN_UNUSED, Botan_FFI::ffi_guard_thunk(), Botan_FFI::ffi_new_object(), and Botan_FFI::safe_get().
| int botan_privkey_load_dsa | ( | botan_privkey_t * | key, |
| botan_mp_t | p, | ||
| botan_mp_t | q, | ||
| botan_mp_t | g, | ||
| botan_mp_t | x ) |
Definition at line 382 of file ffi_pkey_algs.cpp.
References BOTAN_FFI_ERROR_NOT_IMPLEMENTED, BOTAN_FFI_ERROR_NULL_POINTER, BOTAN_UNUSED, Botan_FFI::ffi_guard_thunk(), Botan_FFI::ffi_new_object(), and Botan_FFI::safe_get().
| int botan_privkey_load_ecdh | ( | botan_privkey_t * | key, |
| const botan_mp_t | scalar, | ||
| const char * | curve_name ) |
Definition at line 703 of file ffi_pkey_algs.cpp.
References BOTAN_FFI_ERROR_NOT_IMPLEMENTED, BOTAN_FFI_ERROR_NULL_POINTER, BOTAN_FFI_SUCCESS, BOTAN_UNUSED, Botan_FFI::ffi_guard_thunk(), Botan_FFI::ffi_new_object(), and Botan_FFI::safe_get().
| int botan_privkey_load_ecdsa | ( | botan_privkey_t * | key, |
| const botan_mp_t | scalar, | ||
| const char * | curve_name ) |
Definition at line 513 of file ffi_pkey_algs.cpp.
References BOTAN_FFI_ERROR_NOT_IMPLEMENTED, BOTAN_FFI_ERROR_NULL_POINTER, BOTAN_FFI_SUCCESS, BOTAN_UNUSED, Botan_FFI::ffi_guard_thunk(), Botan_FFI::ffi_new_object(), and Botan_FFI::safe_get().
| int botan_privkey_load_ed25519 | ( | botan_privkey_t * | key, |
| const uint8_t | privkey[32] ) |
Loads Diffie Hellman public key
| key | variable populated with key material |
| p | prime order of a Z_p group |
| g | group generator |
| y | public key |
/* Algorithm specific key operations: ElGamal Loads ElGamal public key
| key | variable populated with key material |
| p | prime order of a Z_p group |
| g | group generator |
| y | public key |
/** Loads ElGamal private key
| key | variable populated with key material |
| p | prime order of a Z_p group |
| g | group generator |
| x | private key |
/* Algorithm specific key operations: Ed25519
Definition at line 840 of file ffi_pkey_algs.cpp.
References BOTAN_FFI_ERROR_NOT_IMPLEMENTED, BOTAN_FFI_ERROR_NULL_POINTER, BOTAN_UNUSED, Botan_FFI::ffi_guard_thunk(), Botan_FFI::ffi_new_object(), and Botan::Ed25519_PrivateKey::from_seed().
| int botan_privkey_load_ed448 | ( | botan_privkey_t * | key, |
| const uint8_t | privkey[57] ) |
Definition at line 916 of file ffi_pkey_algs.cpp.
References BOTAN_FFI_ERROR_NOT_IMPLEMENTED, BOTAN_FFI_ERROR_NULL_POINTER, BOTAN_UNUSED, Botan_FFI::ffi_guard_thunk(), and Botan_FFI::ffi_new_object().
| int botan_privkey_load_elgamal | ( | botan_privkey_t * | key, |
| botan_mp_t | p, | ||
| botan_mp_t | g, | ||
| botan_mp_t | x ) |
Definition at line 578 of file ffi_pkey_algs.cpp.
References BOTAN_FFI_ERROR_NOT_IMPLEMENTED, BOTAN_FFI_ERROR_NULL_POINTER, BOTAN_UNUSED, Botan_FFI::ffi_guard_thunk(), Botan_FFI::ffi_new_object(), and Botan_FFI::safe_get().
| int botan_privkey_load_frodokem | ( | botan_privkey_t * | key, |
| const uint8_t | privkey[], | ||
| size_t | key_len, | ||
| const char * | frodo_mode ) |
Algorithm specific key operation: FrodoKEM
Definition at line 1371 of file ffi_pkey_algs.cpp.
References BOTAN_FFI_ERROR_NOT_IMPLEMENTED, BOTAN_FFI_ERROR_NULL_POINTER, BOTAN_UNUSED, Botan_FFI::ffi_guard_thunk(), and Botan_FFI::ffi_new_object().
| int botan_privkey_load_kyber | ( | botan_privkey_t * | key, |
| const uint8_t | privkey[], | ||
| size_t | key_len ) |
Definition at line 1123 of file ffi_pkey_algs.cpp.
References BOTAN_FFI_ERROR_BAD_PARAMETER, BOTAN_FFI_ERROR_NOT_IMPLEMENTED, BOTAN_FFI_ERROR_NULL_POINTER, BOTAN_UNUSED, Botan_FFI::ffi_guard_thunk(), Botan_FFI::ffi_new_object(), Botan::KyberMode::Kyber1024_R3, Botan::KyberMode::Kyber512_R3, and Botan::KyberMode::Kyber768_R3.
| int botan_privkey_load_ml_dsa | ( | botan_privkey_t * | key, |
| const uint8_t | privkey[], | ||
| size_t | key_len, | ||
| const char * | mldsa_mode ) |
Definition at line 1271 of file ffi_pkey_algs.cpp.
References BOTAN_FFI_ERROR_BAD_PARAMETER, BOTAN_FFI_ERROR_NOT_IMPLEMENTED, BOTAN_FFI_ERROR_NULL_POINTER, BOTAN_UNUSED, Botan_FFI::ffi_guard_thunk(), and Botan_FFI::ffi_new_object().
| int botan_privkey_load_ml_kem | ( | botan_privkey_t * | key, |
| const uint8_t | privkey[], | ||
| size_t | key_len, | ||
| const char * | mlkem_mode ) |
Definition at line 1221 of file ffi_pkey_algs.cpp.
References BOTAN_FFI_ERROR_BAD_PARAMETER, BOTAN_FFI_ERROR_NOT_IMPLEMENTED, BOTAN_FFI_ERROR_NULL_POINTER, BOTAN_UNUSED, Botan_FFI::ffi_guard_thunk(), and Botan_FFI::ffi_new_object().
| int botan_privkey_load_rsa | ( | botan_privkey_t * | key, |
| botan_mp_t | rsa_p, | ||
| botan_mp_t | rsa_q, | ||
| botan_mp_t | rsa_e ) |
Definition at line 237 of file ffi_pkey_algs.cpp.
References BOTAN_FFI_ERROR_NOT_IMPLEMENTED, BOTAN_FFI_ERROR_NULL_POINTER, BOTAN_UNUSED, Botan_FFI::ffi_guard_thunk(), Botan_FFI::ffi_new_object(), and Botan_FFI::safe_get().
| int botan_privkey_load_rsa_pkcs1 | ( | botan_privkey_t * | key, |
| const uint8_t | bits[], | ||
| size_t | len ) |
Definition at line 254 of file ffi_pkey_algs.cpp.
References BOTAN_FFI_ERROR_NOT_IMPLEMENTED, BOTAN_FFI_ERROR_NULL_POINTER, BOTAN_UNUSED, Botan_FFI::ffi_guard_thunk(), Botan_FFI::ffi_new_object(), and Botan::AlgorithmIdentifier::USE_NULL_PARAM.
| int botan_privkey_load_slh_dsa | ( | botan_privkey_t * | key, |
| const uint8_t | privkey[], | ||
| size_t | key_len, | ||
| const char * | slhdsa_mode ) |
Definition at line 1321 of file ffi_pkey_algs.cpp.
References BOTAN_FFI_ERROR_BAD_PARAMETER, BOTAN_FFI_ERROR_NOT_IMPLEMENTED, BOTAN_FFI_ERROR_NULL_POINTER, BOTAN_UNUSED, Botan_FFI::ffi_guard_thunk(), and Botan_FFI::ffi_new_object().
| int botan_privkey_load_sm2 | ( | botan_privkey_t * | key, |
| const botan_mp_t | scalar, | ||
| const char * | curve_name ) |
Definition at line 805 of file ffi_pkey_algs.cpp.
References BOTAN_FFI_ERROR_NOT_IMPLEMENTED, BOTAN_FFI_ERROR_NULL_POINTER, BOTAN_FFI_SUCCESS, BOTAN_UNUSED, Botan_FFI::ffi_guard_thunk(), Botan_FFI::ffi_new_object(), and Botan_FFI::safe_get().
Referenced by botan_privkey_load_sm2_enc().
| int botan_privkey_load_sm2_enc | ( | botan_privkey_t * | key, |
| const botan_mp_t | scalar, | ||
| const char * | curve_name ) |
Definition at line 834 of file ffi_pkey_algs.cpp.
References botan_privkey_load_sm2().
| int botan_privkey_load_x25519 | ( | botan_privkey_t * | key, |
| const uint8_t | privkey[32] ) |
Definition at line 984 of file ffi_pkey_algs.cpp.
References BOTAN_FFI_ERROR_NOT_IMPLEMENTED, BOTAN_FFI_ERROR_NULL_POINTER, BOTAN_UNUSED, Botan_FFI::ffi_guard_thunk(), and Botan_FFI::ffi_new_object().
| int botan_privkey_load_x448 | ( | botan_privkey_t * | key, |
| const uint8_t | privkey[56] ) |
Definition at line 1054 of file ffi_pkey_algs.cpp.
References BOTAN_FFI_ERROR_NOT_IMPLEMENTED, BOTAN_FFI_ERROR_NULL_POINTER, BOTAN_UNUSED, Botan_FFI::ffi_guard_thunk(), and Botan_FFI::ffi_new_object().
| int botan_privkey_rsa_get_d | ( | botan_mp_t | d, |
| botan_privkey_t | key ) |
Definition at line 322 of file ffi_pkey_algs.cpp.
References botan_privkey_get_field().
| int botan_privkey_rsa_get_e | ( | botan_mp_t | e, |
| botan_privkey_t | key ) |
Definition at line 318 of file ffi_pkey_algs.cpp.
References botan_privkey_get_field().
| int botan_privkey_rsa_get_n | ( | botan_mp_t | n, |
| botan_privkey_t | key ) |
Definition at line 314 of file ffi_pkey_algs.cpp.
References botan_privkey_get_field().
| int botan_privkey_rsa_get_p | ( | botan_mp_t | p, |
| botan_privkey_t | key ) |
Definition at line 306 of file ffi_pkey_algs.cpp.
References botan_privkey_get_field().
| int botan_privkey_rsa_get_privkey | ( | botan_privkey_t | rsa_key, |
| uint8_t | out[], | ||
| size_t * | out_len, | ||
| uint32_t | flags ) |
Definition at line 334 of file ffi_pkey_algs.cpp.
References BOTAN_FFI_ERROR_BAD_FLAG, BOTAN_FFI_ERROR_BAD_PARAMETER, BOTAN_FFI_ERROR_NOT_IMPLEMENTED, BOTAN_FFI_VISIT, BOTAN_PRIVKEY_EXPORT_FLAG_DER, BOTAN_PRIVKEY_EXPORT_FLAG_PEM, BOTAN_UNUSED, Botan::PEM_Code::encode(), Botan_FFI::write_str_output(), and Botan_FFI::write_vec_output().
| int botan_privkey_rsa_get_q | ( | botan_mp_t | q, |
| botan_privkey_t | key ) |
Definition at line 310 of file ffi_pkey_algs.cpp.
References botan_privkey_get_field().
| int botan_privkey_view_kyber_raw_key | ( | botan_privkey_t | key, |
| botan_view_ctx | ctx, | ||
| botan_view_bin_fn | view ) |
Definition at line 1187 of file ffi_pkey_algs.cpp.
References BOTAN_FFI_ERROR_BAD_PARAMETER, BOTAN_FFI_ERROR_NOT_IMPLEMENTED, BOTAN_FFI_VISIT, BOTAN_UNUSED, and Botan_FFI::invoke_view_callback().
| int botan_privkey_x25519_get_privkey | ( | botan_privkey_t | key, |
| uint8_t | output[32] ) |
Definition at line 1016 of file ffi_pkey_algs.cpp.
References BOTAN_FFI_ERROR_BAD_PARAMETER, BOTAN_FFI_ERROR_INSUFFICIENT_BUFFER_SPACE, BOTAN_FFI_ERROR_NOT_IMPLEMENTED, BOTAN_FFI_SUCCESS, BOTAN_FFI_VISIT, BOTAN_UNUSED, and Botan::copy_mem().
| int botan_privkey_x448_get_privkey | ( | botan_privkey_t | key, |
| uint8_t | output[56] ) |
Definition at line 1086 of file ffi_pkey_algs.cpp.
References BOTAN_FFI_ERROR_BAD_PARAMETER, BOTAN_FFI_ERROR_NOT_IMPLEMENTED, BOTAN_FFI_SUCCESS, BOTAN_FFI_VISIT, BOTAN_UNUSED, and Botan::copy_mem().
| int botan_pubkey_dsa_get_g | ( | botan_mp_t | g, |
| botan_pubkey_t | key ) |
Definition at line 430 of file ffi_pkey_algs.cpp.
References botan_pubkey_get_field().
| int botan_pubkey_dsa_get_p | ( | botan_mp_t | p, |
| botan_pubkey_t | key ) |
Definition at line 422 of file ffi_pkey_algs.cpp.
References botan_pubkey_get_field().
| int botan_pubkey_dsa_get_q | ( | botan_mp_t | q, |
| botan_pubkey_t | key ) |
Definition at line 426 of file ffi_pkey_algs.cpp.
References botan_pubkey_get_field().
| int botan_pubkey_dsa_get_y | ( | botan_mp_t | y, |
| botan_pubkey_t | key ) |
Definition at line 434 of file ffi_pkey_algs.cpp.
References botan_pubkey_get_field().
| int botan_pubkey_ecc_key_used_explicit_encoding | ( | botan_pubkey_t | key | ) |
Definition at line 444 of file ffi_pkey_algs.cpp.
References BOTAN_FFI_ERROR_BAD_PARAMETER, BOTAN_FFI_ERROR_NOT_IMPLEMENTED, BOTAN_UNUSED, Botan::EC_PublicKey::domain(), Botan_FFI::ffi_guard_thunk(), Botan_FFI::safe_get(), and Botan::EC_Group::used_explicit_encoding().
| int botan_pubkey_ed25519_get_pubkey | ( | botan_pubkey_t | key, |
| uint8_t | output[32] ) |
Definition at line 894 of file ffi_pkey_algs.cpp.
References BOTAN_FFI_ERROR_BAD_PARAMETER, BOTAN_FFI_ERROR_INSUFFICIENT_BUFFER_SPACE, BOTAN_FFI_ERROR_NOT_IMPLEMENTED, BOTAN_FFI_SUCCESS, BOTAN_FFI_VISIT, BOTAN_UNUSED, and Botan::copy_mem().
| int botan_pubkey_ed448_get_pubkey | ( | botan_pubkey_t | key, |
| uint8_t | output[57] ) |
Definition at line 965 of file ffi_pkey_algs.cpp.
References BOTAN_FFI_ERROR_BAD_PARAMETER, BOTAN_FFI_ERROR_NOT_IMPLEMENTED, BOTAN_FFI_SUCCESS, BOTAN_FFI_VISIT, BOTAN_UNUSED, and Botan::copy_mem().
| int botan_pubkey_get_field | ( | botan_mp_t | output, |
| botan_pubkey_t | key, | ||
| const char * | field_name_cstr ) |
Definition at line 205 of file ffi_pkey_algs.cpp.
References BOTAN_FFI_ERROR_NULL_POINTER, BOTAN_FFI_VISIT, and Botan_FFI::safe_get().
Referenced by botan_pubkey_dsa_get_g(), botan_pubkey_dsa_get_p(), botan_pubkey_dsa_get_q(), botan_pubkey_dsa_get_y(), botan_pubkey_rsa_get_e(), and botan_pubkey_rsa_get_n().
| int botan_pubkey_load_classic_mceliece | ( | botan_pubkey_t * | key, |
| const uint8_t | pubkey[], | ||
| size_t | key_len, | ||
| const char * | cmce_mode ) |
Definition at line 1435 of file ffi_pkey_algs.cpp.
References BOTAN_FFI_ERROR_NOT_IMPLEMENTED, BOTAN_FFI_ERROR_NULL_POINTER, BOTAN_UNUSED, Botan_FFI::ffi_guard_thunk(), Botan_FFI::ffi_new_object(), and Botan::Classic_McEliece_Parameter_Set::from_string().
| int botan_pubkey_load_dh | ( | botan_pubkey_t * | key, |
| botan_mp_t | p, | ||
| botan_mp_t | g, | ||
| botan_mp_t | y ) |
Definition at line 618 of file ffi_pkey_algs.cpp.
References BOTAN_FFI_ERROR_NOT_IMPLEMENTED, BOTAN_FFI_ERROR_NULL_POINTER, BOTAN_UNUSED, Botan_FFI::ffi_guard_thunk(), Botan_FFI::ffi_new_object(), and Botan_FFI::safe_get().
| int botan_pubkey_load_dsa | ( | botan_pubkey_t * | key, |
| botan_mp_t | p, | ||
| botan_mp_t | q, | ||
| botan_mp_t | g, | ||
| botan_mp_t | y ) |
Definition at line 400 of file ffi_pkey_algs.cpp.
References BOTAN_FFI_ERROR_NOT_IMPLEMENTED, BOTAN_FFI_ERROR_NULL_POINTER, BOTAN_UNUSED, Botan_FFI::ffi_guard_thunk(), Botan_FFI::ffi_new_object(), and Botan_FFI::safe_get().
| int botan_pubkey_load_ecdh | ( | botan_pubkey_t * | key, |
| const botan_mp_t | public_x, | ||
| const botan_mp_t | public_y, | ||
| const char * | curve_name ) |
Definition at line 656 of file ffi_pkey_algs.cpp.
References BOTAN_FFI_ERROR_NOT_IMPLEMENTED, BOTAN_FFI_ERROR_NULL_POINTER, BOTAN_FFI_SUCCESS, BOTAN_UNUSED, Botan_FFI::ffi_guard_thunk(), Botan_FFI::ffi_new_object(), and Botan_FFI::safe_get().
| int botan_pubkey_load_ecdh_sec1 | ( | botan_pubkey_t * | key, |
| const uint8_t | sec1[], | ||
| size_t | sec1_len, | ||
| const char * | curve_name ) |
Definition at line 680 of file ffi_pkey_algs.cpp.
References BOTAN_FFI_ERROR_NOT_IMPLEMENTED, BOTAN_FFI_ERROR_NULL_POINTER, BOTAN_FFI_SUCCESS, BOTAN_UNUSED, Botan_FFI::ffi_guard_thunk(), and Botan_FFI::ffi_new_object().
| int botan_pubkey_load_ecdsa | ( | botan_pubkey_t * | key, |
| const botan_mp_t | public_x, | ||
| const botan_mp_t | public_y, | ||
| const char * | curve_name ) |
Definition at line 464 of file ffi_pkey_algs.cpp.
References BOTAN_FFI_ERROR_NOT_IMPLEMENTED, BOTAN_FFI_ERROR_NULL_POINTER, BOTAN_FFI_SUCCESS, BOTAN_UNUSED, Botan_FFI::ffi_guard_thunk(), Botan_FFI::ffi_new_object(), and Botan_FFI::safe_get().
| int botan_pubkey_load_ecdsa_sec1 | ( | botan_pubkey_t * | key, |
| const uint8_t | sec1[], | ||
| size_t | sec1_len, | ||
| const char * | curve_name ) |
Definition at line 490 of file ffi_pkey_algs.cpp.
References BOTAN_FFI_ERROR_NOT_IMPLEMENTED, BOTAN_FFI_ERROR_NULL_POINTER, BOTAN_FFI_SUCCESS, BOTAN_UNUSED, Botan_FFI::ffi_guard_thunk(), and Botan_FFI::ffi_new_object().
| int botan_pubkey_load_ed25519 | ( | botan_pubkey_t * | key, |
| const uint8_t | pubkey[32] ) |
Definition at line 857 of file ffi_pkey_algs.cpp.
References BOTAN_FFI_ERROR_NOT_IMPLEMENTED, BOTAN_FFI_ERROR_NULL_POINTER, BOTAN_UNUSED, Botan_FFI::ffi_guard_thunk(), and Botan_FFI::ffi_new_object().
| int botan_pubkey_load_ed448 | ( | botan_pubkey_t * | key, |
| const uint8_t | pubkey[57] ) |
Definition at line 932 of file ffi_pkey_algs.cpp.
References BOTAN_FFI_ERROR_NOT_IMPLEMENTED, BOTAN_FFI_ERROR_NULL_POINTER, BOTAN_UNUSED, Botan_FFI::ffi_guard_thunk(), and Botan_FFI::ffi_new_object().
| int botan_pubkey_load_elgamal | ( | botan_pubkey_t * | key, |
| botan_mp_t | p, | ||
| botan_mp_t | g, | ||
| botan_mp_t | y ) |
Definition at line 561 of file ffi_pkey_algs.cpp.
References BOTAN_FFI_ERROR_NOT_IMPLEMENTED, BOTAN_FFI_ERROR_NULL_POINTER, BOTAN_UNUSED, Botan_FFI::ffi_guard_thunk(), Botan_FFI::ffi_new_object(), and Botan_FFI::safe_get().
| int botan_pubkey_load_frodokem | ( | botan_pubkey_t * | key, |
| const uint8_t | pubkey[], | ||
| size_t | key_len, | ||
| const char * | frodo_mode ) |
Definition at line 1390 of file ffi_pkey_algs.cpp.
References BOTAN_FFI_ERROR_NOT_IMPLEMENTED, BOTAN_FFI_ERROR_NULL_POINTER, BOTAN_UNUSED, Botan_FFI::ffi_guard_thunk(), and Botan_FFI::ffi_new_object().
| int botan_pubkey_load_kyber | ( | botan_pubkey_t * | key, |
| const uint8_t | pubkey[], | ||
| size_t | key_len ) |
Definition at line 1156 of file ffi_pkey_algs.cpp.
References BOTAN_FFI_ERROR_BAD_PARAMETER, BOTAN_FFI_ERROR_NOT_IMPLEMENTED, BOTAN_FFI_ERROR_NULL_POINTER, BOTAN_UNUSED, Botan_FFI::ffi_new_object(), Botan::KyberMode::Kyber1024_R3, Botan::KyberMode::Kyber512_R3, and Botan::KyberMode::Kyber768_R3.
| int botan_pubkey_load_ml_dsa | ( | botan_pubkey_t * | key, |
| const uint8_t | pubkey[], | ||
| size_t | key_len, | ||
| const char * | mldsa_mode ) |
Definition at line 1294 of file ffi_pkey_algs.cpp.
References BOTAN_FFI_ERROR_BAD_PARAMETER, BOTAN_FFI_ERROR_NOT_IMPLEMENTED, BOTAN_FFI_ERROR_NULL_POINTER, BOTAN_UNUSED, Botan_FFI::ffi_guard_thunk(), and Botan_FFI::ffi_new_object().
| int botan_pubkey_load_ml_kem | ( | botan_pubkey_t * | key, |
| const uint8_t | pubkey[], | ||
| size_t | key_len, | ||
| const char * | mlkem_mode ) |
Definition at line 1244 of file ffi_pkey_algs.cpp.
References BOTAN_FFI_ERROR_BAD_PARAMETER, BOTAN_FFI_ERROR_NOT_IMPLEMENTED, BOTAN_FFI_ERROR_NULL_POINTER, BOTAN_UNUSED, Botan_FFI::ffi_guard_thunk(), and Botan_FFI::ffi_new_object().
| int botan_pubkey_load_rsa | ( | botan_pubkey_t * | key, |
| botan_mp_t | n, | ||
| botan_mp_t | e ) |
Definition at line 272 of file ffi_pkey_algs.cpp.
References BOTAN_FFI_ERROR_NOT_IMPLEMENTED, BOTAN_FFI_ERROR_NULL_POINTER, BOTAN_UNUSED, Botan_FFI::ffi_guard_thunk(), Botan_FFI::ffi_new_object(), and Botan_FFI::safe_get().
| int botan_pubkey_load_rsa_pkcs1 | ( | botan_pubkey_t * | key, |
| const uint8_t | bits[], | ||
| size_t | len ) |
Definition at line 288 of file ffi_pkey_algs.cpp.
References BOTAN_FFI_ERROR_NOT_IMPLEMENTED, BOTAN_FFI_ERROR_NULL_POINTER, BOTAN_UNUSED, Botan_FFI::ffi_guard_thunk(), Botan_FFI::ffi_new_object(), and Botan::AlgorithmIdentifier::USE_NULL_PARAM.
| int botan_pubkey_load_slh_dsa | ( | botan_pubkey_t * | key, |
| const uint8_t | pubkey[], | ||
| size_t | key_len, | ||
| const char * | slhdsa_mode ) |
Definition at line 1344 of file ffi_pkey_algs.cpp.
References BOTAN_FFI_ERROR_BAD_PARAMETER, BOTAN_FFI_ERROR_NOT_IMPLEMENTED, BOTAN_FFI_ERROR_NULL_POINTER, BOTAN_UNUSED, Botan_FFI::ffi_guard_thunk(), and Botan_FFI::ffi_new_object().
| int botan_pubkey_load_sm2 | ( | botan_pubkey_t * | key, |
| const botan_mp_t | public_x, | ||
| const botan_mp_t | public_y, | ||
| const char * | curve_name ) |
Definition at line 758 of file ffi_pkey_algs.cpp.
References BOTAN_FFI_ERROR_NOT_IMPLEMENTED, BOTAN_FFI_ERROR_NULL_POINTER, BOTAN_FFI_ERROR_UNKNOWN_ERROR, BOTAN_UNUSED, Botan_FFI::ffi_guard_thunk(), Botan_FFI::ffi_new_object(), and Botan_FFI::safe_get().
Referenced by botan_pubkey_load_sm2_enc().
| int botan_pubkey_load_sm2_enc | ( | botan_pubkey_t * | key, |
| const botan_mp_t | public_x, | ||
| const botan_mp_t | public_y, | ||
| const char * | curve_name ) |
Definition at line 827 of file ffi_pkey_algs.cpp.
References botan_pubkey_load_sm2().
| int botan_pubkey_load_sm2_sec1 | ( | botan_pubkey_t * | key, |
| const uint8_t | sec1[], | ||
| size_t | sec1_len, | ||
| const char * | curve_name ) |
Definition at line 782 of file ffi_pkey_algs.cpp.
References BOTAN_FFI_ERROR_NOT_IMPLEMENTED, BOTAN_FFI_ERROR_NULL_POINTER, BOTAN_FFI_SUCCESS, BOTAN_UNUSED, Botan_FFI::ffi_guard_thunk(), and Botan_FFI::ffi_new_object().
| int botan_pubkey_load_x25519 | ( | botan_pubkey_t * | key, |
| const uint8_t | pubkey[32] ) |
Definition at line 1000 of file ffi_pkey_algs.cpp.
References BOTAN_FFI_ERROR_NOT_IMPLEMENTED, BOTAN_FFI_ERROR_NULL_POINTER, BOTAN_UNUSED, Botan_FFI::ffi_guard_thunk(), and Botan_FFI::ffi_new_object().
| int botan_pubkey_load_x448 | ( | botan_pubkey_t * | key, |
| const uint8_t | pubkey[56] ) |
Definition at line 1070 of file ffi_pkey_algs.cpp.
References BOTAN_FFI_ERROR_NOT_IMPLEMENTED, BOTAN_FFI_ERROR_NULL_POINTER, BOTAN_UNUSED, Botan_FFI::ffi_guard_thunk(), and Botan_FFI::ffi_new_object().
| int botan_pubkey_rsa_get_e | ( | botan_mp_t | e, |
| botan_pubkey_t | key ) |
Definition at line 326 of file ffi_pkey_algs.cpp.
References botan_pubkey_get_field().
| int botan_pubkey_rsa_get_n | ( | botan_mp_t | n, |
| botan_pubkey_t | key ) |
Definition at line 330 of file ffi_pkey_algs.cpp.
References botan_pubkey_get_field().
| int botan_pubkey_sm2_compute_za | ( | uint8_t | out[], |
| size_t * | out_len, | ||
| const char * | ident, | ||
| const char * | hash_algo, | ||
| const botan_pubkey_t | key ) |
Definition at line 725 of file ffi_pkey_algs.cpp.
References Botan::EC_PublicKey::_public_ec_point(), Botan::Asymmetric_Key::algo_name(), BOTAN_FFI_ERROR_BAD_PARAMETER, BOTAN_FFI_ERROR_NOT_IMPLEMENTED, BOTAN_FFI_ERROR_NULL_POINTER, Botan::HashFunction::create_or_throw(), Botan::EC_PublicKey::domain(), Botan_FFI::ffi_guard_thunk(), Botan_FFI::safe_get(), Botan::sm2_compute_za(), and Botan_FFI::write_vec_output().
| int botan_pubkey_view_ec_public_point | ( | botan_pubkey_t | key, |
| botan_view_ctx | ctx, | ||
| botan_view_bin_fn | view ) |
View the uncompressed public point associated with the key
Definition at line 1457 of file ffi_pkey_algs.cpp.
References BOTAN_FFI_ERROR_BAD_PARAMETER, BOTAN_FFI_ERROR_NOT_IMPLEMENTED, BOTAN_FFI_VISIT, BOTAN_UNUSED, and Botan_FFI::invoke_view_callback().
| int botan_pubkey_view_kyber_raw_key | ( | botan_pubkey_t | key, |
| botan_view_ctx | ctx, | ||
| botan_view_bin_fn | view ) |
Definition at line 1202 of file ffi_pkey_algs.cpp.
References BOTAN_FFI_ERROR_BAD_PARAMETER, BOTAN_FFI_ERROR_NOT_IMPLEMENTED, BOTAN_FFI_VISIT, BOTAN_UNUSED, and Botan_FFI::invoke_view_callback().
| int botan_pubkey_x25519_get_pubkey | ( | botan_pubkey_t | key, |
| uint8_t | output[32] ) |
Definition at line 1036 of file ffi_pkey_algs.cpp.
References BOTAN_FFI_ERROR_BAD_PARAMETER, BOTAN_FFI_ERROR_NOT_IMPLEMENTED, BOTAN_FFI_SUCCESS, BOTAN_FFI_VISIT, BOTAN_UNUSED, and Botan::copy_mem().
| int botan_pubkey_x448_get_pubkey | ( | botan_pubkey_t | key, |
| uint8_t | output[56] ) |
Definition at line 1103 of file ffi_pkey_algs.cpp.
References BOTAN_FFI_ERROR_BAD_PARAMETER, BOTAN_FFI_ERROR_NOT_IMPLEMENTED, BOTAN_FFI_SUCCESS, BOTAN_FFI_VISIT, BOTAN_UNUSED, and Botan::copy_mem().