Avoid unnecessary loops in BN_generate_prime_ex()
authortb <tb@openbsd.org>
Tue, 19 Jul 2022 16:19:19 +0000 (16:19 +0000)
committertb <tb@openbsd.org>
Tue, 19 Jul 2022 16:19:19 +0000 (16:19 +0000)
commit5289a806818bb8067a91ed55e7e1e46b338373d7
treebc14a8e4066b5cdb93c1060e382d4389d9c70a5f
parent1eaf1195ea874d3edf85bd0b8d7f9ce3f4f02767
Avoid unnecessary loops in BN_generate_prime_ex()

Since there is nothing randomized in bn_is_prime_bpsw(), the concept
of rounds makes no sense. Apply a minimal change for now that avoids
expensive loops that won't change the outcome in case we found a
probable prime.

ok jsing
lib/libcrypto/bn/bn_prime.c