diff options
author | Longpeng(Mike) <longpeng2@huawei.com> | 2016-12-05 19:39:09 +0800 |
---|---|---|
committer | Gonglei <arei.gonglei@huawei.com> | 2016-12-24 13:46:27 +0800 |
commit | eaa57403044c33e0f3e9c6f7c174b05e6534fec4 (patch) | |
tree | 958cd8fe717d7482fd05ff43d78a1797772717b9 /backends | |
parent | 465f2fedd262cbdcbfc92c181660cf85e5029515 (diff) | |
download | qemu-eaa57403044c33e0f3e9c6f7c174b05e6534fec4.zip qemu-eaa57403044c33e0f3e9c6f7c174b05e6534fec4.tar.gz qemu-eaa57403044c33e0f3e9c6f7c174b05e6534fec4.tar.bz2 |
cryptodev: add xts(aes) support
This patch add xts(aes) support.
Signed-off-by: Longpeng(Mike) <longpeng2@huawei.com>
Reviewed-by: Gonglei <arei.gonglei@huawei.com>
Signed-off-by: Gonglei <arei.gonglei@huawei.com>
Diffstat (limited to 'backends')
-rw-r--r-- | backends/cryptodev-builtin.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/backends/cryptodev-builtin.c b/backends/cryptodev-builtin.c index 57980cb..a4224f4 100644 --- a/backends/cryptodev-builtin.c +++ b/backends/cryptodev-builtin.c @@ -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; |