openssl/util
slontis dd1d7bcb69 Improve FIPS RSA keygen performance.
FIPS 186-4 has 5 different algorithms for key generation,
and all of them rely on testing GCD(a,n) == 1 many times.

Cachegrind was showing that during a RSA keygen operation,
the function BN_gcd() was taking a considerable percentage
of the total cycles.

The default provider uses multiprime keygen, which seemed to
be much faster. This is because it uses BN_mod_inverse()
instead.

For a 4096 bit key, the entropy of a key that was taking a
long time to generate was recorded and fed back into subsequent
runs. Roughly 40% of the cycle time was BN_gcd() with most of the
remainder in the prime testing. Changing to use the inverse
resulted in the cycle count being 96% in the prime testing.

Reviewed-by: Paul Dale <pauli@openssl.org>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/19578)
2022-11-21 11:17:59 +01:00
..
perl ParseC.pm: gracefully handle DOS-style end-of-line in source files 2022-11-18 07:47:44 +01:00
add-depends.pl
build.info
c-compress-test.pl
cavs-to-evptest.pl
check-format-test-negatives.c check-format.pl: improve whitespace reporting on <op>= 2022-09-02 21:32:46 +02:00
check-format-test-positives.c check-format.pl: improve whitespace reporting on <op>= 2022-09-02 21:32:46 +02:00
check-format.pl check-format.pl: improve whitespace reporting on <op>= 2022-09-02 21:32:46 +02:00
check-malloc-errs
ck_errf.pl
copy.pl
dofile.pl
echo.pl
engines.num
err-to-raise
find-doc-nits
find-unused-errs
fips-checksums.sh
fix-deprecation
fix-includes
fix-includes.sed
indent.pro Rename SSL3_RECORD to TLS_RL_RECORD 2022-11-14 07:51:26 +00:00
lang-compress.pl
libcrypto.num Improve FIPS RSA keygen performance. 2022-11-21 11:17:59 +01:00
libssl.num Add support for compressed certificates (RFC8879) 2022-10-18 09:30:22 -04:00
local_shlib.com.in
markdownlint.rb Add initial demo-driven design demos 2022-06-24 16:00:00 +02:00
merge-err-lines
missingcrypto111.txt
missingcrypto-internal.txt
missingcrypto.txt Add doc for EVP_ASYM_CIPHER-RSA and clean up OSSL_PROVIDER-FIPS.pod. 2022-11-18 14:29:01 +01:00
missingmacro111.txt
missingmacro.txt
missingssl111.txt
missingssl-internal.txt
missingssl.txt
mk-fipsmodule-cnf.pl
mkbuildinf.pl
mkdef.pl Fix various typos, repeated words, align some spelling to LDP. 2022-10-12 16:55:28 +11:00
mkdir-p.pl
mkerr.pl Fix various typos, repeated words, align some spelling to LDP. 2022-10-12 16:55:28 +11:00
mknum.pl
mkpod2html.pl
mkrc.pl
mktar.sh
opensslwrap.sh
other-internal.syms
other.syms Allow PKCS12 export to set arbitrary bag attributes 2022-09-23 17:40:02 +01:00
providers.num
shlib_wrap.sh.in
su-filter.pl
unlocal_shlib.com.in
withlibctx.pl
wrap.pl.in util/wrap.pl.in: Use parentheses so kill gets all its arguments 2022-09-15 08:42:23 +02:00
write-man-symlinks