Lines Matching refs:hlen

470     unsigned int hlen;  in mgf_mask()  local
476 hlen = mbedtls_md_get_size( md_ctx->md_info ); in mgf_mask()
483 use_len = hlen; in mgf_mask()
484 if( dlen < hlen ) in mgf_mask()
518 unsigned int hlen; in mbedtls_rsa_rsaes_oaep_encrypt() local
533 hlen = mbedtls_md_get_size( md_info ); in mbedtls_rsa_rsaes_oaep_encrypt()
536 if( ilen + 2 * hlen + 2 < ilen || olen < ilen + 2 * hlen + 2 ) in mbedtls_rsa_rsaes_oaep_encrypt()
544 if( ( ret = f_rng( p_rng, p, hlen ) ) != 0 ) in mbedtls_rsa_rsaes_oaep_encrypt()
547 p += hlen; in mbedtls_rsa_rsaes_oaep_encrypt()
551 p += hlen; in mbedtls_rsa_rsaes_oaep_encrypt()
552 p += olen - 2 * hlen - 2 - ilen; in mbedtls_rsa_rsaes_oaep_encrypt()
564 mgf_mask( output + hlen + 1, olen - hlen - 1, output + 1, hlen, in mbedtls_rsa_rsaes_oaep_encrypt()
568 mgf_mask( output + 1, hlen, output + hlen + 1, olen - hlen - 1, in mbedtls_rsa_rsaes_oaep_encrypt()
694 unsigned int hlen; in mbedtls_rsa_rsaes_oaep_decrypt() local
713 hlen = mbedtls_md_get_size( md_info ); in mbedtls_rsa_rsaes_oaep_decrypt()
716 if( 2 * hlen + 2 > ilen ) in mbedtls_rsa_rsaes_oaep_decrypt()
744 mgf_mask( buf + 1, hlen, buf + hlen + 1, ilen - hlen - 1, in mbedtls_rsa_rsaes_oaep_decrypt()
748 mgf_mask( buf + hlen + 1, ilen - hlen - 1, buf + 1, hlen, in mbedtls_rsa_rsaes_oaep_decrypt()
761 p += hlen; /* Skip seed */ in mbedtls_rsa_rsaes_oaep_decrypt()
764 for( i = 0; i < hlen; i++ ) in mbedtls_rsa_rsaes_oaep_decrypt()
771 for( i = 0; i < ilen - 2 * hlen - 2; i++ ) in mbedtls_rsa_rsaes_oaep_decrypt()
933 unsigned int slen, hlen, offset = 0; in mbedtls_rsa_rsassa_pss_sign() local
961 hlen = mbedtls_md_get_size( md_info ); in mbedtls_rsa_rsassa_pss_sign()
962 slen = hlen; in mbedtls_rsa_rsassa_pss_sign()
964 if( olen < hlen + slen + 2 ) in mbedtls_rsa_rsassa_pss_sign()
975 p += olen - hlen * 2 - 2; in mbedtls_rsa_rsassa_pss_sign()
999 mgf_mask( sig + offset, olen - hlen - 1 - offset, p, hlen, &md_ctx ); in mbedtls_rsa_rsassa_pss_sign()
1006 p += hlen; in mbedtls_rsa_rsassa_pss_sign()
1194 unsigned int hlen; in mbedtls_rsa_rsassa_pss_verify_ext() local
1234 hlen = mbedtls_md_get_size( md_info ); in mbedtls_rsa_rsassa_pss_verify_ext()
1235 slen = siglen - hlen - 1; /* Currently length of salt + padding */ in mbedtls_rsa_rsassa_pss_verify_ext()
1260 mgf_mask( p, siglen - hlen - 1, p + siglen - hlen - 1, hlen, &md_ctx ); in mbedtls_rsa_rsassa_pss_verify_ext()
1295 if( memcmp( p + slen, result, hlen ) == 0 ) in mbedtls_rsa_rsassa_pss_verify_ext()