From: David Howells <dhowells@redhat.com>
To: Tadeusz Struk <tadeusz.struk@intel.com>
Cc: dhowells@redhat.com, herbert@gondor.apana.org.au,
linux-kernel@vger.kernel.org, keescook@chromium.org,
jwboyer@redhat.com, smueller@chronox.de, richard@nod.at,
steved@redhat.com, qat-linux@intel.com,
linux-crypto@vger.kernel.org, james.l.morris@oracle.com,
jkosina@suse.cz, zohar@linux.vnet.ibm.com, davem@davemloft.net,
vgoyal@redhat.com
Subject: Re: [PATCH RFC v7 2/3] crypto: rsa: add a new rsa generic implementation
Date: Tue, 16 Jun 2015 23:10:57 +0100 [thread overview]
Message-ID: <18687.1434492657@warthog.procyon.org.uk> (raw)
In-Reply-To: <20150616173101.1248.55033.stgit@tstruk-mobl1>
Tadeusz Struk <tadeusz.struk@intel.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
next prev parent reply other threads:[~2015-06-16 22:10 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-06-16 17:30 [PATCH RFC v7 0/3] crypto: Introduce Public Key Encryption API Tadeusz Struk
2015-06-16 17:30 ` [PATCH RFC v7 1/3] crypto: add PKE API Tadeusz Struk
2015-06-16 17:31 ` [PATCH RFC v7 2/3] crypto: rsa: add a new rsa generic implementation Tadeusz Struk
2015-06-16 22:10 ` David Howells [this message]
2015-06-17 2:32 ` Tadeusz Struk
2015-06-17 2:36 ` Herbert Xu
2015-06-17 2:46 ` Tadeusz Struk
2015-06-16 17:31 ` [PATCH RFC v7 3/3] crypto: add tests vectors for RSA Tadeusz Struk
2015-06-17 9:14 ` [PATCH RFC v7 0/3] crypto: Introduce Public Key Encryption API Herbert Xu
2015-06-17 16:06 ` Tadeusz Struk
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=18687.1434492657@warthog.procyon.org.uk \
--to=dhowells@redhat.com \
--cc=davem@davemloft.net \
--cc=herbert@gondor.apana.org.au \
--cc=james.l.morris@oracle.com \
--cc=jkosina@suse.cz \
--cc=jwboyer@redhat.com \
--cc=keescook@chromium.org \
--cc=linux-crypto@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=qat-linux@intel.com \
--cc=richard@nod.at \
--cc=smueller@chronox.de \
--cc=steved@redhat.com \
--cc=tadeusz.struk@intel.com \
--cc=vgoyal@redhat.com \
--cc=zohar@linux.vnet.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).