qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH for-2.9 v2] crypto: add 3des-ede support when us


From: Daniel P. Berrange
Subject: Re: [Qemu-devel] [PATCH for-2.9 v2] crypto: add 3des-ede support when using libgcrypt/nettle
Date: Thu, 8 Dec 2016 15:52:19 +0000
User-agent: Mutt/1.7.1 (2016-10-04)

On Thu, Dec 08, 2016 at 09:45:13AM -0600, Eric Blake wrote:
> 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) <address@hidden>
> > ---
> 
> > +++ 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'.

I can make it 'des3' easily enough if you'd prefer :-)

Regards,
Daniel
-- 
|: 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/ :|



reply via email to

[Prev in Thread] Current Thread [Next in Thread]