summaryrefslogtreecommitdiffstats
path: root/crypto
diff options
context:
space:
mode:
authorJarkko Sakkinen <jarkko@kernel.org>2024-05-27 23:28:39 +0300
committerHerbert Xu <herbert@gondor.apana.org.au>2024-06-07 19:46:38 +0800
commitd7c897a9d8c35d6788b6d92072f5c93be89d4451 (patch)
treeaab92768f2c118696e080924f40ba12328dc86e9 /crypto
parent14cba6ace79627a57fb9058582b03f0ed3832390 (diff)
downloadlinux-d7c897a9d8c35d6788b6d92072f5c93be89d4451.tar.gz
linux-d7c897a9d8c35d6788b6d92072f5c93be89d4451.tar.bz2
linux-d7c897a9d8c35d6788b6d92072f5c93be89d4451.zip
crypto: ecdsa - Fix the public key format description
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> Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Diffstat (limited to 'crypto')
-rw-r--r--crypto/ecdsa.c5
1 files 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)
{