wpa_supplicant / hostapd  2.5
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
Data Structures | Macros | Typedefs | Functions | Variables
eap_pwd_common.h File Reference

EAP server/peer: EAP-pwd shared definitions. More...

#include <openssl/bn.h>
#include <openssl/ec.h>
#include <openssl/evp.h>

Go to the source code of this file.

Data Structures

struct  group_definition_
 
struct  eap_pwd_id
 

Macros

#define EAP_PWD_HDR_SIZE   1
 
#define EAP_PWD_OPCODE_ID_EXCH   1
 
#define EAP_PWD_OPCODE_COMMIT_EXCH   2
 
#define EAP_PWD_OPCODE_CONFIRM_EXCH   3
 
#define EAP_PWD_GET_LENGTH_BIT(x)   ((x) & 0x80)
 
#define EAP_PWD_SET_LENGTH_BIT(x)   ((x) |= 0x80)
 
#define EAP_PWD_GET_MORE_BIT(x)   ((x) & 0x40)
 
#define EAP_PWD_SET_MORE_BIT(x)   ((x) |= 0x40)
 
#define EAP_PWD_GET_EXCHANGE(x)   ((x) & 0x3f)
 
#define EAP_PWD_SET_EXCHANGE(x, y)   ((x) |= (y))
 
#define EAP_PWD_DEFAULT_RAND_FUNC   1
 
#define EAP_PWD_DEFAULT_PRF   1
 
#define EAP_PWD_PREP_NONE   0
 
#define EAP_PWD_PREP_MS   1
 

Typedefs

typedef struct group_definition_ EAP_PWD_group
 

Functions

int compute_password_element (EAP_PWD_group *grp, u16 num, const u8 *password, size_t password_len, const u8 *id_server, size_t id_server_len, const u8 *id_peer, size_t id_peer_len, const u8 *token)
 
int compute_keys (EAP_PWD_group *grp, BN_CTX *bnctx, const BIGNUM *k, const BIGNUM *peer_scalar, const BIGNUM *server_scalar, const u8 *confirm_peer, const u8 *confirm_server, const u32 *ciphersuite, u8 *msk, u8 *emsk, u8 *session_id)
 
struct crypto_hasheap_pwd_h_init (void)
 
void eap_pwd_h_update (struct crypto_hash *hash, const u8 *data, size_t len)
 
void eap_pwd_h_final (struct crypto_hash *hash, u8 *digest)
 

Variables

struct eap_pwd_id STRUCT_PACKED
 

Detailed Description

EAP server/peer: EAP-pwd shared definitions.