Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1166444

Re: [PATCH RFC v7 2/3] crypto: rsa: add a new rsa generic implementation

From David Howells <dhowells@redhat.com>
Newsgroups linux.kernel
Subject Re: [PATCH RFC v7 2/3] crypto: rsa: add a new rsa generic implementation
Date 2015-06-17 00:20 +0200
Message-ID <pC7n3-7jm-3@gated-at.bofh.it> (permalink)
References <pC306-Sa-3@gated-at.bofh.it> <pC306-Sa-5@gated-at.bofh.it> <pC306-Sa-3@gated-at.bofh.it>
Organization Red Hat UK Ltd. Registered Address: Red Hat UK Ltd, Amberley Place, 107-111 Peascod Street, Windsor, Berkshire, SI4 1TE, United Kingdom. Registered in England and Wales under Company Registration No. 3798903

Show all headers | View raw


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
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Back to linux.kernel | Previous | NextPrevious in thread | Find similar | Unroll thread


Thread

[PATCH RFC v7 2/3] crypto: rsa: add a new rsa generic implementation Tadeusz Struk <tadeusz.struk@intel.com> - 2015-06-16 19:40 +0200
  Re: [PATCH RFC v7 2/3] crypto: rsa: add a new rsa generic implementation David Howells <dhowells@redhat.com> - 2015-06-17 00:20 +0200

csiph-web