diff options
author | Tomas Mraz <tomas@openssl.org> | 2022-01-25 18:10:26 +0100 |
---|---|---|
committer | Pauli <pauli@openssl.org> | 2022-01-27 12:02:17 +1100 |
commit | 4ac8e51e3272c7d7f2e7d62da699f52e0112ac05 (patch) | |
tree | 0d0d18f7ec7be322fbbbea273b747ceab50a0f73 /providers/implementations | |
parent | 17a27b8979d8dab8e57f2dad68d85dc2033cfeda (diff) |
Fix IV length of DES EDE ECB implementations
Fixes #17587
Reviewed-by: Paul Dale <pauli@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/17591)
(cherry picked from commit d450eb84c802b2f78971f905b251a0fb89ebb7d1)
Diffstat (limited to 'providers/implementations')
-rw-r--r-- | providers/implementations/ciphers/cipher_tdes.c | 6 | ||||
-rw-r--r-- | providers/implementations/ciphers/cipher_tdes_default.c | 2 |
2 files changed, 2 insertions, 6 deletions
diff --git a/providers/implementations/ciphers/cipher_tdes.c b/providers/implementations/ciphers/cipher_tdes.c index e63c143755..409e2b8306 100644 --- a/providers/implementations/ciphers/cipher_tdes.c +++ b/providers/implementations/ciphers/cipher_tdes.c @@ -19,11 +19,7 @@ #include "cipher_tdes.h" #include "prov/implementations.h" -/* - * NOTE: ECB mode does not use an IV - but existing test code is setting - * an IV. Fixing this could potentially make applications break. - */ /* ossl_tdes_ede3_ecb_functions */ -IMPLEMENT_tdes_cipher(ede3, EDE3, ecb, ECB, TDES_FLAGS, 64*3, 64, 64, block); +IMPLEMENT_tdes_cipher(ede3, EDE3, ecb, ECB, TDES_FLAGS, 64*3, 64, 0, block); /* ossl_tdes_ede3_cbc_functions */ IMPLEMENT_tdes_cipher(ede3, EDE3, cbc, CBC, TDES_FLAGS, 64*3, 64, 64, block); diff --git a/providers/implementations/ciphers/cipher_tdes_default.c b/providers/implementations/ciphers/cipher_tdes_default.c index 0e75d0ff11..4d1fe5c3f9 100644 --- a/providers/implementations/ciphers/cipher_tdes_default.c +++ b/providers/implementations/ciphers/cipher_tdes_default.c @@ -26,7 +26,7 @@ IMPLEMENT_tdes_cipher(ede3, EDE3, cfb1, CFB, TDES_FLAGS, 64*3, 8, 64, stream); IMPLEMENT_tdes_cipher(ede3, EDE3, cfb8, CFB, TDES_FLAGS, 64*3, 8, 64, stream); /* ossl_tdes_ede2_ecb_functions */ -IMPLEMENT_tdes_cipher(ede2, EDE2, ecb, ECB, TDES_FLAGS, 64*2, 64, 64, block); +IMPLEMENT_tdes_cipher(ede2, EDE2, ecb, ECB, TDES_FLAGS, 64*2, 64, 0, block); /* ossl_tdes_ede2_cbc_functions */ IMPLEMENT_tdes_cipher(ede2, EDE2, cbc, CBC, TDES_FLAGS, 64*2, 64, 64, block); /* ossl_tdes_ede2_ofb_functions */ |