linux-crypto.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Jarkko Sakkinen" <jarkko@kernel.org>
To: <linux-crypto@vger.kernel.org>, "Stefan Berger" <stefanb@linux.ibm.com>
Cc: "Herbert Xu" <herbert@gondor.apana.org.au>,
	"David Howells" <dhowells@redhat.com>, <keyrings@vger.kernel.org>
Subject: ecdsa_set_pub_key
Date: Mon, 27 May 2024 20:25:26 +0300	[thread overview]
Message-ID: <D1KLP7ML9T1B.1LHPTTWEANRJ3@kernel.org> (raw)

Hi,

The documentation of ecdsa_set_pub_key() is the following:

/*
 * 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.
 */

If you interpret this literally it would mean 64 bytes buffer for p256
with two 32 byte blobs for x and y.

With such buffer the function fails with -EINVAL, which is obvious from
the code that does checks on the contents.

Instead of responding to this, can you please fix the documentation bug?

There was also badly documented stuff in akcipher that has been
unreacted so far so putting also that one here:

https://lore.kernel.org/keyrings/D1HCVOZ1IN7S.1SUZ75QRE8QUZ@kernel.org/

BR, Jarkko

             reply	other threads:[~2024-05-27 17:25 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-05-27 17:25 Jarkko Sakkinen [this message]
2024-05-27 17:34 ` ecdsa_set_pub_key Jarkko Sakkinen

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=D1KLP7ML9T1B.1LHPTTWEANRJ3@kernel.org \
    --to=jarkko@kernel.org \
    --cc=dhowells@redhat.com \
    --cc=herbert@gondor.apana.org.au \
    --cc=keyrings@vger.kernel.org \
    --cc=linux-crypto@vger.kernel.org \
    --cc=stefanb@linux.ibm.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).