Re: [PATCH v2 3/3] crypto: qat - Add support for RSA algorithm

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, Jul 15, 2015 at 08:05:35AM -0700, Tadeusz Struk wrote:
>
> This is even more complicated because the user can first allocate request
> and then call setkey causing fallback. I'm now thinking about adding the
> limitation to rsa generic or I can still use rsa-generic which I know that
> its ctx is smaller than mine. What do you think?

This would preclude any future assembly implementations from being
used.  Besides this is how we implement fallbacks everywhere else
in the crypto API so I don't see why this one should be different.

> > 
> >> > +	ret = mpi_read_buffer(pkey->n, ctx->n, ctx->key_sz, &len, NULL);
> >> > +	if (ret)
> >> > +		goto free_d;
> > Huh? Why are you converting in and out of MPI? If the hardware wants
> > raw integers, then you should just give the raw numbers to it.
> 
> The rsa_parse_key helper in the rsa generic that parses the key in BER format
> produces the MPIs.I didn't want to add yet another BER parser here. Should I?

I don't see why not.  Certainly beats having to go in and out of
MPIs.

Cheers,
-- 
Email: Herbert Xu <herbert@xxxxxxxxxxxxxxxxxxx>
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt
--
To unsubscribe from this list: send the line "unsubscribe linux-crypto" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Kernel]     [Gnu Classpath]     [Gnu Crypto]     [DM Crypt]     [Netfilter]     [Bugtraq]

  Powered by Linux