qemu-devel
[Top][All Lists]
Advanced

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

Re: [PATCH] sm4:Adjust the naming of SM4 encryption method


From: Daniel P . Berrangé
Subject: Re: [PATCH] sm4:Adjust the naming of SM4 encryption method
Date: Tue, 30 Jul 2024 13:01:45 +0100
User-agent: Mutt/2.2.12 (2023-09-09)

On Tue, Jul 30, 2024 at 07:38:50PM +0800, luzhipeng wrote:
> With reference to the naming conventions of other encryption algorithms,
> the name of SM4 is modified.So libvirt and qemu are compatible.
> 
> Signed-off-by: luzhipeng <luzhipeng@cestc.cn>
> ---
>  crypto/block-luks.c             | 2 +-
>  crypto/cipher-gcrypt.c.inc      | 4 ++--
>  crypto/cipher-nettle.c.inc      | 4 ++--
>  crypto/cipher.c                 | 4 ++--
>  qapi/crypto.json                | 4 ++--
>  tests/unit/test-crypto-cipher.c | 4 ++--
>  6 files changed, 11 insertions(+), 11 deletions(-)
> 
> diff --git a/qapi/crypto.json b/qapi/crypto.json
> index e102be337b..1a28e312d8 100644
> --- a/qapi/crypto.json
> +++ b/qapi/crypto.json
> @@ -94,7 +94,7 @@
>  #
>  # @twofish-256: Twofish with 256 bit / 32 byte keys
>  #
> -# @sm4: SM4 with 128 bit / 16 byte keys (since 9.0)
> +# @sm4-128: SM4 with 128 bit / 16 byte keys (since 9.0)
>  #
>  # Since: 2.6
>  ##
> @@ -105,7 +105,7 @@
>             'cast5-128',
>             'serpent-128', 'serpent-192', 'serpent-256',
>             'twofish-128', 'twofish-192', 'twofish-256',
> -           'sm4']}
> +           'sm4-128']}

This rename isn't permitted, as 'sm4' was already exposed as public API
in the 9.0 release and thus this would break backwards compatibility.

I agree it would have been nice to call it 'sm4-128' and I dropped the
ball by not suggesting a rename when this was first proposed. At this
point though, I don't think  we need to go through the many release
dance of deprecating the old name & introducing a new name & finally
removing the old name, since IIUC, SM4 is always 128 bits in size.


With regards,
Daniel
-- 
|: https://berrange.com      -o-    https://www.flickr.com/photos/dberrange :|
|: https://libvirt.org         -o-            https://fstop138.berrange.com :|
|: https://entangle-photo.org    -o-    https://www.instagram.com/dberrange :|




reply via email to

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