Botan 3.6.1
Crypto and TLS for C&
|
#include <botan/ffi.h>
#include <botan/internal/ffi_rng.h>
#include <botan/internal/ffi_util.h>
Go to the source code of this file.
Functions | |
BOTAN_FFI_DECLARE_DUMMY_STRUCT (botan_srp6_server_session_struct, 0x44F7425F) | |
int | botan_srp6_client_agree (const char *identity, const char *password, const char *group_id, const char *hash_id, const uint8_t salt[], size_t salt_len, const uint8_t b[], size_t b_len, botan_rng_t rng_obj, uint8_t A[], size_t *A_len, uint8_t K[], size_t *K_len) |
int | botan_srp6_generate_verifier (const char *username, const char *password, const uint8_t salt[], size_t salt_len, const char *group_id, const char *hash_id, uint8_t verifier[], size_t *verifier_len) |
int | botan_srp6_group_size (const char *group_id, size_t *group_p_bytes) |
int | botan_srp6_server_session_destroy (botan_srp6_server_session_t srp6) |
int | botan_srp6_server_session_init (botan_srp6_server_session_t *srp6) |
int | botan_srp6_server_session_step1 (botan_srp6_server_session_t srp6, const uint8_t *verifier, size_t verifier_len, const char *group_id, const char *hash_id, botan_rng_t rng_obj, uint8_t b_pub[], size_t *b_pub_len) |
int | botan_srp6_server_session_step2 (botan_srp6_server_session_t srp6, const uint8_t a[], size_t a_len, uint8_t key[], size_t *key_len) |
BOTAN_FFI_DECLARE_DUMMY_STRUCT | ( | botan_srp6_server_session_struct | , |
0x44F7425F | ) |
int botan_srp6_client_agree | ( | const char * | username, |
const char * | password, | ||
const char * | group_id, | ||
const char * | hash_id, | ||
const uint8_t | salt[], | ||
size_t | salt_len, | ||
const uint8_t | B[], | ||
size_t | B_len, | ||
botan_rng_t | rng_obj, | ||
uint8_t | A[], | ||
size_t * | A_len, | ||
uint8_t | K[], | ||
size_t * | K_len ) |
SRP6a Client side
username | the username we are attempting login for |
password | the password we are attempting to use |
group_id | specifies the shared SRP group |
hash_id | specifies a secure hash function |
salt | is the salt value sent by the server |
salt_len | the length of salt |
B | is the server's public value |
B_len | is the server's public value length |
rng_obj | is a random number generator object |
A | out buffer to store the SRP-6 A value |
A_len | SRP-6 A verifier value length |
K | out buffer to store the symmetric value |
K_len | symmetric key length |
Definition at line 143 of file ffi_srp6.cpp.
References BOTAN_FFI_ERROR_BAD_PARAMETER, BOTAN_FFI_ERROR_NOT_IMPLEMENTED, BOTAN_FFI_ERROR_NULL_POINTER, BOTAN_FFI_SUCCESS, BOTAN_UNUSED, Botan_FFI::ffi_guard_thunk(), Botan::BigInt::from_bytes(), Botan_FFI::safe_get(), Botan::srp6_client_agree(), and Botan_FFI::write_vec_output().
int botan_srp6_generate_verifier | ( | const char * | identifier, |
const char * | password, | ||
const uint8_t | salt[], | ||
size_t | salt_len, | ||
const char * | group_id, | ||
const char * | hash_id, | ||
uint8_t | verifier[], | ||
size_t * | verifier_len ) |
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 |
salt_len | the length of salt |
group_id | specifies the shared SRP group |
hash_id | specifies a secure hash function |
verifier | out buffer to store the SRP-6 verifier value |
verifier_len | SRP-6 verifier value length |
Definition at line 115 of file ffi_srp6.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::srp6_generate_verifier(), and Botan_FFI::write_vec_output().
int botan_srp6_group_size | ( | const char * | group_id, |
size_t * | group_p_bytes ) |
Return the size, in bytes, of the prime associated with group_id
Definition at line 47 of file ffi_srp6.cpp.
References BOTAN_FFI_ERROR_NOT_IMPLEMENTED, BOTAN_FFI_ERROR_NULL_POINTER, BOTAN_FFI_SUCCESS, BOTAN_UNUSED, Botan_FFI::ffi_guard_thunk(), and Botan::DL_Group::p_bytes().
int botan_srp6_server_session_destroy | ( | botan_srp6_server_session_t | srp6 | ) |
Frees all resources of the SRP-6 server session object
srp6 | SRP-6 server session object |
Definition at line 43 of file ffi_srp6.cpp.
References BOTAN_FFI_CHECKED_DELETE.
int botan_srp6_server_session_init | ( | botan_srp6_server_session_t * | srp6 | ) |
Initialize an SRP-6 server session object
srp6 | SRP-6 server session object |
Definition at line 31 of file ffi_srp6.cpp.
References BOTAN_FFI_ERROR_NOT_IMPLEMENTED, BOTAN_FFI_SUCCESS, BOTAN_UNUSED, and Botan_FFI::ffi_guard_thunk().
int botan_srp6_server_session_step1 | ( | botan_srp6_server_session_t | srp6, |
const uint8_t * | verifier, | ||
size_t | verifier_len, | ||
const char * | group_id, | ||
const char * | hash_id, | ||
botan_rng_t | rng_obj, | ||
uint8_t | b_pub[], | ||
size_t * | b_pub_len ) |
Definition at line 64 of file ffi_srp6.cpp.
References BOTAN_FFI_ERROR_BAD_PARAMETER, BOTAN_FFI_ERROR_NOT_IMPLEMENTED, BOTAN_FFI_ERROR_NULL_POINTER, BOTAN_FFI_VISIT, BOTAN_UNUSED, Botan::BigInt::from_bytes(), Botan_FFI::safe_get(), and Botan_FFI::write_vec_output().
int botan_srp6_server_session_step2 | ( | botan_srp6_server_session_t | srp6, |
const uint8_t | A[], | ||
size_t | A_len, | ||
uint8_t | key[], | ||
size_t * | key_len ) |
SRP-6 Server side step 2
srp6 | SRP-6 server session object |
A | the client's value |
A_len | the client's value length |
key | out buffer to store the symmetric key value |
key_len | symmetric key length |
Definition at line 94 of file ffi_srp6.cpp.
References BOTAN_FFI_ERROR_BAD_PARAMETER, BOTAN_FFI_ERROR_NOT_IMPLEMENTED, BOTAN_FFI_ERROR_NULL_POINTER, BOTAN_FFI_VISIT, BOTAN_UNUSED, Botan::BigInt::from_bytes(), and Botan_FFI::write_vec_output().