Home
last modified time | relevance | path

Searched refs:hmac (Results 1 – 17 of 17) sorted by relevance

/openthread-latest/third_party/mbedtls/repo/library/
Dpsa_crypto_mac.c25 mbedtls_psa_hmac_operation_t *hmac) in psa_hmac_abort_internal() argument
27 mbedtls_platform_zeroize(hmac->opad, sizeof(hmac->opad)); in psa_hmac_abort_internal()
28 return psa_hash_abort(&hmac->hash_ctx); in psa_hmac_abort_internal()
32 mbedtls_psa_hmac_operation_t *hmac, in psa_hmac_setup_internal() argument
43 hmac->alg = hash_alg; in psa_hmac_setup_internal()
54 if (block_size > sizeof(hmac->opad)) { in psa_hmac_setup_internal()
86 hmac->opad[i] = ipad[i] ^ 0x36 ^ 0x5C; in psa_hmac_setup_internal()
88 memset(hmac->opad + key_length, 0x5C, block_size - key_length); in psa_hmac_setup_internal()
90 status = psa_hash_setup(&hmac->hash_ctx, hash_alg); in psa_hmac_setup_internal()
95 status = psa_hash_update(&hmac->hash_ctx, ipad, block_size); in psa_hmac_setup_internal()
[all …]
Dmd.c418 int mbedtls_md_setup(mbedtls_md_context_t *ctx, const mbedtls_md_info_t *md_info, int hmac) in mbedtls_md_setup() argument
434 if (hmac != 0) { in mbedtls_md_setup()
497 if (hmac != 0) { in mbedtls_md_setup()
Dpsa_crypto.c5493 status = psa_mac_abort(&operation->ctx.hkdf.hmac); in psa_key_derivation_abort()
5629 status = psa_key_derivation_start_hmac(&hkdf->hmac, in psa_key_derivation_hkdf_read()
5638 status = psa_mac_update(&hkdf->hmac, in psa_key_derivation_hkdf_read()
5645 status = psa_mac_update(&hkdf->hmac, in psa_key_derivation_hkdf_read()
5651 status = psa_mac_update(&hkdf->hmac, in psa_key_derivation_hkdf_read()
5656 status = psa_mac_sign_finish(&hkdf->hmac, in psa_key_derivation_hkdf_read()
5677 psa_mac_operation_t hmac = PSA_MAC_OPERATION_INIT; in psa_key_derivation_tls12_prf_generate_next_block() local
5711 status = psa_key_derivation_start_hmac(&hmac, in psa_key_derivation_tls12_prf_generate_next_block()
5724 status = psa_mac_update(&hmac, in psa_key_derivation_tls12_prf_generate_next_block()
5730 status = psa_mac_update(&hmac, in psa_key_derivation_tls12_prf_generate_next_block()
[all …]
/openthread-latest/tests/unit/
Dtest_hmac_sha256.cpp244 Crypto::HmacSha256 hmac; in TestHmacSha256() local
247 hmac.Start(static_cast<const Crypto::Key &>(testCase.mKey)); in TestHmacSha256()
248 hmac.Update(testCase.mData, testCase.mDataLength); in TestHmacSha256()
249 hmac.Finish(hash); in TestHmacSha256()
270 Crypto::HmacSha256 hmac; in TestHmacSha256() local
273 hmac.Start(static_cast<const Crypto::Key &>(testCase.mKey)); in TestHmacSha256()
274 hmac.Update(*message, offsets[index++], testCase.mDataLength); in TestHmacSha256()
275 hmac.Finish(hash); in TestHmacSha256()
/openthread-latest/src/core/api/
Dcrypto_api.cpp46 HmacSha256 hmac; in otCryptoHmacSha256() local
50 hmac.Start(AsCoreType(aKey)); in otCryptoHmacSha256()
51 hmac.Update(aBuf, aBufLength); in otCryptoHmacSha256()
52 hmac.Finish(AsCoreType(aHash)); in otCryptoHmacSha256()
/openthread-latest/third_party/mbedtls/repo/tests/suites/
Dtest_suite_psa_crypto_hash.data614 # import hmac; hmac.new(bytes([0xaa]*32), b'abc', 'SHA3-224').hexdigest()
618 hmac:PSA_ALG_SHA3_224:"abc":"bf0905154ad610b6a3d6d0b9a1c692494e987337d956624a066d7a1f"
622 hmac:PSA_ALG_SHA3_256:"abc":"a986419a162b6d4731a8e96e44a2c6e784d50137907b457c9fb77c62705dc4d9"
626 hmac:PSA_ALG_SHA3_384:"abc":"87b864ee25f8bfebd516eddd7cdd400d3c368a09e4b1fabaee5636da8a9c876c3f802c…
630 hmac:PSA_ALG_SHA3_512:"abc":"2cef45b6950e41a70bc85cb431b2161d47c9e2932187fa15d80e3b7af1da38aa8fe823…
634 hmac:PSA_ALG_SHA_1:"abc":"0b3a7f96afea3e14a0835f7c9468a24649f85596"
638 hmac:PSA_ALG_SHA_224:"abc":"249c405cef8bcd3ceeafdb9a933179739fb9b1d7f174df4667ec82f3"
642 hmac:PSA_ALG_SHA_256:"abc":"b89a1b878289c739595104da55b6f7a8afec3e0757fc166080dc267c09c46841"
646 hmac:PSA_ALG_SHA_384:"abc":"25a8b55c884bc38286305f76332631726498f5586280b88bc6179cd00c6878fb7d1bb3e…
650 hmac:PSA_ALG_SHA_512:"abc":"d6e5eebb5cf27f5b686fefc416ee8c431bb10770216aa3c6ba13897ef3fc040b98abc53…
[all …]
Dtest_suite_psa_crypto_hash.function39 void hmac(int alg_arg, char *input, data_t *expected_mac)
/openthread-latest/src/core/crypto/
Dcrypto_platform.cpp255 HmacSha256 hmac; in otPlatCryptoHkdfExpand() local
284 hmac.Start(cryptoKey); in otPlatCryptoHkdfExpand()
288 hmac.Update(hash); in otPlatCryptoHkdfExpand()
291 hmac.Update(aInfo, aInfoLength); in otPlatCryptoHkdfExpand()
294 hmac.Update(iter); in otPlatCryptoHkdfExpand()
295 hmac.Finish(hash); in otPlatCryptoHkdfExpand()
314 HmacSha256 hmac; in otPlatCryptoHkdfExtract() local
326 hmac.Start(cryptoKey); in otPlatCryptoHkdfExtract()
327 hmac.Update(inputKey.GetBytes(), inputKey.GetLength()); in otPlatCryptoHkdfExtract()
328 hmac.Finish(*prk); in otPlatCryptoHkdfExtract()
/openthread-latest/src/core/thread/
Dkey_manager.cpp289 Crypto::HmacSha256 hmac; in ComputeKeys() local
299 hmac.Start(cryptoKey); in ComputeKeys()
302 hmac.Update(keySequenceBytes); in ComputeKeys()
303 hmac.Update(kThreadString); in ComputeKeys()
305 hmac.Finish(aHashKeys.mHash); in ComputeKeys()
/openthread-latest/tools/tcat_ble_client/cli/
Dbase_commands.py44 import hmac
210 hash = hmac.new(code, digestmod=sha256)
243 hash = hmac.new(pskd, digestmod=sha256)
/openthread-latest/tests/scripts/thread-cert/
Dnet_crypto.py30 import hmac
121 d = hmac.new(k, s, digestmod=hashlib.sha256).digest()
/openthread-latest/src/core/meshcop/
Dtcat_agent.cpp769 Crypto::HmacSha256 hmac; in CalculateHash() local
773 hmac.Start(cryptoKey); in CalculateHash()
774 hmac.Update(aChallenge); in CalculateHash()
775 hmac.Update(rawKey.p, static_cast<uint16_t>(rawKey.len)); in CalculateHash()
776 hmac.Finish(aHash); in CalculateHash()
/openthread-latest/third_party/mbedtls/repo/include/psa/
Dcrypto_builtin_key_derivation.h42 struct psa_mac_operation_s MBEDTLS_PRIVATE(hmac);
Dcrypto_builtin_composites.h62 mbedtls_psa_hmac_operation_t MBEDTLS_PRIVATE(hmac);
/openthread-latest/third_party/mbedtls/repo/include/mbedtls/
Dmd.h197 int mbedtls_md_setup(mbedtls_md_context_t *ctx, const mbedtls_md_info_t *md_info, int hmac);
/openthread-latest/third_party/mbedtls/repo/docs/architecture/psa-migration/
Dmd-cipher-dispatch.md408 * `mbedtls_md_setup` — but `hmac` must be 0 if `MBEDTLS_MD_C` is disabled.
/openthread-latest/third_party/mbedtls/repo/docs/
Dpsa-transition.md509 2. Call `mbedtls_md_setup` to select the hash algorithm, with `hmac=0`. Then call `mbedtls_md_start…
552 2. Call `mbedtls_md_setup` to select the hash algorithm, with `hmac=1`. Then call `mbedtls_md_hmac_…