Lines Matching refs:md_ctx

1116                       size_t slen, mbedtls_md_context_t *md_ctx )  in mgf_mask()  argument
1128 hlen = mbedtls_md_get_size( md_ctx->md_info ); in mgf_mask()
1139 if( ( ret = mbedtls_md_starts( md_ctx ) ) != 0 ) in mgf_mask()
1141 if( ( ret = mbedtls_md_update( md_ctx, src, slen ) ) != 0 ) in mgf_mask()
1143 if( ( ret = mbedtls_md_update( md_ctx, counter, 4 ) ) != 0 ) in mgf_mask()
1145 if( ( ret = mbedtls_md_finish( md_ctx, mask ) ) != 0 ) in mgf_mask()
1180 mbedtls_md_context_t md_ctx; in mbedtls_rsa_rsaes_oaep_encrypt() local
1220 mbedtls_md_init( &md_ctx ); in mbedtls_rsa_rsaes_oaep_encrypt()
1221 if( ( ret = mbedtls_md_setup( &md_ctx, md_info, 0 ) ) != 0 ) in mbedtls_rsa_rsaes_oaep_encrypt()
1226 &md_ctx ) ) != 0 ) in mbedtls_rsa_rsaes_oaep_encrypt()
1231 &md_ctx ) ) != 0 ) in mbedtls_rsa_rsaes_oaep_encrypt()
1235 mbedtls_md_free( &md_ctx ); in mbedtls_rsa_rsaes_oaep_encrypt()
1353 mbedtls_md_context_t md_ctx; in mbedtls_rsa_rsaes_oaep_decrypt() local
1393 mbedtls_md_init( &md_ctx ); in mbedtls_rsa_rsaes_oaep_decrypt()
1394 if( ( ret = mbedtls_md_setup( &md_ctx, md_info, 0 ) ) != 0 ) in mbedtls_rsa_rsaes_oaep_decrypt()
1396 mbedtls_md_free( &md_ctx ); in mbedtls_rsa_rsaes_oaep_decrypt()
1402 &md_ctx ) ) != 0 || in mbedtls_rsa_rsaes_oaep_decrypt()
1405 &md_ctx ) ) != 0 ) in mbedtls_rsa_rsaes_oaep_decrypt()
1407 mbedtls_md_free( &md_ctx ); in mbedtls_rsa_rsaes_oaep_decrypt()
1411 mbedtls_md_free( &md_ctx ); in mbedtls_rsa_rsaes_oaep_decrypt()
1771 mbedtls_md_context_t md_ctx; in rsa_rsassa_pss_sign() local
1843 mbedtls_md_init( &md_ctx ); in rsa_rsassa_pss_sign()
1844 if( ( ret = mbedtls_md_setup( &md_ctx, md_info, 0 ) ) != 0 ) in rsa_rsassa_pss_sign()
1848 if( ( ret = mbedtls_md_starts( &md_ctx ) ) != 0 ) in rsa_rsassa_pss_sign()
1850 if( ( ret = mbedtls_md_update( &md_ctx, p, 8 ) ) != 0 ) in rsa_rsassa_pss_sign()
1852 if( ( ret = mbedtls_md_update( &md_ctx, hash, hashlen ) ) != 0 ) in rsa_rsassa_pss_sign()
1854 if( ( ret = mbedtls_md_update( &md_ctx, salt, slen ) ) != 0 ) in rsa_rsassa_pss_sign()
1856 if( ( ret = mbedtls_md_finish( &md_ctx, p ) ) != 0 ) in rsa_rsassa_pss_sign()
1865 &md_ctx ) ) != 0 ) in rsa_rsassa_pss_sign()
1875 mbedtls_md_free( &md_ctx ); in rsa_rsassa_pss_sign()
2176 mbedtls_md_context_t md_ctx; in mbedtls_rsa_rsassa_pss_verify_ext() local
2238 mbedtls_md_init( &md_ctx ); in mbedtls_rsa_rsassa_pss_verify_ext()
2239 if( ( ret = mbedtls_md_setup( &md_ctx, md_info, 0 ) ) != 0 ) in mbedtls_rsa_rsassa_pss_verify_ext()
2242 ret = mgf_mask( p, siglen - hlen - 1, hash_start, hlen, &md_ctx ); in mbedtls_rsa_rsassa_pss_verify_ext()
2269 ret = mbedtls_md_starts( &md_ctx ); in mbedtls_rsa_rsassa_pss_verify_ext()
2272 ret = mbedtls_md_update( &md_ctx, zeros, 8 ); in mbedtls_rsa_rsassa_pss_verify_ext()
2275 ret = mbedtls_md_update( &md_ctx, hash, hashlen ); in mbedtls_rsa_rsassa_pss_verify_ext()
2278 ret = mbedtls_md_update( &md_ctx, p, observed_salt_len ); in mbedtls_rsa_rsassa_pss_verify_ext()
2281 ret = mbedtls_md_finish( &md_ctx, result ); in mbedtls_rsa_rsassa_pss_verify_ext()
2292 mbedtls_md_free( &md_ctx ); in mbedtls_rsa_rsassa_pss_verify_ext()