lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <3067069.1763761171@warthog.procyon.org.uk>
Date: Fri, 21 Nov 2025 21:39:31 +0000
From: David Howells <dhowells@...hat.com>
To: Eric Biggers <ebiggers@...nel.org>
Cc: dhowells@...hat.com, linux-crypto@...r.kernel.org,
    Herbert Xu <herbert@...dor.apana.org.au>,
    Luis Chamberlain <mcgrof@...nel.org>,
    Petr Pavlu <petr.pavlu@...e.com>, Daniel Gomez <da.gomez@...nel.org>,
    Sami Tolvanen <samitolvanen@...gle.com>,
    "Jason A . Donenfeld" <Jason@...c4.com>,
    Ard Biesheuvel <ardb@...nel.org>,
    Stephan Mueller <smueller@...onox.de>,
    Lukas Wunner <lukas@...ner.de>,
    Ignat Korchagin <ignat@...udflare.com>, keyrings@...r.kernel.org,
    linux-modules@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH 1/4] lib/crypto: Add ML-DSA verification support

Eric Biggers <ebiggers@...nel.org> wrote:

> > > +	if (memcmp(ws->ctildeprime, ctilde, params->ctilde_len) != 0)
> > > +		return -EBADMSG;
> > 
> > Actually, this should return -EKEYREJECTED, not -EBADMSG.
> 
> Who/what decided that?

I did.  When I added RSA support in 2012 for module signing.  Note that it
was originally added as part of crypto/asymmetric_keys/ and was not covered by
a crypto API.  The RSA code has since been moved to crypto/ and is now
accessed through the crypto API, but it has retained this error code and this
is also used by other public key algos.

> A lot of the crypto code uses -EBADMSG already.
> crypto_aead uses it, for example.

ecdsa.c:60:	return -EKEYREJECTED;
ecrdsa.c:111:		return -EKEYREJECTED;
ecrdsa.c:139:		return -EKEYREJECTED;
ecrdsa.c:239:		return -EKEYREJECTED;
rsassa-pkcs1.c:293:		return -EKEYREJECTED;
rsassa-pkcs1.c:295:		return -EKEYREJECTED;

David


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