Lines Matching refs:md_ctx
1093 size_t slen, mbedtls_md_context_t *md_ctx ) in mgf_mask() argument
1105 hlen = mbedtls_md_get_size( md_ctx->md_info ); in mgf_mask()
1116 if( ( ret = mbedtls_md_starts( md_ctx ) ) != 0 ) in mgf_mask()
1118 if( ( ret = mbedtls_md_update( md_ctx, src, slen ) ) != 0 ) in mgf_mask()
1120 if( ( ret = mbedtls_md_update( md_ctx, counter, 4 ) ) != 0 ) in mgf_mask()
1122 if( ( ret = mbedtls_md_finish( md_ctx, mask ) ) != 0 ) in mgf_mask()
1158 mbedtls_md_context_t md_ctx; in mbedtls_rsa_rsaes_oaep_encrypt() local
1203 mbedtls_md_init( &md_ctx ); in mbedtls_rsa_rsaes_oaep_encrypt()
1204 if( ( ret = mbedtls_md_setup( &md_ctx, md_info, 0 ) ) != 0 ) in mbedtls_rsa_rsaes_oaep_encrypt()
1209 &md_ctx ) ) != 0 ) in mbedtls_rsa_rsaes_oaep_encrypt()
1214 &md_ctx ) ) != 0 ) in mbedtls_rsa_rsaes_oaep_encrypt()
1218 mbedtls_md_free( &md_ctx ); in mbedtls_rsa_rsaes_oaep_encrypt()
1358 mbedtls_md_context_t md_ctx; in mbedtls_rsa_rsaes_oaep_decrypt() local
1407 mbedtls_md_init( &md_ctx ); in mbedtls_rsa_rsaes_oaep_decrypt()
1408 if( ( ret = mbedtls_md_setup( &md_ctx, md_info, 0 ) ) != 0 ) in mbedtls_rsa_rsaes_oaep_decrypt()
1410 mbedtls_md_free( &md_ctx ); in mbedtls_rsa_rsaes_oaep_decrypt()
1416 &md_ctx ) ) != 0 || in mbedtls_rsa_rsaes_oaep_decrypt()
1419 &md_ctx ) ) != 0 ) in mbedtls_rsa_rsaes_oaep_decrypt()
1421 mbedtls_md_free( &md_ctx ); in mbedtls_rsa_rsaes_oaep_decrypt()
1425 mbedtls_md_free( &md_ctx ); in mbedtls_rsa_rsaes_oaep_decrypt()
1594 mbedtls_md_context_t md_ctx; in rsa_rsassa_pss_sign() local
1667 mbedtls_md_init( &md_ctx ); in rsa_rsassa_pss_sign()
1668 if( ( ret = mbedtls_md_setup( &md_ctx, md_info, 0 ) ) != 0 ) in rsa_rsassa_pss_sign()
1672 if( ( ret = mbedtls_md_starts( &md_ctx ) ) != 0 ) in rsa_rsassa_pss_sign()
1674 if( ( ret = mbedtls_md_update( &md_ctx, p, 8 ) ) != 0 ) in rsa_rsassa_pss_sign()
1676 if( ( ret = mbedtls_md_update( &md_ctx, hash, hashlen ) ) != 0 ) in rsa_rsassa_pss_sign()
1678 if( ( ret = mbedtls_md_update( &md_ctx, salt, slen ) ) != 0 ) in rsa_rsassa_pss_sign()
1680 if( ( ret = mbedtls_md_finish( &md_ctx, p ) ) != 0 ) in rsa_rsassa_pss_sign()
1689 &md_ctx ) ) != 0 ) in rsa_rsassa_pss_sign()
1699 mbedtls_md_free( &md_ctx ); in rsa_rsassa_pss_sign()
2031 mbedtls_md_context_t md_ctx; in mbedtls_rsa_rsassa_pss_verify_ext() local
2099 mbedtls_md_init( &md_ctx ); in mbedtls_rsa_rsassa_pss_verify_ext()
2100 if( ( ret = mbedtls_md_setup( &md_ctx, md_info, 0 ) ) != 0 ) in mbedtls_rsa_rsassa_pss_verify_ext()
2103 ret = mgf_mask( p, siglen - hlen - 1, hash_start, hlen, &md_ctx ); in mbedtls_rsa_rsassa_pss_verify_ext()
2130 ret = mbedtls_md_starts( &md_ctx ); in mbedtls_rsa_rsassa_pss_verify_ext()
2133 ret = mbedtls_md_update( &md_ctx, zeros, 8 ); in mbedtls_rsa_rsassa_pss_verify_ext()
2136 ret = mbedtls_md_update( &md_ctx, hash, hashlen ); in mbedtls_rsa_rsassa_pss_verify_ext()
2139 ret = mbedtls_md_update( &md_ctx, p, observed_salt_len ); in mbedtls_rsa_rsassa_pss_verify_ext()
2142 ret = mbedtls_md_finish( &md_ctx, result ); in mbedtls_rsa_rsassa_pss_verify_ext()
2153 mbedtls_md_free( &md_ctx ); in mbedtls_rsa_rsassa_pss_verify_ext()