diff mbox series

[API-NEXT,v1,2/12] linux-gen: crypto: drop DES-CBC support

Message ID 1511254809-21207-3-git-send-email-odpbot@yandex.ru
State Superseded
Headers show
Series [API-NEXT,v1,1/12] doxygen: remove drv types | expand

Commit Message

Github ODP bot Nov. 21, 2017, 8:59 a.m. UTC
From: Dmitry Eremin-Solenikov <dmitry.ereminsolenikov@linaro.org>


DES-CBC (not 3DES-CBC) support is invalid (DES should use 8 bytes key,
not 24 bytes), it is not covered by testsuite and DES is
cracable/deprecated/etc since long ago. Stop providing single-key DES
support. In case one really needs it, it can be emulated through
supplying same key triple times to 3DES-CBC.

Signed-off-by: Dmitry Eremin-Solenikov <dmitry.ereminsolenikov@linaro.org>

Reviewed-by: Bill Fischofer <bill.fischofer@linaro.org>

Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org>

---
/** Email created from pull request 301 (muvarov:api-next)
 ** https://github.com/Linaro/odp/pull/301
 ** Patch: https://github.com/Linaro/odp/pull/301.patch
 ** Base sha: d4b364849c4abb4c71e0c5260e1a793ebb8dc97d
 ** Merge commit sha: 390c09cfddb8e938a4bef428fb46ce575f22c984
 **/
 platform/linux-generic/odp_crypto.c | 10 ----------
 1 file changed, 10 deletions(-)
diff mbox series

Patch

diff --git a/platform/linux-generic/odp_crypto.c b/platform/linux-generic/odp_crypto.c
index 9cf903d03..4c708931a 100644
--- a/platform/linux-generic/odp_crypto.c
+++ b/platform/linux-generic/odp_crypto.c
@@ -25,7 +25,6 @@ 
 #include <string.h>
 #include <stdlib.h>
 
-#include <openssl/des.h>
 #include <openssl/rand.h>
 #include <openssl/hmac.h>
 #include <openssl/evp.h>
@@ -40,9 +39,6 @@ 
 static const odp_crypto_cipher_capability_t cipher_capa_null[] = {
 {.key_len = 0, .iv_len = 0} };
 
-static const odp_crypto_cipher_capability_t cipher_capa_des[] = {
-{.key_len = 24, .iv_len = 8} };
-
 static const odp_crypto_cipher_capability_t cipher_capa_trides_cbc[] = {
 {.key_len = 24, .iv_len = 8} };
 
@@ -582,7 +578,6 @@  int odp_crypto_capability(odp_crypto_capability_t *capa)
 	memset(capa, 0, sizeof(odp_crypto_capability_t));
 
 	capa->ciphers.bit.null       = 1;
-	capa->ciphers.bit.des        = 1;
 	capa->ciphers.bit.trides_cbc = 1;
 	capa->ciphers.bit.aes_cbc    = 1;
 	capa->ciphers.bit.aes_gcm    = 1;
@@ -620,10 +615,6 @@  int odp_crypto_cipher_capability(odp_cipher_alg_t cipher,
 		src = cipher_capa_null;
 		num = sizeof(cipher_capa_null) / size;
 		break;
-	case ODP_CIPHER_ALG_DES:
-		src = cipher_capa_des;
-		num = sizeof(cipher_capa_des) / size;
-		break;
 	case ODP_CIPHER_ALG_3DES_CBC:
 		src = cipher_capa_trides_cbc;
 		num = sizeof(cipher_capa_trides_cbc) / size;
@@ -737,7 +728,6 @@  odp_crypto_session_create(odp_crypto_session_param_t *param,
 		session->cipher.func = null_crypto_routine;
 		rc = 0;
 		break;
-	case ODP_CIPHER_ALG_DES:
 	case ODP_CIPHER_ALG_3DES_CBC:
 		rc = process_cipher_param(session, EVP_des_ede3_cbc());
 		break;