int shift;
nbits >>= 1;
- shift = nbits - BN_num_bits(&bn_inv_sqrt_2);
+ shift = nbits - BN_num_bits(&ossl_bn_inv_sqrt_2);
/* Upper bound check */
if (BN_num_bits(p) != nbits)
goto err;
/* set low = (√2)(2^(nbits/2 - 1) */
- if (!BN_copy(low, &bn_inv_sqrt_2))
+ if (!BN_copy(low, &ossl_bn_inv_sqrt_2))
goto err;
if (shift >= 0) {
/*
- * We don't have all the bits. bn_inv_sqrt_2 contains a rounded up
+ * We don't have all the bits. ossl_bn_inv_sqrt_2 contains a rounded up
* value, so there is a very low probability that we'll reject a valid
* value.
*/
* The modulus is composite, but not a power of a prime.
* The modulus has no factors smaller than 752.
*/
- if (!BN_gcd(gcd, rsa->n, bn_get0_small_factors(), ctx) || !BN_is_one(gcd)) {
+ if (!BN_gcd(gcd, rsa->n, ossl_bn_get0_small_factors(), ctx)
+ || !BN_is_one(gcd)) {
ERR_raise(ERR_LIB_RSA, RSA_R_INVALID_MODULUS);
goto err;
}
- ret = bn_miller_rabin_is_prime(rsa->n, 0, ctx, NULL, 1, &status);
+ ret = ossl_bn_miller_rabin_is_prime(rsa->n, 0, ctx, NULL, 1, &status);
if (ret != 1 || status != BN_PRIMETEST_COMPOSITE_NOT_POWER_OF_PRIME) {
ERR_raise(ERR_LIB_RSA, RSA_R_INVALID_MODULUS);
ret = 0;