6 * Rustam Kovhaev <rkovhaev@gmail.com>
12 #define EAPT_MSCHAPV2 26
14 #define PEAP_PHASE_1 1
15 #define PEAP_PHASE_2 2
17 #define PEAP_HEADERLEN 6
18 #define PEAP_FRAGMENT_LENGTH_FIELD 4
19 #define PEAP_FLAGS_FIELD 1
20 #define PEAP_FLAGS_ACK 0
22 #define PEAP_CAPABILITIES_TYPE 254
23 #define PEAP_CAPABILITIES_LEN 12
25 #define SHA_HASH_LEN 20
27 #define PEAP_TLV_TYPE 12
28 #define PEAP_TLV_LENGTH_FIELD 56
29 #define PEAP_TLV_SUBTYPE_REQUEST 0
30 #define PEAP_TLV_SUBTYPE_RESPONSE 1
31 #define PEAP_TLV_HEADERLEN 8
32 #define PEAP_TLV_RESULT_LEN 7
33 #define PEAP_TLV_LEN 71
36 * Microsoft PEAP client/server never exchange
37 * outer TLVs during PEAP authentication
39 #define PEAP_TLV_DATA_LEN 61
41 #define PEAP_TLV_TK_LEN 60
42 #define PEAP_TLV_ISK_LEN 32
43 #define PEAP_TLV_IPMKSEED_LEN 59
44 #define PEAP_TLV_TEMPKEY_LEN 40
45 #define PEAP_TLV_IPMK_LEN 40
46 #define PEAP_TLV_CMK_LEN 20
47 #define PEAP_TLV_NONCE_LEN 32
48 #define PEAP_TLV_COMP_MAC_LEN 20
49 #define PEAP_TLV_CSK_LEN 128
50 #define PEAP_TLV_TK_SEED_LABEL "client EAP encryption"
51 #define PEAP_TLV_IPMK_SEED_LABEL "Inner Methods Compound Keys"
52 #define PEAP_TLV_CSK_SEED_LABEL "Session Key Generating Function"
54 #define PEAP_S_FLAG_SET 0x20
55 #define PEAP_L_FLAG_SET 0x80
56 #define PEAP_LM_FLAG_SET 0xC0
57 #define PEAP_M_FLAG_SET 0x40
58 #define PEAP_NO_FLAGS 0x00
60 #define EAP_TLS_KEY_LEN 0x40
61 #define TLS_RECORD_MAX_SIZE 0x4000
63 void peap_process(eap_state *esp, u_char id, u_char *inp,
64 int len, char *rhostname);
66 #endif /* PPP_PEAP_H */