5 #ifndef EAP_PWD_COMMON_H
6 #define EAP_PWD_COMMON_H
8 #include <openssl/bn.h>
9 #include <openssl/ec.h>
10 #include <openssl/evp.h>
28 #define EAP_PWD_HDR_SIZE 1
30 #define EAP_PWD_OPCODE_ID_EXCH 1
31 #define EAP_PWD_OPCODE_COMMIT_EXCH 2
32 #define EAP_PWD_OPCODE_CONFIRM_EXCH 3
33 #define EAP_PWD_GET_LENGTH_BIT(x) ((x) & 0x80)
34 #define EAP_PWD_SET_LENGTH_BIT(x) ((x) |= 0x80)
35 #define EAP_PWD_GET_MORE_BIT(x) ((x) & 0x40)
36 #define EAP_PWD_SET_MORE_BIT(x) ((x) |= 0x40)
37 #define EAP_PWD_GET_EXCHANGE(x) ((x) & 0x3f)
38 #define EAP_PWD_SET_EXCHANGE(x,y) ((x) |= (y))
44 #define EAP_PWD_DEFAULT_RAND_FUNC 1
46 #define EAP_PWD_DEFAULT_PRF 1
49 #define EAP_PWD_PREP_NONE 0
50 #define EAP_PWD_PREP_MS 1
56 const u8 *password,
size_t password_len,
57 const u8 *id_server,
size_t id_server_len,
58 const u8 *id_peer,
size_t id_peer_len,
60 int compute_keys(
EAP_PWD_group *grp, BN_CTX *bnctx,
const BIGNUM *k,
61 const BIGNUM *peer_scalar,
const BIGNUM *server_scalar,
62 const u8 *confirm_peer,
const u8 *confirm_server,
63 const u32 *ciphersuite, u8 *msk, u8 *emsk, u8 *session_id);
65 void eap_pwd_h_update(
struct crypto_hash *hash,
const u8 *data,
size_t len);
66 void eap_pwd_h_final(
struct crypto_hash *hash, u8 *digest);
Definition: eap_pwd_common.h:16
Definition: eap_pwd_common.h:41
Definition: crypto_internal.c:13