iPXE
|
Keyed-Hashing for Message Authentication. More...
#include <ipxe/crypto.h>
Go to the source code of this file.
Functions | |
FILE_LICENCE (GPL2_OR_LATER_OR_UBDL) | |
static void | hmac_update (struct digest_algorithm *digest, void *digest_ctx, const void *data, size_t len) |
Update HMAC. More... | |
void | hmac_init (struct digest_algorithm *digest, void *digest_ctx, void *key, size_t *key_len) |
Initialise HMAC. More... | |
void | hmac_final (struct digest_algorithm *digest, void *digest_ctx, void *key, size_t *key_len, void *hmac) |
Finalise HMAC. More... | |
Keyed-Hashing for Message Authentication.
Definition in file hmac.h.
FILE_LICENCE | ( | GPL2_OR_LATER_OR_UBDL | ) |
|
inlinestatic |
Update HMAC.
digest | Digest algorithm to use |
digest_ctx | Digest context |
data | Data |
len | Length of data |
Definition at line 21 of file hmac.h.
References data, digest, digest_update(), and len.
Referenced by ccmp_kie_mic(), hmac_drbg_update_key(), hmac_drbg_update_value(), 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 * | digest_ctx, | ||
void * | key, | ||
size_t * | key_len | ||
) |
Initialise HMAC.
digest | Digest algorithm to use |
digest_ctx | Digest context |
key | Key |
key_len | Length of key |
The length of the key should be less than the block size of the digest algorithm being used. (If the key length is greater, it will be replaced with its own digest, and key_len will be updated accordingly).
Definition at line 80 of file hmac.c.
References digest, digest_init(), digest_update(), hmac_reduce_key(), key, memcpy(), and memset().
Referenced by ccmp_kie_mic(), hmac_drbg_update_key(), hmac_drbg_update_value(), 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 * | digest_ctx, | ||
void * | key, | ||
size_t * | key_len, | ||
void * | hmac | ||
) |
Finalise HMAC.
digest | Digest algorithm to use |
digest_ctx | Digest context |
key | Key |
key_len | Length of key |
hmac | HMAC digest to fill in |
The length of the key should be less than the block size of the digest algorithm being used. (If the key length is greater, it will be replaced with its own digest, and key_len will be updated accordingly).
Definition at line 115 of file hmac.c.
References digest, digest_final(), digest_init(), digest_update(), hmac_reduce_key(), key, memcpy(), and memset().
Referenced by ccmp_kie_mic(), hmac_drbg_update_key(), hmac_drbg_update_value(), 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().