Lines Matching refs:hmac

243     bootutil_hmac_sha256_context hmac;  in hkdf()  local
261 bootutil_hmac_sha256_init(&hmac); in hkdf()
264 rc = bootutil_hmac_sha256_set_key(&hmac, salt, BOOTUTIL_CRYPTO_SHA256_DIGEST_SIZE); in hkdf()
269 rc = bootutil_hmac_sha256_update(&hmac, ikm, ikm_len); in hkdf()
274 rc = bootutil_hmac_sha256_finish(&hmac, prk, BOOTUTIL_CRYPTO_SHA256_DIGEST_SIZE); in hkdf()
279 bootutil_hmac_sha256_drop(&hmac); in hkdf()
289 bootutil_hmac_sha256_init(&hmac); in hkdf()
291 rc = bootutil_hmac_sha256_set_key(&hmac, prk, BOOTUTIL_CRYPTO_SHA256_DIGEST_SIZE); in hkdf()
299 rc = bootutil_hmac_sha256_update(&hmac, T, BOOTUTIL_CRYPTO_SHA256_DIGEST_SIZE); in hkdf()
305 rc = bootutil_hmac_sha256_update(&hmac, info, info_len); in hkdf()
310 rc = bootutil_hmac_sha256_update(&hmac, &counter, 1); in hkdf()
315 rc = bootutil_hmac_sha256_finish(&hmac, T, BOOTUTIL_CRYPTO_SHA256_DIGEST_SIZE); in hkdf()
320 bootutil_hmac_sha256_drop(&hmac); in hkdf()
334 bootutil_hmac_sha256_drop(&hmac); in hkdf()
448 bootutil_hmac_sha256_context hmac; in boot_decrypt_key() local
571 bootutil_hmac_sha256_init(&hmac); in boot_decrypt_key()
573 rc = bootutil_hmac_sha256_set_key(&hmac, &derived_key[BOOT_ENC_KEY_SIZE], 32); in boot_decrypt_key()
575 (void)bootutil_hmac_sha256_drop(&hmac); in boot_decrypt_key()
579 rc = bootutil_hmac_sha256_update(&hmac, &buf[EC_CIPHERKEY_INDEX], BOOT_ENC_KEY_SIZE); in boot_decrypt_key()
581 (void)bootutil_hmac_sha256_drop(&hmac); in boot_decrypt_key()
586 rc = bootutil_hmac_sha256_finish(&hmac, tag, BOOTUTIL_CRYPTO_SHA256_DIGEST_SIZE); in boot_decrypt_key()
588 (void)bootutil_hmac_sha256_drop(&hmac); in boot_decrypt_key()
593 (void)bootutil_hmac_sha256_drop(&hmac); in boot_decrypt_key()
597 bootutil_hmac_sha256_drop(&hmac); in boot_decrypt_key()