Botan 2.19.3
Crypto and TLS for C&
|
#include <botan/ffi.h>
#include <botan/internal/ffi_util.h>
#include <botan/internal/ffi_pkey.h>
#include <botan/internal/ffi_rng.h>
#include <botan/pubkey.h>
Go to the source code of this file.
BOTAN_FFI_DECLARE_STRUCT | ( | botan_pk_op_decrypt_struct | , |
Botan::PK_Decryptor | , | ||
0x912F3C37 | |||
) |
BOTAN_FFI_DECLARE_STRUCT | ( | botan_pk_op_encrypt_struct | , |
Botan::PK_Encryptor | , | ||
0x891F3FC3 | |||
) |
BOTAN_FFI_DECLARE_STRUCT | ( | botan_pk_op_ka_struct | , |
Botan::PK_Key_Agreement | , | ||
0x2939CAB1 | |||
) |
BOTAN_FFI_DECLARE_STRUCT | ( | botan_pk_op_sign_struct | , |
Botan::PK_Signer | , | ||
0x1AF0C39F | |||
) |
BOTAN_FFI_DECLARE_STRUCT | ( | botan_pk_op_verify_struct | , |
Botan::PK_Verifier | , | ||
0x2B91F936 | |||
) |
int botan_pk_op_decrypt | ( | botan_pk_op_decrypt_t | op, |
uint8_t | out[], | ||
size_t * | out_len, | ||
const uint8_t | ciphertext[], | ||
size_t | ciphertext_len | ||
) |
Definition at line 100 of file ffi_pk_op.cpp.
References BOTAN_FFI_DO, and Botan_FFI::write_vec_output().
int botan_pk_op_decrypt_create | ( | botan_pk_op_decrypt_t * | op, |
botan_privkey_t | key_obj, | ||
const char * | padding, | ||
uint32_t | flags | ||
) |
Definition at line 68 of file ffi_pk_op.cpp.
References BOTAN_FFI_ERROR_BAD_FLAG, BOTAN_FFI_ERROR_NULL_POINTER, BOTAN_FFI_SUCCESS, Botan_FFI::ffi_guard_thunk(), Botan_FFI::safe_get(), and Botan::system_rng().
int botan_pk_op_decrypt_destroy | ( | botan_pk_op_decrypt_t | op | ) |
Definition at line 88 of file ffi_pk_op.cpp.
References BOTAN_FFI_CHECKED_DELETE.
int botan_pk_op_decrypt_output_length | ( | botan_pk_op_decrypt_t | op, |
size_t | ctext_len, | ||
size_t * | ptext_len | ||
) |
Definition at line 93 of file ffi_pk_op.cpp.
References BOTAN_FFI_DO, BOTAN_FFI_ERROR_NULL_POINTER, and Botan::PK_Decryptor::plaintext_length().
int botan_pk_op_encrypt | ( | botan_pk_op_encrypt_t | op, |
botan_rng_t | rng_obj, | ||
uint8_t | out[], | ||
size_t * | out_len, | ||
const uint8_t | plaintext[], | ||
size_t | plaintext_len | ||
) |
Definition at line 55 of file ffi_pk_op.cpp.
References BOTAN_FFI_DO, Botan_FFI::safe_get(), and Botan_FFI::write_vec_output().
int botan_pk_op_encrypt_create | ( | botan_pk_op_encrypt_t * | op, |
botan_pubkey_t | key_obj, | ||
const char * | padding, | ||
uint32_t | flags | ||
) |
Definition at line 23 of file ffi_pk_op.cpp.
References BOTAN_FFI_ERROR_BAD_FLAG, BOTAN_FFI_ERROR_NULL_POINTER, BOTAN_FFI_SUCCESS, BOTAN_PUBKEY_DER_FORMAT_SIGNATURE, Botan_FFI::ffi_guard_thunk(), Botan_FFI::safe_get(), and Botan::system_rng().
int botan_pk_op_encrypt_destroy | ( | botan_pk_op_encrypt_t | op | ) |
Definition at line 43 of file ffi_pk_op.cpp.
References BOTAN_FFI_CHECKED_DELETE.
int botan_pk_op_encrypt_output_length | ( | botan_pk_op_encrypt_t | op, |
size_t | ptext_len, | ||
size_t * | ctext_len | ||
) |
Definition at line 48 of file ffi_pk_op.cpp.
References BOTAN_FFI_DO, BOTAN_FFI_ERROR_NULL_POINTER, and Botan::PK_Encryptor::ciphertext_length().
int botan_pk_op_key_agreement | ( | botan_pk_op_ka_t | op, |
uint8_t | out[], | ||
size_t * | out_len, | ||
const uint8_t | other_key[], | ||
size_t | other_key_len, | ||
const uint8_t | salt[], | ||
size_t | salt_len | ||
) |
Definition at line 244 of file ffi_pk_op.cpp.
References BOTAN_FFI_DO, Botan::PK_Key_Agreement::derive_key(), salt_len, and Botan_FFI::write_vec_output().
int botan_pk_op_key_agreement_create | ( | botan_pk_op_ka_t * | op, |
botan_privkey_t | key_obj, | ||
const char * | kdf, | ||
uint32_t | flags | ||
) |
Definition at line 201 of file ffi_pk_op.cpp.
References BOTAN_FFI_ERROR_BAD_FLAG, BOTAN_FFI_ERROR_NULL_POINTER, BOTAN_FFI_SUCCESS, Botan_FFI::ffi_guard_thunk(), Botan_FFI::safe_get(), and Botan::system_rng().
int botan_pk_op_key_agreement_destroy | ( | botan_pk_op_ka_t | op | ) |
Definition at line 220 of file ffi_pk_op.cpp.
References BOTAN_FFI_CHECKED_DELETE.
int botan_pk_op_key_agreement_export_public | ( | botan_privkey_t | key, |
uint8_t | out[], | ||
size_t * | out_len | ||
) |
Definition at line 225 of file ffi_pk_op.cpp.
References BOTAN_FFI_DO, BOTAN_FFI_ERROR_BAD_FLAG, and Botan_FFI::write_vec_output().
int botan_pk_op_key_agreement_size | ( | botan_pk_op_ka_t | op, |
size_t * | out_len | ||
) |
Definition at line 235 of file ffi_pk_op.cpp.
References Botan::PK_Key_Agreement::agreed_value_size(), BOTAN_FFI_DO, and BOTAN_FFI_ERROR_NULL_POINTER.
int botan_pk_op_sign_create | ( | botan_pk_op_sign_t * | op, |
botan_privkey_t | key_obj, | ||
const char * | hash, | ||
uint32_t | flags | ||
) |
Definition at line 112 of file ffi_pk_op.cpp.
References BOTAN_FFI_ERROR_BAD_FLAG, BOTAN_FFI_ERROR_NULL_POINTER, BOTAN_FFI_SUCCESS, BOTAN_PUBKEY_DER_FORMAT_SIGNATURE, Botan::DER_SEQUENCE, Botan_FFI::ffi_guard_thunk(), hash, Botan::IEEE_1363, Botan_FFI::safe_get(), and Botan::system_rng().
int botan_pk_op_sign_destroy | ( | botan_pk_op_sign_t | op | ) |
Definition at line 134 of file ffi_pk_op.cpp.
References BOTAN_FFI_CHECKED_DELETE.
int botan_pk_op_sign_finish | ( | botan_pk_op_sign_t | op, |
botan_rng_t | rng_obj, | ||
uint8_t | out[], | ||
size_t * | out_len | ||
) |
Definition at line 152 of file ffi_pk_op.cpp.
References BOTAN_FFI_DO, Botan_FFI::safe_get(), and Botan_FFI::write_vec_output().
int botan_pk_op_sign_output_length | ( | botan_pk_op_sign_t | op, |
size_t * | sig_len | ||
) |
Definition at line 139 of file ffi_pk_op.cpp.
References BOTAN_FFI_DO, BOTAN_FFI_ERROR_NULL_POINTER, and Botan::PK_Signer::signature_length().
int botan_pk_op_sign_update | ( | botan_pk_op_sign_t | op, |
const uint8_t | in[], | ||
size_t | in_len | ||
) |
Definition at line 147 of file ffi_pk_op.cpp.
References BOTAN_FFI_DO, and Botan::PK_Signer::update().
int botan_pk_op_verify_create | ( | botan_pk_op_verify_t * | op, |
botan_pubkey_t | key_obj, | ||
const char * | hash, | ||
uint32_t | flags | ||
) |
Definition at line 159 of file ffi_pk_op.cpp.
References BOTAN_FFI_ERROR_BAD_FLAG, BOTAN_FFI_ERROR_NULL_POINTER, BOTAN_FFI_SUCCESS, BOTAN_PUBKEY_DER_FORMAT_SIGNATURE, Botan::DER_SEQUENCE, Botan_FFI::ffi_guard_thunk(), hash, Botan::IEEE_1363, and Botan_FFI::safe_get().
int botan_pk_op_verify_destroy | ( | botan_pk_op_verify_t | op | ) |
Definition at line 179 of file ffi_pk_op.cpp.
References BOTAN_FFI_CHECKED_DELETE.
int botan_pk_op_verify_finish | ( | botan_pk_op_verify_t | op, |
const uint8_t | sig[], | ||
size_t | sig_len | ||
) |
Definition at line 189 of file ffi_pk_op.cpp.
References BOTAN_FFI_INVALID_VERIFIER, BOTAN_FFI_RETURNING, BOTAN_FFI_SUCCESS, and Botan::PK_Verifier::check_signature().
int botan_pk_op_verify_update | ( | botan_pk_op_verify_t | op, |
const uint8_t | in[], | ||
size_t | in_len | ||
) |
Definition at line 184 of file ffi_pk_op.cpp.
References BOTAN_FFI_DO, and Botan::PK_Verifier::update().