]> Git Repo - qemu.git/commitdiff
cryptodev: add xts(aes) support
authorLongpeng(Mike) <[email protected]>
Mon, 5 Dec 2016 11:39:09 +0000 (19:39 +0800)
committerGonglei <[email protected]>
Sat, 24 Dec 2016 05:46:27 +0000 (13:46 +0800)
This patch add xts(aes) support.

Signed-off-by: Longpeng(Mike) <[email protected]>
Reviewed-by: Gonglei <[email protected]>
Signed-off-by: Gonglei <[email protected]>
backends/cryptodev-builtin.c

index 57980cbd128124c54f5d89a5dad68a49d8cb7c60..a4224f4b1ece6b14216cc6c266911ab495368399 100644 (file)
@@ -197,6 +197,14 @@ static int cryptodev_builtin_create_cipher_session(
             return -1;
         }
         break;
+    case VIRTIO_CRYPTO_CIPHER_AES_XTS:
+        mode = QCRYPTO_CIPHER_MODE_XTS;
+        algo = cryptodev_builtin_get_aes_algo(sess_info->key_len,
+                                                    mode, errp);
+        if (algo < 0)  {
+            return -1;
+        }
+        break;
     case VIRTIO_CRYPTO_CIPHER_DES_ECB:
         mode = QCRYPTO_CIPHER_MODE_ECB;
         algo = QCRYPTO_CIPHER_ALG_DES_RFB;
This page took 0.026608 seconds and 4 git commands to generate.