diff mbox

[for-2.9,2/3] cryptodev: switch to standard des

Message ID 1480928380-161760-3-git-send-email-longpeng2@huawei.com
State New
Headers show

Commit Message

The cryptodev use DES-RFB for ecb(des) currently, we should use
standard DES for cryptodev instead.

Signed-off-by: Longpeng(Mike) <longpeng2@huawei.com>
---
 backends/cryptodev-builtin.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Daniel P. Berrangé Dec. 5, 2016, 9:25 a.m. UTC | #1
On Mon, Dec 05, 2016 at 04:59:39PM +0800, Longpeng(Mike) wrote:
> The cryptodev use DES-RFB for ecb(des) currently, we should use
> standard DES for cryptodev instead.
> 
> Signed-off-by: Longpeng(Mike) <longpeng2@huawei.com>
> ---
>  backends/cryptodev-builtin.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/backends/cryptodev-builtin.c b/backends/cryptodev-builtin.c
> index ecad565..f1b5b1b 100644
> --- a/backends/cryptodev-builtin.c
> +++ b/backends/cryptodev-builtin.c
> @@ -207,7 +207,7 @@ static int cryptodev_builtin_create_cipher_session(
>          break;
>      case VIRTIO_CRYPTO_CIPHER_DES_ECB:
>          mode = QCRYPTO_CIPHER_MODE_ECB;
> -        algo = QCRYPTO_CIPHER_ALG_DES_RFB;
> +        algo = QCRYPTO_CIPHER_ALG_DES;
>          break;
>      default:
>          error_setg(errp, "Unsupported cipher alg :%u",

This will need updating due to my suggestion to change the enum name, but
regardless this fix is clearly needed - we don't want cryptodev using the
VNC custom bit-reversed single-DES

Reviewed-by: Daniel P. Berrange <berrange@redhat.com>

Regards,
Daniel
diff mbox

Patch

diff --git a/backends/cryptodev-builtin.c b/backends/cryptodev-builtin.c
index ecad565..f1b5b1b 100644
--- a/backends/cryptodev-builtin.c
+++ b/backends/cryptodev-builtin.c
@@ -207,7 +207,7 @@  static int cryptodev_builtin_create_cipher_session(
         break;
     case VIRTIO_CRYPTO_CIPHER_DES_ECB:
         mode = QCRYPTO_CIPHER_MODE_ECB;
-        algo = QCRYPTO_CIPHER_ALG_DES_RFB;
+        algo = QCRYPTO_CIPHER_ALG_DES;
         break;
     default:
         error_setg(errp, "Unsupported cipher alg :%u",