From: Stefan Berger <stefanb@linux.ibm.com>
To: Jarkko Sakkinen <jarkko@kernel.org>,
Herbert Xu <herbert@gondor.apana.org.au>
Cc: linux-crypto@vger.kernel.org,
"David S. Miller" <davem@davemloft.net>,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH] crypto: ecdsa: Fix the public key format description
Date: Tue, 28 May 2024 07:18:59 -0400 [thread overview]
Message-ID: <0e3bfc37-53d6-422d-adb0-3ee23bbb0a8a@linux.ibm.com> (raw)
In-Reply-To: <20240527202840.4818-1-jarkko@kernel.org>
On 5/27/24 16:28, Jarkko Sakkinen wrote:
> Public key blob is not just x and y concatenated. It follows RFC5480
> section 2.2. Address this by re-documenting the function with the
> correct description of the format.
>
> Link: https://datatracker.ietf.org/doc/html/rfc5480
> Fixes: 4e6602916bc6 ("crypto: ecdsa - Add support for ECDSA signature verification")
> Signed-off-by: Jarkko Sakkinen <jarkko@kernel.org>
Reviewed-by: Stefan Berger <stefanb@linux.ibm.com>
> ---
> It is a bug fix that does not really need a stable backport. Still
> categorizes as a bug because by following the existing documentation
> you end up with an error code.
> crypto/ecdsa.c | 5 ++---
> 1 file changed, 2 insertions(+), 3 deletions(-)
>
> diff --git a/crypto/ecdsa.c b/crypto/ecdsa.c
> index 258fffbf623d..55114146ff84 100644
> --- a/crypto/ecdsa.c
> +++ b/crypto/ecdsa.c
> @@ -215,9 +215,8 @@ static int ecdsa_ecc_ctx_reset(struct ecc_ctx *ctx)
> }
>
> /*
> - * Set the public key given the raw uncompressed key data from an X509
> - * certificate. The key data contain the concatenated X and Y coordinates of
> - * the public key.
> + * Set the public ECC key as defined by RFC5480 section 2.2 "Subject Public
> + * Key". Only the uncompressed format is supported.
> */
> static int ecdsa_set_pub_key(struct crypto_akcipher *tfm, const void *key, unsigned int keylen)
> {
next prev parent reply other threads:[~2024-05-28 11:20 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-05-27 20:28 Jarkko Sakkinen
2024-05-27 21:05 ` Jarkko Sakkinen
2024-05-27 21:58 ` Jarkko Sakkinen
2024-05-27 22:18 ` Jarkko Sakkinen
2024-05-27 22:31 ` Jarkko Sakkinen
2024-05-27 22:49 ` Jarkko Sakkinen
2024-05-27 22:59 ` Jarkko Sakkinen
2024-05-28 12:37 ` Stefan Berger
2024-05-28 13:18 ` Jarkko Sakkinen
2024-05-28 13:26 ` Jarkko Sakkinen
2024-05-28 13:29 ` Jarkko Sakkinen
2024-05-28 11:18 ` Stefan Berger [this message]
2024-05-28 11:43 ` Jarkko Sakkinen
2024-06-07 11:53 ` Herbert Xu
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=0e3bfc37-53d6-422d-adb0-3ee23bbb0a8a@linux.ibm.com \
--to=stefanb@linux.ibm.com \
--cc=davem@davemloft.net \
--cc=herbert@gondor.apana.org.au \
--cc=jarkko@kernel.org \
--cc=linux-crypto@vger.kernel.org \
--cc=linux-kernel@vger.kernel.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®