All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Daniel P. Berrangé" <berrange@redhat.com>
To: luzhipeng <luzhipeng@cestc.cn>
Cc: qemu-devel <qemu-devel@nongnu.org>,
	"Philippe Mathieu-Daudé" <philmd@linaro.org>
Subject: Re: [PATCH] sm4:Adjust the naming of SM4 encryption method
Date: Tue, 30 Jul 2024 13:01:45 +0100	[thread overview]
Message-ID: <ZqjWKbiGcIM96DdO@redhat.com> (raw)
In-Reply-To: <20240730113850.30-1-luzhipeng@cestc.cn>

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	other threads:[~2024-07-30 12:27 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-07-30 11:38 [PATCH] sm4:Adjust the naming of SM4 encryption method luzhipeng
2024-07-30 12:01 ` Daniel P. Berrangé [this message]

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=ZqjWKbiGcIM96DdO@redhat.com \
    --to=berrange@redhat.com \
    --cc=luzhipeng@cestc.cn \
    --cc=philmd@linaro.org \
    --cc=qemu-devel@nongnu.org \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.