From: Eric Blake <eblake@redhat.com>
To: "Longpeng(Mike)" <longpeng2@huawei.com>,
berrange@redhat.com, armbru@redhat.com
Cc: wu.wubin@huawei.com, jianjay.zhou@huawei.com,
arei.gonglei@huawei.com, qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] [PATCH for-2.9 v2] crypto: add 3des-ede support when using libgcrypt/nettle
Date: Thu, 8 Dec 2016 09:45:13 -0600 [thread overview]
Message-ID: <e88d4b8b-651d-4821-517a-a8201750bafb@redhat.com> (raw)
In-Reply-To: <1481164408-194252-1-git-send-email-longpeng2@huawei.com>
[-- Attachment #1: Type: text/plain, Size: 1498 bytes --]
On 12/07/2016 08:33 PM, Longpeng(Mike) wrote:
> Libgcrypt and nettle support 3des-ede, so this patch add 3des-ede
> support when using libgcrypt or nettle.
>
> Signed-off-by: Longpeng(Mike) <longpeng2@huawei.com>
> ---
> +++ b/qapi/crypto.json
> @@ -63,6 +63,7 @@
> # @aes-192: AES with 192 bit / 24 byte keys
> # @aes-256: AES with 256 bit / 32 byte keys
> # @des-rfb: RFB specific variant of single DES. Do not use except in VNC.
> +# @3des: 3DES(EDE) with 192 bit / 24 byte keys (since 2.9)
> # @cast5-128: Cast5 with 128 bit / 16 byte keys
> # @serpent-128: Serpent with 128 bit / 16 byte keys
> # @serpent-192: Serpent with 192 bit / 24 byte keys
> @@ -75,7 +76,7 @@
> { 'enum': 'QCryptoCipherAlgorithm',
> 'prefix': 'QCRYPTO_CIPHER_ALG',
> 'data': ['aes-128', 'aes-192', 'aes-256',
> - 'des-rfb',
> + 'des-rfb', '3des',
Not your fault that this is yet another enum name that is not a valid C
identifier. QAPI at least handles it when referring to the enum constant
(since we already have other such enums, in describing key codes), but
it might make it awkward if we later want to use the enum type as a
discriminator of a flat union (where I'm not sure that QAPI will still
do the right thing). Is there some name we can pick that starts with a
letter, to reduce the worry? But if not, I can live with '3des'.
--
Eric Blake eblake redhat com +1-919-301-3266
Libvirt virtualization library http://libvirt.org
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 604 bytes --]
next prev parent reply other threads:[~2016-12-08 15:45 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-12-08 2:33 [Qemu-devel] [PATCH for-2.9 v2] crypto: add 3des-ede support when using libgcrypt/nettle Longpeng(Mike)
2016-12-08 2:43 ` Gonglei (Arei)
2016-12-08 9:33 ` Daniel P. Berrange
2016-12-08 10:07 ` Longpeng (Mike)
2016-12-08 15:45 ` Eric Blake [this message]
2016-12-08 15:52 ` Daniel P. Berrange
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=e88d4b8b-651d-4821-517a-a8201750bafb@redhat.com \
--to=eblake@redhat.com \
--cc=arei.gonglei@huawei.com \
--cc=armbru@redhat.com \
--cc=berrange@redhat.com \
--cc=jianjay.zhou@huawei.com \
--cc=longpeng2@huawei.com \
--cc=qemu-devel@nongnu.org \
--cc=wu.wubin@huawei.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).