[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <18687.1434492657@warthog.procyon.org.uk>
Date: Tue, 16 Jun 2015 23:10:57 +0100
From: David Howells <dhowells@...hat.com>
To: Tadeusz Struk <tadeusz.struk@...el.com>
Cc: dhowells@...hat.com, herbert@...dor.apana.org.au,
linux-kernel@...r.kernel.org, keescook@...omium.org,
jwboyer@...hat.com, smueller@...onox.de, richard@....at,
steved@...hat.com, qat-linux@...el.com,
linux-crypto@...r.kernel.org, james.l.morris@...cle.com,
jkosina@...e.cz, zohar@...ux.vnet.ibm.com, davem@...emloft.net,
vgoyal@...hat.com
Subject: Re: [PATCH RFC v7 2/3] crypto: rsa: add a new rsa generic implementation
Tadeusz Struk <tadeusz.struk@...el.com> wrote:
> +static int _rsa_sign(const struct rsa_key *key, MPI s, MPI m)
> +{
> + /* (1) Validate 0 <= m < n */
> + if (mpi_cmp_ui(m, 0) < 0 || mpi_cmp(m, key->n) >= 0)
> + return -EINVAL;
Why -EINVAL not -EBADMSG?
David
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists