Go to the source code of this file.
Classes | |
struct | eap_gpsk_csuite |
Defines | |
#define | EAP_GPSK_CIPHER_AES 0x000001 |
#define | EAP_GPSK_CIPHER_RESERVED 0x000000 |
#define | EAP_GPSK_CIPHER_SHA256 0x000002 |
#define | EAP_GPSK_FAIL_AUTHENTICATION_FAILURE 0x00000002 |
#define | EAP_GPSK_FAIL_AUTHORIZATION_FAILURE 0x00000003 |
#define | EAP_GPSK_FAIL_PSK_NOT_FOUND 0x00000001 |
#define | EAP_GPSK_MAX_MIC_LEN 32 |
#define | EAP_GPSK_MAX_PK_LEN 32 |
#define | EAP_GPSK_MAX_SK_LEN 32 |
#define | EAP_GPSK_OPCODE_FAIL 5 |
#define | EAP_GPSK_OPCODE_GPSK_1 1 |
#define | EAP_GPSK_OPCODE_GPSK_2 2 |
#define | EAP_GPSK_OPCODE_GPSK_3 3 |
#define | EAP_GPSK_OPCODE_GPSK_4 4 |
#define | EAP_GPSK_OPCODE_PROTECTED_FAIL 6 |
#define | EAP_GPSK_RAND_LEN 32 |
#define | EAP_GPSK_VENDOR_IETF 0x00000000 |
Functions | |
int | eap_gpsk_compute_mic (const u8 *sk, size_t sk_len, int vendor, int specifier, const u8 *data, size_t len, u8 *mic) |
int | eap_gpsk_derive_keys (const u8 *psk, size_t psk_len, int vendor, int specifier, const u8 *rand_client, const u8 *rand_server, const u8 *id_client, size_t id_client_len, const u8 *id_server, size_t id_server_len, u8 *msk, u8 *emsk, u8 *sk, size_t *sk_len, u8 *pk, size_t *pk_len) |
size_t | eap_gpsk_mic_len (int vendor, int specifier) |
int | eap_gpsk_supported_ciphersuite (int vendor, int specifier) |
Variables | |
struct eap_gpsk_csuite | STRUCT_PACKED |
#define EAP_GPSK_CIPHER_AES 0x000001 |
Definition at line 37 of file eap_gpsk_common.h.
#define EAP_GPSK_CIPHER_RESERVED 0x000000 |
Definition at line 36 of file eap_gpsk_common.h.
#define EAP_GPSK_CIPHER_SHA256 0x000002 |
Definition at line 38 of file eap_gpsk_common.h.
#define EAP_GPSK_FAIL_AUTHENTICATION_FAILURE 0x00000002 |
Definition at line 27 of file eap_gpsk_common.h.
#define EAP_GPSK_FAIL_AUTHORIZATION_FAILURE 0x00000003 |
Definition at line 28 of file eap_gpsk_common.h.
#define EAP_GPSK_FAIL_PSK_NOT_FOUND 0x00000001 |
Definition at line 26 of file eap_gpsk_common.h.
#define EAP_GPSK_MAX_MIC_LEN 32 |
Definition at line 33 of file eap_gpsk_common.h.
#define EAP_GPSK_MAX_PK_LEN 32 |
Definition at line 32 of file eap_gpsk_common.h.
#define EAP_GPSK_MAX_SK_LEN 32 |
Definition at line 31 of file eap_gpsk_common.h.
#define EAP_GPSK_OPCODE_FAIL 5 |
Definition at line 22 of file eap_gpsk_common.h.
#define EAP_GPSK_OPCODE_GPSK_1 1 |
Definition at line 18 of file eap_gpsk_common.h.
#define EAP_GPSK_OPCODE_GPSK_2 2 |
Definition at line 19 of file eap_gpsk_common.h.
#define EAP_GPSK_OPCODE_GPSK_3 3 |
Definition at line 20 of file eap_gpsk_common.h.
#define EAP_GPSK_OPCODE_GPSK_4 4 |
Definition at line 21 of file eap_gpsk_common.h.
#define EAP_GPSK_OPCODE_PROTECTED_FAIL 6 |
Definition at line 23 of file eap_gpsk_common.h.
#define EAP_GPSK_RAND_LEN 32 |
Definition at line 30 of file eap_gpsk_common.h.
#define EAP_GPSK_VENDOR_IETF 0x00000000 |
Definition at line 35 of file eap_gpsk_common.h.
int eap_gpsk_compute_mic | ( | const u8 * | sk, |
size_t | sk_len, | ||
int | vendor, | ||
int | specifier, | ||
const u8 * | data, | ||
size_t | len, | ||
u8 * | mic | ||
) |
eap_gpsk_compute_mic - Compute EAP-GPSK MIC for an EAP packet : Session key SK from eap_gpsk_derive_keys() : SK length in bytes from eap_gpsk_derive_keys() : CSuite/Vendor : CSuite/Specifier : Input data to MIC : Input data length in bytes : Buffer for the computed MIC, eap_gpsk_mic_len(cipher) bytes Returns: 0 on success, -1 on failure
Definition at line 397 of file eap_gpsk_common.c.
int eap_gpsk_derive_keys | ( | const u8 * | psk, |
size_t | psk_len, | ||
int | vendor, | ||
int | specifier, | ||
const u8 * | rand_peer, | ||
const u8 * | rand_server, | ||
const u8 * | id_peer, | ||
size_t | id_peer_len, | ||
const u8 * | id_server, | ||
size_t | id_server_len, | ||
u8 * | msk, | ||
u8 * | emsk, | ||
u8 * | sk, | ||
size_t * | sk_len, | ||
u8 * | pk, | ||
size_t * | pk_len | ||
) |
eap_gpsk_derive_keys - Derive EAP-GPSK keys : Pre-shared key : Length of psk in bytes : CSuite/Vendor : CSuite/Specifier : 32-byte RAND_Peer : 32-byte RAND_Server : ID_Peer : Length of ID_Peer : ID_Server : Length of ID_Server : Buffer for 64-byte MSK : Buffer for 64-byte EMSK : Buffer for SK (at least EAP_GPSK_MAX_SK_LEN bytes) : Buffer for returning length of SK : Buffer for PK (at least EAP_GPSK_MAX_PK_LEN bytes) : Buffer for returning length of PK Returns: 0 on success, -1 on failure
Definition at line 284 of file eap_gpsk_common.c.
size_t eap_gpsk_mic_len | ( | int | vendor, |
int | specifier | ||
) |
eap_gpsk_mic_len - Get the length of the MIC : CSuite/Vendor : CSuite/Specifier Returns: MIC length in bytes
Definition at line 355 of file eap_gpsk_common.c.
int eap_gpsk_supported_ciphersuite | ( | int | vendor, |
int | specifier | ||
) |
eap_gpsk_supported_ciphersuite - Check whether ciphersuite is supported : CSuite/Vendor : CSuite/Specifier Returns: 1 if ciphersuite is support, or 0 if not
Definition at line 30 of file eap_gpsk_common.c.
struct eap_gpsk_csuite STRUCT_PACKED |