Re: [PATCH] [RESEND] crypto: qat - don't use userspace pointer

2015-11-13 Thread Herbert Xu
On Wed, Oct 21, 2015 at 02:57:09PM -0700, Tadeusz Struk wrote: > Bugfix - don't dereference userspace pointer. > > Resend with the correct way for inclusion in the stable kernel. Applied to crypto. -- Email: Herbert Xu Home Page:

[PATCH 3/4] crypto: akcipher: add crypto_akcipher_type methods needed by templates.

2015-11-13 Thread Andrew Zaborowski
Add two dummy methods that are required by the crypto API internals: .ctxsize and .init (just because the framework calls them without checking if they were provided). They're only required by the complicated code path needed to instantiate a template algorithm. Also expose crypto_akcipher_type

[PATCH 2/4] crypto: rsa: only require output buffers as big as needed.

2015-11-13 Thread Andrew Zaborowski
rhe RSA operations explicitly left-align the integers being written skipping any leading zero bytes, but still require the output buffers to include just enough space for the integer + the leading zero bytes. Since the size of integer + the leading zero bytes (i.e. the key modulus size) can now be

[PATCH 4/4] crypto: RSA padding algorithm

2015-11-13 Thread Andrew Zaborowski
This patch adds PKCS#1 v1.5 standard RSA padding as a separate template. This way an RSA cipher with padding can be obtained by instantiating "pkcs1pad(rsa)". The reason for adding this is that RSA is almost never used without this padding (or OAEP) so it will be needed for either certificate

[PATCH 1/4] lib/mpi: only require buffers as big as needed for the integer

2015-11-13 Thread Andrew Zaborowski
Since mpi_write_to_sgl and mpi_read_buffer explicitly left-align the integers being written it makes no sense to require a buffer big enough for the number + the leading zero bytes which are not written. The error returned also doesn't convey any information. So instead require only the size

Re: [PATCH 4/4] crypto: RSA padding algorithm

2015-11-13 Thread Andrzej Zaborowski
Hi Stephan, On 11 November 2015 at 14:19, Stephan Mueller wrote: > Am Mittwoch, 11. November 2015, 01:58:45 schrieb Andrew Zaborowski: > > Hi Andrew, > >>This patch adds PKCS#1 v1.5 standard RSA padding as a separate template. >>This way an RSA cipher with padding can be

Re: [PATCH 1/4] lib/mpi: only require buffers as big as needed for the integer

2015-11-13 Thread Andrzej Zaborowski
Hi Stephan, On 13 November 2015 at 13:47, Stephan Mueller wrote: > Sorry to be picky here, but is this v2? If yes, may I ask (at least for the > future) for brief notation of the changes as well as a marking of the patches. There are no changes in patches 1-3, I wasn't sure

Re: [PATCH 1/4] lib/mpi: only require buffers as big as needed for the integer

2015-11-13 Thread Stephan Mueller
Am Freitag, 13. November 2015, 12:01:32 schrieb Andrew Zaborowski: Hi Andrew, >Since mpi_write_to_sgl and mpi_read_buffer explicitly left-align the >integers being written it makes no sense to require a buffer big enough for >the number + the leading zero bytes which are not written. The error

[PATCH] crypto: sun4i-ss: add missing statesize

2015-11-13 Thread LABBE Corentin
sun4i-ss implementaton of md5/sha1 is via ahash algorithms. Commit 8996eafdcbad ("crypto: ahash - ensure statesize is non-zero") made impossible to load them without giving statesize. This patch specifiy statesize for sha1 and md5. Fixes: 6298e948215f ("crypto: sunxi-ss - Add Allwinner Security