wpa_supplicant / hostapd  2.5
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
sha256.h
Go to the documentation of this file.
1 
5 #ifndef SHA256_H
6 #define SHA256_H
7 
8 #define SHA256_MAC_LEN 32
9 
10 int hmac_sha256_vector(const u8 *key, size_t key_len, size_t num_elem,
11  const u8 *addr[], const size_t *len, u8 *mac);
12 int hmac_sha256(const u8 *key, size_t key_len, const u8 *data,
13  size_t data_len, u8 *mac);
14 void sha256_prf(const u8 *key, size_t key_len, const char *label,
15  const u8 *data, size_t data_len, u8 *buf, size_t buf_len);
16 void sha256_prf_bits(const u8 *key, size_t key_len, const char *label,
17  const u8 *data, size_t data_len, u8 *buf,
18  size_t buf_len_bits);
19 void tls_prf_sha256(const u8 *secret, size_t secret_len,
20  const char *label, const u8 *seed, size_t seed_len,
21  u8 *out, size_t outlen);
22 int hmac_sha256_kdf(const u8 *secret, size_t secret_len,
23  const char *label, const u8 *seed, size_t seed_len,
24  u8 *out, size_t outlen);
25 
26 #endif /* SHA256_H */
int hmac_sha256_kdf(const u8 *secret, size_t secret_len, const char *label, const u8 *seed, size_t seed_len, u8 *out, size_t outlen)
HMAC-SHA256 based KDF (RFC 5295)
Definition: sha256-kdf.c:25
void tls_prf_sha256(const u8 *secret, size_t secret_len, const char *label, const u8 *seed, size_t seed_len, u8 *out, size_t outlen)
Pseudo-Random Function for TLS v1.2 (P_SHA256, RFC 5246)
Definition: sha256-tlsprf.c:25
int hmac_sha256(const u8 *key, size_t key_len, const u8 *data, size_t data_len, u8 *mac)
HMAC-SHA256 over data buffer (RFC 2104)
Definition: sha256.c:96
void sha256_prf_bits(const u8 *key, size_t key_len, const char *label, const u8 *data, size_t data_len, u8 *buf, size_t buf_len_bits)
IEEE Std 802.11-2012, 11.6.1.7.2 Key derivation function.
Definition: sha256-prf.c:47
int hmac_sha256_vector(const u8 *key, size_t key_len, size_t num_elem, const u8 *addr[], const size_t *len, u8 *mac)
HMAC-SHA256 over data vector (RFC 2104)
Definition: sha256.c:22
void sha256_prf(const u8 *key, size_t key_len, const char *label, const u8 *data, size_t data_len, u8 *buf, size_t buf_len)
SHA256-based Pseudo-Random Function (IEEE 802.11r, 8.5.1.5.2)
Definition: sha256-prf.c:25