Skip to contentSkip to conversation

cryptodev: remove single-DES support in cryptodev

PATCH Applied Longpeng(Mike) 3 participants 3 messages Dec 7, 2016 – Dec 9, 2016

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 cryptodev: remove single-DES support in cryptodev

Single-DES is obsolete and it's broken/useless for decades, we should remove it in cryptodev, as suggested by Daniel.
Guest who wants to use this obsolete cipher alg will use its built-in implementation instead.

---
 backends/cryptodev-builtin.c | 4 ----
 1 file changed, 4 deletions(-)
backends/cryptodev-builtin.c +0 -4
index a4224f4..5fb2836 100644
@@ -205,10 +205,6 @@ static int cryptodev_builtin_create_cipher_session(
             return -1;
         }
         break;
-    case VIRTIO_CRYPTO_CIPHER_DES_ECB:
-        mode = QCRYPTO_CIPHER_MODE_ECB;
-        algo = QCRYPTO_CIPHER_ALG_DES_RFB;
-        break;
     default:
         error_setg(errp, "Unsupported cipher alg :%u",
                    sess_info->cipher_alg);
Signature · 1 line
1.8.3.1
Reviewed-by on v1 1/1
#1 lore raw
Quoted 15 lines · Longpeng(Mike)

Single-DES is obsolete and it's broken/useless for decades, we should remove it in cryptodev, as suggested by Daniel.
Guest who wants to use this obsolete cipher alg will use its built-in implementation instead.

---
 backends/cryptodev-builtin.c | 4 ----
 1 file changed, 4 deletions(-)
backends/cryptodev-builtin.c +0 -0
index a4224f4..5fb2836 100644

backends/cryptodev-builtin.c static int cryptodev_builtin_create_cipher_session( · line 210

Quoted 10 lines
backends/cryptodev-builtin.c +0 -4
@@ -205,10 +205,6 @@ static int cryptodev_builtin_create_cipher_session(
             return -1;
         }
         break;
-    case VIRTIO_CRYPTO_CIPHER_DES_ECB:
-        mode = QCRYPTO_CIPHER_MODE_ECB;
-        algo = QCRYPTO_CIPHER_ALG_DES_RFB;
-        break;
     default:
         error_setg(errp, "Unsupported cipher alg :%u",
                    sess_info->cipher_alg);

Regards,
Daniel

Signature · 3 lines
|: http://berrange.com      -o-    http://www.flickr.com/photos/dberrange/ :|
|: http://libvirt.org              -o-             http://virt-manager.org :|
|: http://entangle-photo.org       -o-    http://search.cpan.org/~danberr/ :|
#2 lore raw
Quoted 28 lines

From: Daniel P. Berrange [mailto:[email protected]]
Sent: Wednesday, December 07, 2016 5:07 PM
To: longpeng
Cc: Gonglei (Arei); [email protected]; Wubin (H); Zhoujian (jay, Euler); [email protected]
Subject: Re: [PATCH for-2.9] cryptodev: remove single-DES support in cryptodev

Quoted 19 lines · Longpeng(Mike)

Single-DES is obsolete and it's broken/useless for decades, we should remove it in cryptodev, as suggested by Daniel.
Guest who wants to use this obsolete cipher alg will use its built-in implementation instead.

---
 backends/cryptodev-builtin.c | 4 ----
 1 file changed, 4 deletions(-)
backends/cryptodev-builtin.c +0 -1
index a4224f4..5fb2836 100644
@@ -205,10 +205,6 @@ static int cryptodev_builtin_create_cipher_session(
             return -1;
         }
         break;
-    case VIRTIO_CRYPTO_CIPHER_DES_ECB:
Quoted 9 lines

backends/cryptodev-builtin.c static int cryptodev_builtin_create_cipher_session( · line 210

Quoted 6 lines
backends/cryptodev-builtin.c +0 -3
-        mode = QCRYPTO_CIPHER_MODE_ECB;
-        algo = QCRYPTO_CIPHER_ALG_DES_RFB;
-        break;
     default:
         error_setg(errp, "Unsupported cipher alg :%u",
                    sess_info->cipher_alg);

Queued, thanks.

Regards,
-Gonglei