Lines Matching refs:olen
729 size_t olen; in mbedtls_rsa_public() local
751 olen = ctx->len; in mbedtls_rsa_public()
753 MBEDTLS_MPI_CHK(mbedtls_mpi_write_binary(&T, output, olen)); in mbedtls_rsa_public()
866 size_t olen; in mbedtls_rsa_private() local
1037 olen = ctx->len; in mbedtls_rsa_private()
1038 MBEDTLS_MPI_CHK(mbedtls_mpi_write_binary(&T, output, olen)); in mbedtls_rsa_private()
1307 size_t olen; in mbedtls_rsa_rsaes_oaep_encrypt() local
1321 olen = ctx->len; in mbedtls_rsa_rsaes_oaep_encrypt()
1324 if (ilen + 2 * hlen + 2 < ilen || olen < ilen + 2 * hlen + 2) { in mbedtls_rsa_rsaes_oaep_encrypt()
1328 memset(output, 0, olen); in mbedtls_rsa_rsaes_oaep_encrypt()
1345 p += olen - 2 * hlen - 2 - ilen; in mbedtls_rsa_rsaes_oaep_encrypt()
1352 if ((ret = mgf_mask(output + hlen + 1, olen - hlen - 1, output + 1, hlen, in mbedtls_rsa_rsaes_oaep_encrypt()
1358 if ((ret = mgf_mask(output + 1, hlen, output + hlen + 1, olen - hlen - 1, in mbedtls_rsa_rsaes_oaep_encrypt()
1377 size_t nb_pad, olen; in mbedtls_rsa_rsaes_pkcs1_v15_encrypt() local
1381 olen = ctx->len; in mbedtls_rsa_rsaes_pkcs1_v15_encrypt()
1384 if (ilen + 11 < ilen || olen < ilen + 11) { in mbedtls_rsa_rsaes_pkcs1_v15_encrypt()
1388 nb_pad = olen - 3 - ilen; in mbedtls_rsa_rsaes_pkcs1_v15_encrypt()
1458 size_t *olen, in mbedtls_rsa_rsaes_oaep_decrypt() argument
1564 *olen = ilen - (p - buf); in mbedtls_rsa_rsaes_oaep_decrypt()
1565 if (*olen != 0) { in mbedtls_rsa_rsaes_oaep_decrypt()
1566 memcpy(output, p, *olen); in mbedtls_rsa_rsaes_oaep_decrypt()
1585 size_t *olen, in mbedtls_rsa_rsaes_pkcs1_v15_decrypt() argument
1611 output, output_max_len, olen); in mbedtls_rsa_rsaes_pkcs1_v15_decrypt()
1626 size_t *olen, in mbedtls_rsa_pkcs1_decrypt() argument
1634 return mbedtls_rsa_rsaes_pkcs1_v15_decrypt(ctx, f_rng, p_rng, olen, in mbedtls_rsa_pkcs1_decrypt()
1641 olen, input, output, in mbedtls_rsa_pkcs1_decrypt()
1660 size_t olen; in rsa_rsassa_pss_sign() local
1679 olen = ctx->len; in rsa_rsassa_pss_sign()
1707 if (olen < hlen + min_slen + 2) { in rsa_rsassa_pss_sign()
1709 } else if (olen >= hlen + hlen + 2) { in rsa_rsassa_pss_sign()
1712 slen = olen - hlen - 2; in rsa_rsassa_pss_sign()
1714 } else if ((saltlen < 0) || (saltlen + hlen + 2 > olen)) { in rsa_rsassa_pss_sign()
1720 memset(sig, 0, olen); in rsa_rsassa_pss_sign()
1724 p += olen - hlen - slen - 2; in rsa_rsassa_pss_sign()
1747 ret = mgf_mask(sig + offset, olen - hlen - 1 - offset, p, hlen, in rsa_rsassa_pss_sign()
1754 sig[0] &= 0xFF >> (olen * 8 - msb); in rsa_rsassa_pss_sign()