Discourage using 64-bit block ciphers
PATCH 1/1 Discourage using 64-bit block ciphers
As discussed with the development team, we should start moving away from ciphers with a small block size. For OpenVPN in particular this means moving away from 64-bit block ciphers, towards 128-bit block ciphers. This patch makes a start with that by moving ciphers with a block size < 128 bits to the bottom of the --show-ciphers output, and printing a warning in the connection phase if such a cipher is used.
While touching this function, improve the output of --show-ciphers by ordering the output alphabetically, and changing the output format slightly.
--- src/openvpn/crypto.c | 11 +++-- src/openvpn/crypto_openssl.c | 111 +++++++++++++++++++++++++++++++++--------- src/openvpn/crypto_polarssl.c | 41 ++++++++++++++-- tests/t_lpback.sh | 2 +- 4 files changed, 134 insertions(+), 31 deletions(-)
src/openvpn/crypto.c +8 -3
@@ -492,9 +492,14 @@ init_key_ctx (struct key_ctx *ctx, struct key *key,dmsg (D_SHOW_KEYS ,"%s: CIPHER KEY: %s" , prefix,format_hex (key->cipher, kt->cipher_length,0 , &gc));dmsg (D_CRYPTO_DEBUG ,"%s: CIPHER block_size=%d iv_size=%d" , - prefix, -cipher_kt_block_size (kt->cipher), -cipher_kt_iv_size (kt->cipher)); + prefix,cipher_kt_block_size (kt->cipher), +cipher_kt_iv_size (kt->cipher)); +if (cipher_kt_block_size (kt->cipher) <128 /8 ) + { +msg (M_WARN ,"WARNING: this cipher's block size is less than 128 bit " +"(%d bit). Consider using a --cipher with a larger block size." , +cipher_kt_block_size (kt->cipher)*8 ); + } }if (kt->digest && kt->hmac_length >0 ) {
src/openvpn/crypto_openssl.c +89 -22
138 lines not on this page · raw message
src/openvpn/crypto_polarssl.c +36 -5
54 lines not on this page · raw message
tests/t_lpback.sh +1 -1
@@ -26,7 +26,7 @@ trap "rm -f key.$$ log.$$ ; exit 1" 0 3 # Get list of supported ciphers from openvpn --show-ciphers output CIPHERS=$(${top_builddir}/src/openvpn/openvpn --show-ciphers | \ - sed -e '1,/^$/d' -e s'/ .*//' -e '/^\s*$/d' | sort) + sed -e '/The following/,/^$/d' -e s'/ .*//' -e '/^\s*$/d') # SK, 2014-06-04: currently the DES-EDE3-CFB1 implementation of OpenSSL is # broken (see http://rt.openssl.org/Ticket/Display.html?id=2867), so exclude
Signature · 1 line
2.7.4
Am 16.08.16 um 16:46 schrieb Steffan Karger:
Quoted 11 lines
As discussed with the development team, we should start moving away from ciphers with a small block size. For OpenVPN in particular this means moving away from 64-bit block ciphers, towards 128-bit block ciphers. This patch makes a start with that by moving ciphers with a block size < 128 bits to the bottom of the --show-ciphers output, and printing a warning in the connection phase if such a cipher is used.
While touching this function, improve the output of --show-ciphers by ordering the output alphabetically, and changing the output format slightly.
ACK again from me. (C89 issue applies here as well)
Arne
Your patch has been applied to the release/2.3 branch
commit 610fdbbdb0abf65c1e7620143afccd62cd162a8f
Author: Steffan Karger Date: Tue Aug 16 16:46:01 2016 +0200
Discourage using 64-bit block ciphers
Signed-off-by: Steffan Karger <[email protected]...>
Acked-by: Arne Schwabe <[email protected]...>
Message-Id: <[email protected]...>
URL: https://www.mail-archive.com/[email protected]/msg00030.html
CVE: 2016-6329
Signed-off-by: David Sommerseth <[email protected]...>--
kind regards,
David Sommerseth