[PATCH V3] crypto/nx842: Add CRC and validation support

2015-10-08 Thread Haren Myneni
This patch adds CRC generation and validation support for nx-842. Add CRC flag so that nx842 coprocessor includes CRC during compression and validates during decompression. Also changes in 842 SW compression to append CRC value at the end of template and checks during decompression. Signed-off-b

[PATCH v2] crypto/jitterentropy-kcapi: remove unnecessary information from a comment

2015-10-08 Thread Alexander Kuleshov
The clocksource does not provide clocksource_register() function since f893598 commit (clocksource: Mostly kill clocksource_register()), so let's remove unnecessary information about this function from a comment. Signed-off-by: Alexander Kuleshov Suggested-by: Herbert Xu --- crypto/jitterentrop

[PATCH v6 2/2] crypto: akcipher - Changes to asymmetric key API

2015-10-08 Thread Tadeusz Struk
Setkey function has been split into set_priv_key and set_pub_key. Akcipher requests takes sgl for src and dst instead of void *. Users of the API i.e. two existing RSA implementation and test mgr code have been updated accordingly. Signed-off-by: Tadeusz Struk --- crypto/Makefile

[PATCH v6 1/2] lib/mpi: Add mpi sgl helpers

2015-10-08 Thread Tadeusz Struk
Add mpi_read_raw_from_sgl and mpi_write_to_sgl helpers. Signed-off-by: Tadeusz Struk --- include/linux/mpi.h |4 + lib/mpi/mpicoder.c | 196 +++ 2 files changed, 200 insertions(+) diff --git a/include/linux/mpi.h b/include/linux/mpi.h index

[PATCH v6 0/2] crypto: akcipher - Changes to asymmetric key API

2015-10-08 Thread Tadeusz Struk
This series updates the asymmetric key API. The changes include - setkey function has been split into set_priv_key and set_pub_key. - akcipher requests takes sgl for src and dst instead of void *. Users of the API i.e. two existing RSA implementation and test mgr code have been updated accordingl

Re: unaligned access in pkcs7_verify

