|
wpa_supplicant / hostapd
2.5
|
EAP server/peer: EAP-SAKE shared routines. More...
#include "includes.h"#include "common.h"#include "wpabuf.h"#include "crypto/sha1.h"#include "eap_defs.h"#include "eap_sake_common.h"Functions | |
| int | eap_sake_parse_attributes (const u8 *buf, size_t len, struct eap_sake_parse_attr *attr) |
| Parse EAP-SAKE attributes. More... | |
| void | eap_sake_derive_keys (const u8 *root_secret_a, const u8 *root_secret_b, const u8 *rand_s, const u8 *rand_p, u8 *tek, u8 *msk, u8 *emsk) |
| Derive EAP-SAKE keys. More... | |
| int | eap_sake_compute_mic (const u8 *tek_auth, const u8 *rand_s, const u8 *rand_p, const u8 *serverid, size_t serverid_len, const u8 *peerid, size_t peerid_len, int peer, const u8 *eap, size_t eap_len, const u8 *mic_pos, u8 *mic) |
| Compute EAP-SAKE MIC for an EAP packet. More... | |
| void | eap_sake_add_attr (struct wpabuf *buf, u8 type, const u8 *data, size_t len) |
EAP server/peer: EAP-SAKE shared routines.
| int eap_sake_compute_mic | ( | const u8 * | tek_auth, |
| const u8 * | rand_s, | ||
| const u8 * | rand_p, | ||
| const u8 * | serverid, | ||
| size_t | serverid_len, | ||
| const u8 * | peerid, | ||
| size_t | peerid_len, | ||
| int | peer, | ||
| const u8 * | eap, | ||
| size_t | eap_len, | ||
| const u8 * | mic_pos, | ||
| u8 * | mic | ||
| ) |
Compute EAP-SAKE MIC for an EAP packet.
| tek_auth | 16-byte TEK-Auth |
| rand_s | 16-byte RAND_S |
| rand_p | 16-byte RAND_P |
| serverid | SERVERID |
| serverid_len | SERVERID length |
| peerid | PEERID |
| peerid_len | PEERID length |
| peer | MIC calculation for 0 = Server, 1 = Peer message |
| eap | EAP packet |
| eap_len | EAP packet length |
| mic_pos | MIC position in the EAP packet (must be [eap .. eap + eap_len]) |
| mic | Buffer for the computed 16-byte MIC |
| void eap_sake_derive_keys | ( | const u8 * | root_secret_a, |
| const u8 * | root_secret_b, | ||
| const u8 * | rand_s, | ||
| const u8 * | rand_p, | ||
| u8 * | tek, | ||
| u8 * | msk, | ||
| u8 * | emsk | ||
| ) |
Derive EAP-SAKE keys.
| root_secret_a | 16-byte Root-Secret-A |
| root_secret_b | 16-byte Root-Secret-B |
| rand_s | 16-byte RAND_S |
| rand_p | 16-byte RAND_P |
| tek | Buffer for Temporary EAK Keys (TEK-Auth[16] | TEK-Cipher[16]) |
| msk | Buffer for 64-byte MSK |
| emsk | Buffer for 64-byte EMSK |
This function derives EAP-SAKE keys as defined in RFC 4763, section 3.2.6.
| int eap_sake_parse_attributes | ( | const u8 * | buf, |
| size_t | len, | ||
| struct eap_sake_parse_attr * | attr | ||
| ) |
Parse EAP-SAKE attributes.
| buf | Packet payload (starting with the first attribute) |
| len | Payload length |
| attr | Structure to be filled with found attributes |
1.8.6