Home
last modified time | relevance | path

Searched refs:md_ctx (Results 1 – 12 of 12) sorted by relevance

/mbedtls-3.5.0/library/
Dmd.c241 if (ctx->md_ctx != NULL) { in mbedtls_md_free()
244 psa_hash_abort(ctx->md_ctx); in mbedtls_md_free()
250 mbedtls_md5_free(ctx->md_ctx); in mbedtls_md_free()
255 mbedtls_ripemd160_free(ctx->md_ctx); in mbedtls_md_free()
260 mbedtls_sha1_free(ctx->md_ctx); in mbedtls_md_free()
265 mbedtls_sha256_free(ctx->md_ctx); in mbedtls_md_free()
270 mbedtls_sha256_free(ctx->md_ctx); in mbedtls_md_free()
275 mbedtls_sha512_free(ctx->md_ctx); in mbedtls_md_free()
280 mbedtls_sha512_free(ctx->md_ctx); in mbedtls_md_free()
287 mbedtls_free(ctx->md_ctx); in mbedtls_md_free()
[all …]
Dhmac_drbg.c59 size_t md_len = mbedtls_md_get_size(ctx->md_ctx.md_info); in mbedtls_hmac_drbg_update()
67 if ((ret = mbedtls_md_hmac_reset(&ctx->md_ctx)) != 0) { in mbedtls_hmac_drbg_update()
70 if ((ret = mbedtls_md_hmac_update(&ctx->md_ctx, in mbedtls_hmac_drbg_update()
74 if ((ret = mbedtls_md_hmac_update(&ctx->md_ctx, in mbedtls_hmac_drbg_update()
79 if ((ret = mbedtls_md_hmac_update(&ctx->md_ctx, in mbedtls_hmac_drbg_update()
84 if ((ret = mbedtls_md_hmac_finish(&ctx->md_ctx, K)) != 0) { in mbedtls_hmac_drbg_update()
89 if ((ret = mbedtls_md_hmac_starts(&ctx->md_ctx, K, md_len)) != 0) { in mbedtls_hmac_drbg_update()
92 if ((ret = mbedtls_md_hmac_update(&ctx->md_ctx, in mbedtls_hmac_drbg_update()
96 if ((ret = mbedtls_md_hmac_finish(&ctx->md_ctx, ctx->V)) != 0) { in mbedtls_hmac_drbg_update()
115 if ((ret = mbedtls_md_setup(&ctx->md_ctx, md_info, 1)) != 0) { in mbedtls_hmac_drbg_seed_buf()
[all …]
Dpkcs12.c241 mbedtls_md_context_t md_ctx; in calculate_hashes() local
247 mbedtls_md_init(&md_ctx); in calculate_hashes()
249 if ((ret = mbedtls_md_setup(&md_ctx, md_info, 0)) != 0) { in calculate_hashes()
253 if ((ret = mbedtls_md_starts(&md_ctx)) != 0) { in calculate_hashes()
257 if ((ret = mbedtls_md_update(&md_ctx, diversifier, v)) != 0) { in calculate_hashes()
262 if ((ret = mbedtls_md_update(&md_ctx, salt_block, v)) != 0) { in calculate_hashes()
268 if ((ret = mbedtls_md_update(&md_ctx, pwd_block, v)) != 0) { in calculate_hashes()
273 if ((ret = mbedtls_md_finish(&md_ctx, hash_output)) != 0) { in calculate_hashes()
286 mbedtls_md_free(&md_ctx); in calculate_hashes()
Drsa.c1095 mbedtls_md_context_t md_ctx; in mgf_mask() local
1097 mbedtls_md_init(&md_ctx); in mgf_mask()
1103 mbedtls_md_init(&md_ctx); in mgf_mask()
1104 if ((ret = mbedtls_md_setup(&md_ctx, md_info, 0)) != 0) { in mgf_mask()
1131 if ((ret = mbedtls_md_starts(&md_ctx)) != 0) { in mgf_mask()
1134 if ((ret = mbedtls_md_update(&md_ctx, src, slen)) != 0) { in mgf_mask()
1137 if ((ret = mbedtls_md_update(&md_ctx, counter, 4)) != 0) { in mgf_mask()
1140 if ((ret = mbedtls_md_finish(&md_ctx, mask)) != 0) { in mgf_mask()
1171 mbedtls_md_free(&md_ctx); in mgf_mask()
1198 mbedtls_md_context_t md_ctx; in hash_mprime() local
[all …]
Dpkcs5.c334 mbedtls_md_context_t md_ctx; in mbedtls_pkcs5_pbkdf2_hmac_ext() local
343 mbedtls_md_init(&md_ctx); in mbedtls_pkcs5_pbkdf2_hmac_ext()
345 if ((ret = mbedtls_md_setup(&md_ctx, md_info, 1)) != 0) { in mbedtls_pkcs5_pbkdf2_hmac_ext()
348 ret = pkcs5_pbkdf2_hmac(&md_ctx, password, plen, salt, slen, in mbedtls_pkcs5_pbkdf2_hmac_ext()
351 mbedtls_md_free(&md_ctx); in mbedtls_pkcs5_pbkdf2_hmac_ext()
Dssl_tls.c6187 mbedtls_md_context_t md_ctx; in tls_prf_generic() local
6190 mbedtls_md_init(&md_ctx); in tls_prf_generic()
6213 if ((ret = mbedtls_md_setup(&md_ctx, md_info, 1)) != 0) { in tls_prf_generic()
6217 ret = mbedtls_md_hmac_starts(&md_ctx, secret, slen); in tls_prf_generic()
6221 ret = mbedtls_md_hmac_update(&md_ctx, tmp + md_len, nb); in tls_prf_generic()
6225 ret = mbedtls_md_hmac_finish(&md_ctx, tmp); in tls_prf_generic()
6231 ret = mbedtls_md_hmac_reset(&md_ctx); in tls_prf_generic()
6235 ret = mbedtls_md_hmac_update(&md_ctx, tmp, md_len + nb); in tls_prf_generic()
6239 ret = mbedtls_md_hmac_finish(&md_ctx, h_i); in tls_prf_generic()
6244 ret = mbedtls_md_hmac_reset(&md_ctx); in tls_prf_generic()
[all …]
/mbedtls-3.5.0/programs/aes/
Dcrypt_and_hash.c90 mbedtls_md_context_t md_ctx; in main() local
101 mbedtls_md_init(&md_ctx); in main()
175 if (mbedtls_md_setup(&md_ctx, md_info, 1) != 0) { in main()
249 if (mbedtls_md_starts(&md_ctx) != 0) { in main()
253 if (mbedtls_md_update(&md_ctx, buffer, 8) != 0) { in main()
257 if (mbedtls_md_update(&md_ctx, (unsigned char *) p, strlen(p)) in main()
262 if (mbedtls_md_finish(&md_ctx, digest) != 0) { in main()
285 if (mbedtls_md_starts(&md_ctx) != 0) { in main()
290 if (mbedtls_md_update(&md_ctx, digest, 32) != 0) { in main()
295 if (mbedtls_md_update(&md_ctx, key, keylen) != 0) { in main()
[all …]
/mbedtls-3.5.0/programs/hash/
Dgeneric_sum.c168 mbedtls_md_context_t md_ctx; in main() local
170 mbedtls_md_init(&md_ctx); in main()
197 if (mbedtls_md_setup(&md_ctx, md_info, 0)) { in main()
217 mbedtls_md_free(&md_ctx); in main()
/mbedtls-3.5.0/include/mbedtls/
Dhmac_drbg.h89 mbedtls_md_context_t MBEDTLS_PRIVATE(md_ctx); /*!< HMAC context (inc. K) */
Dmd.h208 void *MBEDTLS_PRIVATE(md_ctx);
/mbedtls-3.5.0/tests/suites/
Dtest_suite_md.function227 TEST_ASSERT(ctx.md_ctx != NULL);
274 TEST_ASSERT(ctx.md_ctx != NULL);
343 TEST_ASSERT(ctx.md_ctx != NULL);
/mbedtls-3.5.0/docs/architecture/psa-migration/
Dmd-cipher-dispatch.md347 void *md_ctx; // mbedtls_xxx_context or psa_hash_operation