eap_pax_common.h

Go to the documentation of this file.
00001 
00016 #ifndef EAP_PAX_COMMON_H
00017 #define EAP_PAX_COMMON_H
00018 
00019 #ifdef _MSC_VER
00020 #pragma pack(push, 1)
00021 #endif /* _MSC_VER */
00022 
00023 struct eap_pax_hdr {
00024         u8 op_code;
00025         u8 flags;
00026         u8 mac_id;
00027         u8 dh_group_id;
00028         u8 public_key_id;
00029         /* Followed by variable length payload and ICV */
00030 } STRUCT_PACKED;
00031 
00032 #ifdef _MSC_VER
00033 #pragma pack(pop)
00034 #endif /* _MSC_VER */
00035 
00036 
00037 /* op_code: */
00038 enum {
00039         EAP_PAX_OP_STD_1 = 0x01,
00040         EAP_PAX_OP_STD_2 = 0x02,
00041         EAP_PAX_OP_STD_3 = 0x03,
00042         EAP_PAX_OP_SEC_1 = 0x11,
00043         EAP_PAX_OP_SEC_2 = 0x12,
00044         EAP_PAX_OP_SEC_3 = 0x13,
00045         EAP_PAX_OP_SEC_4 = 0x14,
00046         EAP_PAX_OP_SEC_5 = 0x15,
00047         EAP_PAX_OP_ACK = 0x21
00048 };
00049 
00050 /* flags: */
00051 #define EAP_PAX_FLAGS_MF                        0x01
00052 #define EAP_PAX_FLAGS_CE                        0x02
00053 #define EAP_PAX_FLAGS_AI                        0x04
00054 
00055 /* mac_id: */
00056 #define EAP_PAX_MAC_HMAC_SHA1_128               0x01
00057 #define EAP_PAX_HMAC_SHA256_128                 0x02
00058 
00059 /* dh_group_id: */
00060 #define EAP_PAX_DH_GROUP_NONE                   0x00
00061 #define EAP_PAX_DH_GROUP_2048_MODP              0x01
00062 #define EAP_PAX_DH_GROUP_3072_MODP              0x02
00063 #define EAP_PAX_DH_GROUP_NIST_ECC_P_256         0x03
00064 
00065 /* public_key_id: */
00066 #define EAP_PAX_PUBLIC_KEY_NONE                 0x00
00067 #define EAP_PAX_PUBLIC_KEY_RSAES_OAEP           0x01
00068 #define EAP_PAX_PUBLIC_KEY_RSA_PKCS1_V1_5       0x02
00069 #define EAP_PAX_PUBLIC_KEY_EL_GAMAL_NIST_ECC    0x03
00070 
00071 /* ADE type: */
00072 #define EAP_PAX_ADE_VENDOR_SPECIFIC             0x01
00073 #define EAP_PAX_ADE_CLIENT_CHANNEL_BINDING      0x02
00074 #define EAP_PAX_ADE_SERVER_CHANNEL_BINDING      0x03
00075 
00076 
00077 #define EAP_PAX_RAND_LEN 32
00078 #define EAP_PAX_MAC_LEN 16
00079 #define EAP_PAX_ICV_LEN 16
00080 #define EAP_PAX_AK_LEN 16
00081 #define EAP_PAX_MK_LEN 16
00082 #define EAP_PAX_CK_LEN 16
00083 #define EAP_PAX_ICK_LEN 16
00084 
00085 
00086 int eap_pax_kdf(u8 mac_id, const u8 *key, size_t key_len,
00087                 const char *identifier,
00088                 const u8 *entropy, size_t entropy_len,
00089                 size_t output_len, u8 *output);
00090 int eap_pax_mac(u8 mac_id, const u8 *key, size_t key_len,
00091                 const u8 *data1, size_t data1_len,
00092                 const u8 *data2, size_t data2_len,
00093                 const u8 *data3, size_t data3_len,
00094                 u8 *mac);
00095 int eap_pax_initial_key_derivation(u8 mac_id, const u8 *ak, const u8 *e,
00096                                    u8 *mk, u8 *ck, u8 *ick);
00097 
00098 #endif /* EAP_PAX_COMMON_H */
00099 
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Defines

Generated on Sat Nov 21 23:16:51 2009 for hostapd by  doxygen 1.6.1