On 06/16/2015 07:36 PM, Herbert Xu wrote:
> The existing crypto/asymmetric_key errno scheme doesn't really
> mesh in with the rest of crypto. So you'll just have to pick one
> scheme and stick with it.
>
> I don't really mind either way as long as the error codes are
> unique and meaningful.
So
On Tue, Jun 16, 2015 at 07:32:16PM -0700, Tadeusz Struk wrote:
>
> I thought that -EBADMSG was mainly used for authenticated ciphers in case
> when verification of auth data fails.
> Since this are input params I thought that -EINVAL would be more appropriate.
> I can change it to -EBADMSG, no
Hi David,
On 06/16/2015 03:10 PM, David Howells 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?
I thought
Tadeusz Struk 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
Add a new rsa generic SW implementation.
This implements only cryptographic primitives.
Signed-off-by: Tadeusz Struk
---
crypto/Kconfig|7 +
crypto/Makefile |8 +
crypto/rsa.c | 315 +
Add a new rsa generic SW implementation.
This implements only cryptographic primitives.
Signed-off-by: Tadeusz Struk tadeusz.st...@intel.com
---
crypto/Kconfig|7 +
crypto/Makefile |8 +
crypto/rsa.c | 315
Tadeusz Struk tadeusz.st...@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
Hi David,
On 06/16/2015 03:10 PM, David Howells 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?
I thought that -EBADMSG was
On Tue, Jun 16, 2015 at 07:32:16PM -0700, Tadeusz Struk wrote:
I thought that -EBADMSG was mainly used for authenticated ciphers in case
when verification of auth data fails.
Since this are input params I thought that -EINVAL would be more appropriate.
I can change it to -EBADMSG, no
On 06/16/2015 07:36 PM, Herbert Xu wrote:
The existing crypto/asymmetric_key errno scheme doesn't really
mesh in with the rest of crypto. So you'll just have to pick one
scheme and stick with it.
I don't really mind either way as long as the error codes are
unique and meaningful.
So I
10 matches
Mail list logo