|
iPXE
|
Keyed-Hashing for Message Authentication. More...
#include <ipxe/crypto.h>Go to the source code of this file.
Macros | |
| #define | hmac_key_t(digest) |
| HMAC reduced key type. | |
| #define | hmac_context_t(digest) |
| HMAC context type. | |
Functions | |
| FILE_LICENCE (GPL2_OR_LATER_OR_UBDL) | |
| FILE_SECBOOT (PERMITTED) | |
| static size_t | hmac_keysize (struct digest_algorithm *digest) |
| Calculate HMAC reduced key size. | |
| static size_t | hmac_ctxsize (struct digest_algorithm *digest) |
| Calculate HMAC context size. | |
| static void | hmac_update (struct digest_algorithm *digest, void *ctx, const void *data, size_t len) |
| Update HMAC. | |
| void | hmac_key (struct digest_algorithm *digest, void *ctx, const void *secret, size_t len, void *key) |
| Construct HMAC reduced key. | |
| void | hmac_init_key (struct digest_algorithm *digest, void *ctx, const void *key) |
| Initialise HMAC from reduced key. | |
| void | hmac_init (struct digest_algorithm *digest, void *ctx, const void *secret, size_t len) |
| Initialise HMAC. | |
| void | hmac_final (struct digest_algorithm *digest, void *ctx, void *hmac) |
| Finalise HMAC. | |
Keyed-Hashing for Message Authentication.
Definition in file hmac.h.
| #define hmac_key_t | ( | digest | ) |
HMAC reduced key type.
Definition at line 15 of file hmac.h.
Referenced by hmac_init_key(), hmac_key(), and hmac_keysize().
| #define hmac_context_t | ( | digest | ) |
HMAC context type.
Definition at line 21 of file hmac.h.
Referenced by hmac_ctxsize(), hmac_final(), hmac_init(), hmac_init_key(), hmac_key(), and hmac_update().
| FILE_LICENCE | ( | GPL2_OR_LATER_OR_UBDL | ) |
| FILE_SECBOOT | ( | PERMITTED | ) |
|
inlinestatic |
Calculate HMAC reduced key size.
| digest | Digest algorithm to use |
| len | HMAC key pad size |
Definition at line 35 of file hmac.h.
References hmac_key_t.
Referenced by hmac_okx(), tls_generate_resumption_master(), and tls_set_digest().
|
inlinestatic |
Calculate HMAC context size.
| digest | Digest algorithm to use |
| len | HMAC context size |
Definition at line 48 of file hmac.h.
References hmac_context_t.
Referenced by hkdf_expand(), hkdf_extract(), hmac_drbg_update_key(), hmac_drbg_update_value(), hmac_okx(), peerdist_info_passphrase_okx(), peerdist_info_segment_hash(), tls_hmac(), tls_hmac_list(), tls_p_hash_va(), and tls_set_kdf_master().
|
inlinestatic |
Update HMAC.
Definition at line 62 of file hmac.h.
References ctx, data, digest_update(), hmac_context_t, and len.
Referenced by ccmp_kie_mic(), hkdf_expand(), hkdf_extract(), 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().
|
extern |
Construct HMAC reduced key.
| digest | Digest algorithm to use |
| ctx | HMAC context |
| secret | Secret key |
| len | Length of secret key |
| key | HMAC reduced key to fill in |
Definition at line 59 of file hmac.c.
References ctx, digest_final(), digest_init(), digest_update(), hmac_context_t, hmac_key_t, key, len, memcpy(), and memset().
Referenced by hmac_init(), hmac_okx(), and tls_set_kdf_master().
|
extern |
Initialise HMAC from reduced key.
| digest | Digest algorithm |
| ctx | HMAC context |
| hkey | HMAC key |
Definition at line 82 of file hmac.c.
References ctx, digest_init(), digest_update(), hmac_context_t, hmac_key_t, and key.
Referenced by hmac_init(), hmac_okx(), and tls_p_hash_va().
|
extern |
Initialise HMAC.
Definition at line 106 of file hmac.c.
References ctx, hmac_context_t, hmac_init_key(), hmac_key(), and len.
Referenced by ccmp_kie_mic(), hkdf_expand(), hkdf_extract(), 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(), and tls_hmac_init().
|
extern |
Finalise HMAC.
| digest | Digest algorithm to use |
| ctx | HMAC context |
| hmac | HMAC digest to fill in |
Definition at line 124 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(), hkdf_expand(), hkdf_extract(), 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().