2015-10-08 Thread Sowmini Varadhan
On (10/08/15 21:15), Herbert Xu wrote: > > desc_size = crypto_shash_descsize(tfm) + sizeof(*desc); > > - sinfo->sig.digest_size = digest_size = crypto_shash_digestsize(tfm); > > + sinfo->sig.digest_size = digest_size = > > + ALIGN(crypto_shash_digestsize(tfm), siz

Re: [PATCH v2 0/3] hwrng: st: Couple of improvements

2015-10-08 Thread Herbert Xu
On Wed, Oct 07, 2015 at 01:23:26PM +0100, Lee Jones wrote: > This set contains a minor documentation fix, greater clarification > with how the FIFO depth/size is represented and finally a fix to > prevent early timeout during data acquisition. > > v1 => v2: > - Remove phantom bugfix (FIFO really

Re: [PATCH] crypto: atmel: Check for clk_prepare_enable() return value

2015-10-08 Thread Herbert Xu
On Fri, Oct 02, 2015 at 02:12:58PM +0200, LABBE Corentin wrote: > clk_prepare_enable() can fail so add a check for this and > return the error code if it fails. > > Signed-off-by: LABBE Corentin Patch applied. Thanks. -- Email: Herbert Xu Home Page: http://gondor.apana.org.au/~herbert/ PGP Ke

Re: [PATCH] crypto: qce: dma_map_sg can handle chained SG

2015-10-08 Thread Herbert Xu
On Fri, Oct 02, 2015 at 08:01:02AM +0200, LABBE Corentin wrote: > The qce driver use two dma_map_sg path according to SG are chained > or not. > Since dma_map_sg can handle both case, clean the code with all > references to sg chained. > > Thus removing qce_mapsg, qce_unmapsg and qce_countsg funct

Re: [PATCH v1 0/4] crypto: ccp - CCP driver updates 2015-10-01

2015-10-08 Thread Herbert Xu
On Thu, Oct 01, 2015 at 04:32:25PM -0500, Tom Lendacky wrote: > The following patches are included in this driver update series: > > - Remove the usage of BUG_ON and replace with WARN_ON and an error > return code > - Remove unused variable > - Change references to accelerator to offload > - Use

Re: [PATCH v5 1/2] lib/mpi: Add mpi sgl helpers

2015-10-08 Thread Herbert Xu
On Thu, Oct 08, 2015 at 06:31:52AM -0700, Tadeusz Struk wrote: > > The sgl has to be big enough to take the whole integer. > What would be the point to export only part of a number? You're not getting it. Just because the SGL is X bytes long it doesn't give you the right to write X bytes. The nu

Re: [PATCH v5 1/2] lib/mpi: Add mpi sgl helpers

2015-10-08 Thread Tadeusz Struk
On 10/08/2015 06:02 AM, Herbert Xu wrote: > On Thu, Oct 01, 2015 at 10:10:38PM -0700, Tadeusz Struk wrote: >> >> +/** >> + * mpi_write_to_sgl() - Funnction exports MPI to an sgl (msb first) >> + * >> + * This function works in the same way as the mpi_read_buffer, but it >> + * takes an sgl instead

Re: [PATCH V2] crypto/nx842: Add CRC and validation support

2015-10-08 Thread Herbert Xu
On Sat, Oct 03, 2015 at 09:35:31PM -0700, Haren Myneni wrote: > > diff --git a/lib/842/842_decompress.c b/lib/842/842_decompress.c > index 5446ff0..b0db568 100644 > --- a/lib/842/842_decompress.c > +++ b/lib/842/842_decompress.c > @@ -285,6 +285,7 @@ int sw842_decompress(const u8 *in, unsigned int

Re: [PATCH] crypto/jitterentropy-kcapi: fix a comment reflecting function name changed

2015-10-08 Thread Herbert Xu
On Wed, Oct 07, 2015 at 11:38:14PM +0600, Alexander Kuleshov wrote: > The clocksource does not provide clocksource_register() function since > f893598 commit (clocksource: Mostly kill clocksource_register()), but > __clocksource_register() instead. > > Signed-off-by: Alexander Kuleshov > --- > c

Re: unaligned access in pkcs7_verify

2015-10-08 Thread Herbert Xu
On Fri, Oct 02, 2015 at 02:00:14PM +, Sowmini Varadhan wrote: > > I'm getting a lot of unaligned access messages each time I > do "modprobe [-r] " on sparc: > > Kernel unaligned access at TPC[6ad9b4] pkcs7_verify+0x1ec/0x5e0 > Kernel unaligned access at TPC[6a5484] crypto_shash_finup+0xc/0x5

Re: [PATCH v5 2/2] crypto: akcipher - Changes to asymmetric key API

2015-10-08 Thread Herbert Xu
On Thu, Oct 01, 2015 at 10:10:43PM -0700, Tadeusz Struk wrote: > > /** > + * crypto_akcipher_get_len() -- Get minimum len for output buffer > + * > + * Function returns minimum dest buffer size for a given key > + * > + * @tfm: AKCIPHER tfm handle allocated with crypto_alloc_akcipher() > + * >

Re: [PATCH v5 2/2] crypto: akcipher - Changes to asymmetric key API

2015-10-08 Thread Herbert Xu
On Thu, Oct 01, 2015 at 10:10:43PM -0700, Tadeusz Struk wrote: > > diff --git a/include/crypto/akcipher.h b/include/crypto/akcipher.h > index 69d163e..c55526c 100644 > --- a/include/crypto/akcipher.h > +++ b/include/crypto/akcipher.h > @@ -13,26 +13,27 @@ > #ifndef _CRYPTO_AKCIPHER_H > #define _C

Re: [PATCH v5 1/2] lib/mpi: Add mpi sgl helpers

2015-10-08 Thread Herbert Xu
On Thu, Oct 01, 2015 at 10:10:38PM -0700, Tadeusz Struk wrote: > > +/** > + * mpi_write_to_sgl() - Funnction exports MPI to an sgl (msb first) > + * > + * This function works in the same way as the mpi_read_buffer, but it > + * takes an sgl instead of u8 * buf. > + * > + * @a: a multi