5 #ifndef EAP_EKE_COMMON_H
6 #define EAP_EKE_COMMON_H
10 #define EAP_EKE_COMMIT 2
11 #define EAP_EKE_CONFIRM 3
12 #define EAP_EKE_FAILURE 4
15 #define EAP_EKE_DHGROUP_EKE_2 1
16 #define EAP_EKE_DHGROUP_EKE_5 2
17 #define EAP_EKE_DHGROUP_EKE_14 3
18 #define EAP_EKE_DHGROUP_EKE_15 4
19 #define EAP_EKE_DHGROUP_EKE_16 5
22 #define EAP_EKE_ENCR_AES128_CBC 1
25 #define EAP_EKE_PRF_HMAC_SHA1 1
26 #define EAP_EKE_PRF_HMAC_SHA2_256 2
29 #define EAP_EKE_MAC_HMAC_SHA1 1
30 #define EAP_EKE_MAC_HMAC_SHA2_256 2
33 #define EAP_EKE_ID_OPAQUE 1
34 #define EAP_EKE_ID_NAI 2
35 #define EAP_EKE_ID_IPv4 3
36 #define EAP_EKE_ID_IPv6 4
37 #define EAP_EKE_ID_FQDN 5
38 #define EAP_EKE_ID_DN 6
41 #define EAP_EKE_FAIL_NO_ERROR 1
42 #define EAP_EKE_FAIL_PROTO_ERROR 2
43 #define EAP_EKE_FAIL_PASSWD_NOT_FOUND 3
44 #define EAP_EKE_FAIL_AUTHENTICATION_FAIL 4
45 #define EAP_EKE_FAIL_AUTHORIZATION_FAIL 5
46 #define EAP_EKE_FAIL_NO_PROPOSAL_CHOSEN 6
47 #define EAP_EKE_FAIL_PRIVATE_INTERNAL_ERROR 0xffffffff
49 #define EAP_EKE_MAX_DH_LEN 512
50 #define EAP_EKE_MAX_HASH_LEN 32
51 #define EAP_EKE_MAX_KEY_LEN 16
52 #define EAP_EKE_MAX_KE_LEN 16
53 #define EAP_EKE_MAX_KI_LEN 32
54 #define EAP_EKE_MAX_KA_LEN 32
55 #define EAP_EKE_MAX_NONCE_LEN 16
64 u8 shared_secret[EAP_EKE_MAX_HASH_LEN];
65 u8 ke[EAP_EKE_MAX_KE_LEN];
66 u8 ki[EAP_EKE_MAX_KI_LEN];
67 u8 ka[EAP_EKE_MAX_KA_LEN];
77 int eap_eke_session_init(
struct eap_eke_session *sess, u8 dhgroup, u8 encr,
80 int eap_eke_dh_init(u8 group, u8 *ret_priv, u8 *ret_pub);
82 const u8 *password,
size_t password_len,
83 const u8 *id_s,
size_t id_s_len,
const u8 *id_p,
84 size_t id_p_len, u8 *key);
85 int eap_eke_dhcomp(
struct eap_eke_session *sess,
const u8 *key,
const u8 *dhpub,
88 const u8 *dhpriv,
const u8 *peer_dhcomp);
90 const u8 *id_s,
size_t id_s_len,
91 const u8 *id_p,
size_t id_p_len);
93 const u8 *id_s,
size_t id_s_len,
94 const u8 *id_p,
size_t id_p_len,
95 const u8 *nonce_p,
const u8 *nonce_s);
97 const u8 *id_s,
size_t id_s_len,
98 const u8 *id_p,
size_t id_p_len,
99 const u8 *nonce_p,
const u8 *nonce_s,
102 const u8 *data,
size_t data_len,
103 u8 *prot,
size_t *prot_len);
105 const u8 *prot,
size_t prot_len,
106 u8 *data,
size_t *data_len);
108 const struct wpabuf *msgs, u8 *auth);
Definition: eap_eke_common.h:57