003 File Manager
Current Path:
/usr/src/contrib/wpa/src/eap_common
usr
/
src
/
contrib
/
wpa
/
src
/
eap_common
/
📁
..
📄
chap.c
(602 B)
📄
chap.h
(388 B)
📄
eap_common.c
(7.31 KB)
📄
eap_common.h
(905 B)
📄
eap_defs.h
(3.43 KB)
📄
eap_eke_common.c
(16.75 KB)
📄
eap_eke_common.h
(3.47 KB)
📄
eap_fast_common.c
(7.19 KB)
📄
eap_fast_common.h
(2.87 KB)
📄
eap_gpsk_common.c
(14.28 KB)
📄
eap_gpsk_common.h
(2 KB)
📄
eap_ikev2_common.c
(2.78 KB)
📄
eap_ikev2_common.h
(832 B)
📄
eap_pax_common.c
(4.4 KB)
📄
eap_pax_common.h
(2.2 KB)
📄
eap_peap_common.c
(1.74 KB)
📄
eap_peap_common.h
(425 B)
📄
eap_psk_common.c
(1.52 KB)
📄
eap_psk_common.h
(1.72 KB)
📄
eap_pwd_common.c
(12.25 KB)
📄
eap_pwd_common.h
(2.62 KB)
📄
eap_sake_common.c
(10.64 KB)
📄
eap_sake_common.h
(2.41 KB)
📄
eap_sim_common.c
(31.96 KB)
📄
eap_sim_common.h
(7.62 KB)
📄
eap_teap_common.c
(20.43 KB)
📄
eap_teap_common.h
(5.67 KB)
📄
eap_tlv_common.h
(2.57 KB)
📄
eap_ttls.h
(1.58 KB)
📄
eap_wsc_common.c
(784 B)
📄
eap_wsc_common.h
(644 B)
📄
ikev2_common.c
(17.17 KB)
📄
ikev2_common.h
(8.11 KB)
Editing: eap_eke_common.h
/* * EAP server/peer: EAP-EKE shared routines * Copyright (c) 2011-2013, Jouni Malinen <j@w1.fi> * * This software may be distributed under the terms of the BSD license. * See README for more details. */ #ifndef EAP_EKE_COMMON_H #define EAP_EKE_COMMON_H /* EKE Exchange */ #define EAP_EKE_ID 1 #define EAP_EKE_COMMIT 2 #define EAP_EKE_CONFIRM 3 #define EAP_EKE_FAILURE 4 /* Diffie-Hellman Group Registry */ #define EAP_EKE_DHGROUP_EKE_2 1 #define EAP_EKE_DHGROUP_EKE_5 2 #define EAP_EKE_DHGROUP_EKE_14 3 /* mandatory to implement */ #define EAP_EKE_DHGROUP_EKE_15 4 #define EAP_EKE_DHGROUP_EKE_16 5 /* Encryption Algorithm Registry */ #define EAP_EKE_ENCR_AES128_CBC 1 /* mandatory to implement */ /* Pseudo Random Function Registry */ #define EAP_EKE_PRF_HMAC_SHA1 1 /* mandatory to implement */ #define EAP_EKE_PRF_HMAC_SHA2_256 2 /* Keyed Message Digest (MAC) Registry */ #define EAP_EKE_MAC_HMAC_SHA1 1 /* mandatory to implement */ #define EAP_EKE_MAC_HMAC_SHA2_256 2 /* Identity Type Registry */ #define EAP_EKE_ID_OPAQUE 1 #define EAP_EKE_ID_NAI 2 #define EAP_EKE_ID_IPv4 3 #define EAP_EKE_ID_IPv6 4 #define EAP_EKE_ID_FQDN 5 #define EAP_EKE_ID_DN 6 /* Failure-Code */ #define EAP_EKE_FAIL_NO_ERROR 1 #define EAP_EKE_FAIL_PROTO_ERROR 2 #define EAP_EKE_FAIL_PASSWD_NOT_FOUND 3 #define EAP_EKE_FAIL_AUTHENTICATION_FAIL 4 #define EAP_EKE_FAIL_AUTHORIZATION_FAIL 5 #define EAP_EKE_FAIL_NO_PROPOSAL_CHOSEN 6 #define EAP_EKE_FAIL_PRIVATE_INTERNAL_ERROR 0xffffffff #define EAP_EKE_MAX_DH_LEN 512 #define EAP_EKE_MAX_HASH_LEN 32 #define EAP_EKE_MAX_KEY_LEN 16 #define EAP_EKE_MAX_KE_LEN 16 #define EAP_EKE_MAX_KI_LEN 32 #define EAP_EKE_MAX_KA_LEN 32 #define EAP_EKE_MAX_NONCE_LEN 16 struct eap_eke_session { /* Selected proposal */ u8 dhgroup; u8 encr; u8 prf; u8 mac; u8 shared_secret[EAP_EKE_MAX_HASH_LEN]; u8 ke[EAP_EKE_MAX_KE_LEN]; u8 ki[EAP_EKE_MAX_KI_LEN]; u8 ka[EAP_EKE_MAX_KA_LEN]; int prf_len; int nonce_len; int auth_len; int dhcomp_len; int pnonce_len; int pnonce_ps_len; }; int eap_eke_session_init(struct eap_eke_session *sess, u8 dhgroup, u8 encr, u8 prf, u8 mac); void eap_eke_session_clean(struct eap_eke_session *sess); int eap_eke_dh_init(u8 group, u8 *ret_priv, u8 *ret_pub); int eap_eke_derive_key(struct eap_eke_session *sess, const u8 *password, size_t password_len, const u8 *id_s, size_t id_s_len, const u8 *id_p, size_t id_p_len, u8 *key); int eap_eke_dhcomp(struct eap_eke_session *sess, const u8 *key, const u8 *dhpub, u8 *ret_dhcomp); int eap_eke_shared_secret(struct eap_eke_session *sess, const u8 *key, const u8 *dhpriv, const u8 *peer_dhcomp); int eap_eke_derive_ke_ki(struct eap_eke_session *sess, const u8 *id_s, size_t id_s_len, const u8 *id_p, size_t id_p_len); int eap_eke_derive_ka(struct eap_eke_session *sess, const u8 *id_s, size_t id_s_len, const u8 *id_p, size_t id_p_len, const u8 *nonce_p, const u8 *nonce_s); int eap_eke_derive_msk(struct eap_eke_session *sess, const u8 *id_s, size_t id_s_len, const u8 *id_p, size_t id_p_len, const u8 *nonce_p, const u8 *nonce_s, u8 *msk, u8 *emsk); int eap_eke_prot(struct eap_eke_session *sess, const u8 *data, size_t data_len, u8 *prot, size_t *prot_len); int eap_eke_decrypt_prot(struct eap_eke_session *sess, const u8 *prot, size_t prot_len, u8 *data, size_t *data_len); int eap_eke_auth(struct eap_eke_session *sess, const char *label, const struct wpabuf *msgs, u8 *auth); #endif /* EAP_EKE_COMMON_H */
Upload File
Create Folder