iPXE
|
Keyed-Hashing for Message Authentication. More...
#include <ipxe/crypto.h>
Go to the source code of this file.
Macros | |
#define | hmac_context_t(digest) |
HMAC context type. More... | |
Functions | |
FILE_LICENCE (GPL2_OR_LATER_OR_UBDL) | |
static size_t | hmac_ctxsize (struct digest_algorithm *digest) |
Calculate HMAC context size. More... | |
static void | hmac_update (struct digest_algorithm *digest, void *ctx, const void *data, size_t len) |
Update HMAC. More... | |
void | hmac_init (struct digest_algorithm *digest, void *ctx, const void *key, size_t key_len) |
Initialise HMAC. More... | |
void | hmac_final (struct digest_algorithm *digest, void *ctx, void *hmac) |
Finalise HMAC. More... | |
Keyed-Hashing for Message Authentication.
Definition in file hmac.h.
#define hmac_context_t | ( | digest | ) |
HMAC context type.
FILE_LICENCE | ( | GPL2_OR_LATER_OR_UBDL | ) |
|
inlinestatic |
Calculate HMAC context size.
digest | Digest algorithm to use |
len | HMAC context size |
Definition at line 28 of file hmac.h.
References hmac_context_t.
Referenced by hmac_drbg_update_key(), hmac_drbg_update_value(), hmac_okx(), peerdist_info_passphrase_okx(), peerdist_info_segment_hash(), tls_hmac(), tls_hmac_list(), and tls_p_hash_va().
|
inlinestatic |
Update HMAC.
digest | Digest algorithm to use |
ctx | HMAC context |
data | Data |
len | Length of data |
Definition at line 42 of file hmac.h.
References ctx, data, digest_update(), hmac_context_t, and len.
Referenced by ccmp_kie_mic(), hmac_drbg_update_key(), hmac_drbg_update_value(), hmac_okx(), ntlm_key(), ntlm_response(), pbkdf2_sha1_f(), peerdist_info_passphrase_okx(), peerdist_info_segment_hash(), prf_sha1(), tkip_kie_mic(), tls_hmac_init(), tls_hmac_update(), tls_hmac_update_va(), and tls_p_hash_va().
void hmac_init | ( | struct digest_algorithm * | digest, |
void * | ctx, | ||
const void * | key, | ||
size_t | key_len | ||
) |
Initialise HMAC.
digest | Digest algorithm to use |
ctx | HMAC context |
key | Key |
key_len | Length of key |
Definition at line 57 of file hmac.c.
References ctx, digest_final(), digest_init(), digest_update(), hmac_context_t, key, memcpy(), and memset().
Referenced by ccmp_kie_mic(), hmac_drbg_update_key(), hmac_drbg_update_value(), hmac_okx(), ntlm_key(), ntlm_response(), pbkdf2_sha1_f(), peerdist_info_passphrase_okx(), peerdist_info_segment_hash(), prf_sha1(), tkip_kie_mic(), tls_hmac_init(), and tls_p_hash_va().
void hmac_final | ( | struct digest_algorithm * | digest, |
void * | ctx, | ||
void * | hmac | ||
) |
Finalise HMAC.
digest | Digest algorithm to use |
ctx | HMAC context |
hmac | HMAC digest to fill in |
Definition at line 87 of file hmac.c.
References ctx, digest_final(), digest_init(), digest_update(), digest_algorithm::digestsize, hmac_context_t, and memset().
Referenced by ccmp_kie_mic(), hmac_drbg_update_key(), hmac_drbg_update_value(), hmac_okx(), ntlm_key(), ntlm_response(), pbkdf2_sha1_f(), peerdist_info_passphrase_okx(), peerdist_info_segment_hash(), prf_sha1(), tkip_kie_mic(), tls_hmac_final(), and tls_p_hash_va().