]> git.ipfire.org Git - thirdparty/openvpn.git/commit
Remove custom PRNG function
authorArne Schwabe <arne@rfc2549.org>
Sun, 7 Nov 2021 09:01:47 +0000 (10:01 +0100)
committerGert Doering <gert@greenie.muc.de>
Sun, 7 Nov 2021 19:01:29 +0000 (20:01 +0100)
commita2f6604d55ea34c33668cab632928a2da2ae11f1
treea0989e62c5e03ee78076032677c7a62ab747cda2
parente739f41d05084c1bc9bfb6c5d49c74de37e53dc7
Remove custom PRNG function

Remove the custom PRNG from OpenVPN and instead rely always on the random
number generator from the SSL library. The only place that this is in a
performance critical place is the CBC IV generation. Even with that in mind
a micro benchmark shows no significant enough change with OpenSSL 3.0:

------------------------------------------------------------------------
Benchmark                              Time             CPU   Iterations
------------------------------------------------------------------------
BM_OpenSSL_RAND                      842 ns          842 ns       753401
BM_OpenVPN_RAND                      743 ns          743 ns       826690
BM_Encrypt_AES_CBC_dummy            1044 ns         1044 ns       631530
BM_Encrypt_AES_CBC_RAND_bytes       1892 ns         1891 ns       346566
BM_Encrypt_AES_CBC_prng_bytes       1818 ns         1817 ns       373970

(source https://gist.github.com/schwabe/029dc5e5a690df8e2e3f774a13ec7bce)

Signed-off-by: Arne Schwabe <arne@rfc2549.org>
Acked-by: Steffan Karger <steffan@karger.me>
Message-Id: <20211107090147.3150261-1-arne@rfc2549.org>
URL: https://www.mail-archive.com/openvpn-devel@lists.sourceforge.net/msg23116.html
Signed-off-by: Gert Doering <gert@greenie.muc.de>
Changes.rst
doc/man-sections/advanced-options.rst
src/openvpn/crypto.c
src/openvpn/crypto.h
src/openvpn/init.c
src/openvpn/options.c
src/openvpn/options.h
src/openvpn/ps.c
src/openvpn/ssl.c