[PATCH 1/1] crypto: tcrypt: fix keysize argument of test_aead_speed for gcm(aes)

2015-11-17 Thread Cyrille Pitchen
The key sizes used by AES in GCM mode should be 128, 192 or 256 bits (16, 24 or 32 bytes). There is no additional 4byte nonce as for RFC 4106. Signed-off-by: Cyrille Pitchen --- crypto/tcrypt.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git

Re: [PATCH] hw_random: omap3-rom-rng: convert timer to delayed work

2015-11-17 Thread Herbert Xu
On Fri, Nov 06, 2015 at 12:15:24AM +0200, Aaro Koskinen wrote: > We cannot put the HW RNG to idle using a timer because we cannot disable > clocks from atomic context. Use a delayed work instead. > > Fixes a warning with CONFIG_DEBUG_MUTEXES on Nokia N900 during boot. > > Reported-by: Sebastian

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

2015-11-17 Thread Herbert Xu
Andrew Zaborowski wrote: > 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 >

Re: [PATCH 3/4] crypto-ixp4xx: Reduce assignment for a variable in init_ixp_crypto()

2015-11-17 Thread Herbert Xu
On Sun, Nov 15, 2015 at 07:52:22PM +0100, SF Markus Elfring wrote: > From: Markus Elfring > Date: Sun, 15 Nov 2015 19:06:44 +0100 > > The variable "ret" was set more often than necessary by the > init_ixp_crypto() function. > > * Omit its initialisation at the

Re: [PATCH 2/4] crypto-ixp4xx: Two function calls less in init_ixp_crypto() after error detection

2015-11-17 Thread Herbert Xu
On Sun, Nov 15, 2015 at 07:50:51PM +0100, SF Markus Elfring wrote: > From: Markus Elfring > Date: Sun, 15 Nov 2015 18:28:39 +0100 > > The dma_pool_destroy() function was called twice with a null pointer > if a "npe_error" was reported. > > This implementation

Re: [PATCH] crypto: atmel: fix 64-bit warnings

2015-11-17 Thread Cyrille Pitchen
Hi Arnd, I add my Acked-by to your patch. By the way, I'm currently reworking this whole driver. So I take your modifications into account for the new version as many parts of the source code such as the part dealing with DMA transfers have changed a lot. The new version fixes the 16 or 32bit

[PATCH 0/2] TPM 2.0 trusted key features for v4.5

2015-11-17 Thread Jarkko Sakkinen
These are the remaining features to enable trusted keys for TPM 2.0 that very not finished by the v4.4 merge window. These patches enable authorization policy based sealing (like using PCRs together with a password for example or something more complicated) with a user selected hash algorithm.

[PATCH 1/2] keys, trusted: select hash algorithm for TPM2 chips

2015-11-17 Thread Jarkko Sakkinen
Added 'hash=' option for selecting the hash algorithm for add_key() syscall and documentation for it. Added entry for sm3-256 to the following tables in order to support TPM_ALG_SM3_256: * hash_algo_name * hash_digest_size Includes support for the following hash algorithms: * sha1 * sha256 *

[PATCH v2 1/3] crypto-ixp4xx: Delete unnecessary checks before the function call "dma_pool_destroy"

2015-11-17 Thread SF Markus Elfring
From: Markus Elfring Date: Sun, 15 Nov 2015 16:51:21 +0100 The dma_pool_destroy() function tests whether its argument is NULL and then returns immediately. Thus the test around the calls is not needed. This issue was detected by using the Coccinelle software.

[PATCH v2 2/3] crypto-ixp4xx: Reduce assignment for a variable in init_ixp_crypto()

2015-11-17 Thread SF Markus Elfring
From: Markus Elfring Date: Tue, 17 Nov 2015 15:45:32 +0100 The variable "ret" was set more often than necessary by the init_ixp_crypto() function. * Omit its initialisation at the beginning. * Use an error return code in two cases directly. * Improve compliance

[PATCH v2 3/3] crypto-ixp4xx: Less function calls in init_ixp_crypto() after error detection

2015-11-17 Thread SF Markus Elfring
From: Markus Elfring Date: Tue, 17 Nov 2015 16:15:21 +0100 The dma_pool_destroy() function was called in up to two cases by the init_ixp_crypto() function during error handling even if a call of the dma_pool_create() function failed. This implementation detail

[PATCH v2 0/3] crypto-ixp4xx: Deletion of a few unnecessary checks

2015-11-17 Thread SF Markus Elfring
From: Markus Elfring Date: Tue, 17 Nov 2015 16:26:01 +0100 Subject: [PATCH 0/3] crypto-ixp4xx: Deletion of a few unnecessary checks Further update suggestions were taken into account after a patch was applied from static source code analysis. Markus Elfring (3):

Re: [PATCH] crypto: qat - remove superfluous check from adf_probe

2015-11-17 Thread Herbert Xu
On Thu, Oct 22, 2015 at 03:23:12PM +0100, Salvatore Benedetto wrote: > - ent->device is already checked at the beginning of the function >against the same value. This check is a duplicate. > > Signed-off-by: Salvatore Benedetto Patch applied. Thanks. --

Re: [PATCH 1/7] crypto: marvell: check return value of sg_nents_for_len

2015-11-17 Thread Herbert Xu
On Wed, Nov 04, 2015 at 09:13:33PM +0100, LABBE Corentin wrote: > The sg_nents_for_len() function could fail, this patch add a check for > its return value. > > Signed-off-by: LABBE Corentin All applied. Thanks. -- Email: Herbert Xu

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

2015-11-17 Thread Herbert Xu
On Fri, Nov 13, 2015 at 02:10:28PM +0100, LABBE Corentin wrote: > 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

Re: [PATCH 7/9] crypto: constify pci_error_handlers structures

2015-11-17 Thread Herbert Xu
On Sat, Nov 14, 2015 at 11:06:59AM +0100, Julia Lawall wrote: > This pci_error_handlers structure is never modified, like all the other > pci_error_handlers structures, so declare it as const. > > Done with the help of Coccinelle. > > Signed-off-by: Julia Lawall Patch

Re: [PATCH 2/4] crypto: hifn_795x: remove the hifn_test function

2015-11-17 Thread Herbert Xu
On Thu, Oct 22, 2015 at 08:51:50AM +0200, LABBE Corentin wrote: > The hifn_test function is redundant with test done at register time by > the crypto API, so remove it. > > Signed-off-by: LABBE Corentin Patches 2-4 applied. Thanks. -- Email: Herbert Xu

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

2015-11-17 Thread LABBE Corentin
On Tue, Nov 17, 2015 at 10:09:38PM +0800, Herbert Xu wrote: > On Fri, Nov 13, 2015 at 02:10:28PM +0100, LABBE Corentin wrote: > > sun4i-ss implementaton of md5/sha1 is via ahash algorithms. > > Commit 8996eafdcbad ("crypto: ahash - ensure statesize is non-zero") > > made impossible to load them

Re: [PATCH] crypto: qat - when stopping all devices make fure VF are stopped first

2015-11-17 Thread Herbert Xu
On Tue, Oct 20, 2015 at 12:50:03PM -0700, Tadeusz Struk wrote: > When stopping all devices make sure VFs are stopped before the > corresponding PF. > VFs will always be after PF so just need to loop back. > > Signed-off-by: Tadeusz Struk Patch applied. Thanks. --

Re: [PATCH 11/11] crypto: algif: Change some variable to size_t

2015-11-17 Thread Herbert Xu
On Fri, Oct 23, 2015 at 02:10:36PM +0200, LABBE Corentin wrote: > Some variable are set as int but store only positive values. > Furthermore there are used in operation/function that wait for unsigned > value. > This patch set them as size_t. > > Signed-off-by: LABBE Corentin

Re: [PATCH] nx-842: Ignore bit 3 of condition register returned by icswx

2015-11-17 Thread Herbert Xu
On Fri, Oct 30, 2015 at 03:43:01PM -0700, Ram Pai wrote: > icswx occasionally under heavy load sets bit 3 of condition register 0. > It has no software implication. > > Currently that bit is interpreted by the driver as a failure, when > it should have calmly ignored it. > > Signed-off-by: Ram

Re: [PATCH] crypto: qat - fix get instance function

2015-11-17 Thread Herbert Xu
On Thu, Oct 22, 2015 at 06:30:36AM -0700, Tadeusz Struk wrote: > Fix the logic in case we have found a device on a given node. > > Signed-off-by: Tadeusz Struk Patch applied. Thanks. -- Email: Herbert Xu Home Page:

Re: [PATCH 1/4] crypto-ixp4xx: Delete unnecessary checks before the function call "dma_pool_destroy"

2015-11-17 Thread Herbert Xu
On Sun, Nov 15, 2015 at 07:49:16PM +0100, SF Markus Elfring wrote: > From: Markus Elfring > Date: Sun, 15 Nov 2015 16:51:21 +0100 > > The dma_pool_destroy() function tests whether its argument is NULL > and then returns immediately. Thus the test around the calls

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

2015-11-17 Thread Herbert Xu
On Tue, Nov 17, 2015 at 03:26:03PM +0100, LABBE Corentin wrote: > > I have lots of user reporting that they cannot use the device since it wont > load. > For me it need to go stable since it respect all "stable rules", simple, > tested, minimal, and fix a real bug that bother people. Well it

Re: [PATCH v2 1/5] crypto: Multi-buffer encryptioin infrastructure support

2015-11-17 Thread Herbert Xu
On Thu, Oct 29, 2015 at 03:21:03PM -0700, Tim Chen wrote: > > c) Add support to crypto scatterwalk support that can sleep during > encryption operation, as we may have buffers for jobs in data lanes > that are half-finished, waiting for additional jobs to come to fill > empty lanes before we

Re: [PATCH v2 1/5] crypto: Multi-buffer encryptioin infrastructure support

2015-11-17 Thread Tim Chen
On Wed, 2015-11-18 at 08:07 +0800, Herbert Xu wrote: > On Tue, Nov 17, 2015 at 02:59:29PM -0800, Tim Chen wrote: > > > > Herbert, would you prefer me to use ablkcipher scatter walk instead, > > assuming the overhead of both walk are about the same? > > Well since you are going to potentially

Re: [PATCH v2 0/3] crypto-ixp4xx: Deletion of a few unnecessary checks

2015-11-17 Thread Herbert Xu
On Tue, Nov 17, 2015 at 04:32:47PM +0100, SF Markus Elfring wrote: > From: Markus Elfring > Date: Tue, 17 Nov 2015 16:26:01 +0100 > Subject: [PATCH 0/3] crypto-ixp4xx: Deletion of a few unnecessary checks > > Further update suggestions were taken into account after

Re: [PATCH v2 1/5] crypto: Multi-buffer encryptioin infrastructure support

2015-11-17 Thread Herbert Xu
On Tue, Nov 17, 2015 at 02:59:29PM -0800, Tim Chen wrote: > > Herbert, would you prefer me to use ablkcipher scatter walk instead, > assuming the overhead of both walk are about the same? Well since you are going to potentially sleep in the middle of an operation I'd think ablkcipher is required,

Re: [PATCH] nx-842: Ignore bit 3 of condition register returned by icswx

2015-11-17 Thread Ram Pai
On Tue, Nov 17, 2015 at 10:00:20PM +0800, Herbert Xu wrote: > On Fri, Oct 30, 2015 at 03:43:01PM -0700, Ram Pai wrote: > > icswx occasionally under heavy load sets bit 3 of condition register 0. > > It has no software implication. > > > > Currently that bit is interpreted by the driver as a

Re: [PATCH v2 1/5] crypto: Multi-buffer encryptioin infrastructure support

2015-11-17 Thread Herbert Xu
On Tue, Nov 17, 2015 at 04:30:14PM -0800, Tim Chen wrote: > On Wed, 2015-11-18 at 08:07 +0800, Herbert Xu wrote: > > On Tue, Nov 17, 2015 at 02:59:29PM -0800, Tim Chen wrote: > > > > > > Herbert, would you prefer me to use ablkcipher scatter walk instead, > > > assuming the overhead of both walk

A new, fast and "unbreakable" encryption algorithm

2015-11-17 Thread Ismail Kizir
Hello, I've developed a new encryption algorithm, which dynamically changes the key according to plaintext and practically impossible to break. I also opened to public with MIT dual License. It is also quite fast; ~80% faster than the fastest mode of AES without cpu instruction set support. I

Re: [PATCH 8/8] crypto: testmgr: Use the xxx_zero_message_hash from headers

2015-11-17 Thread Herbert Xu
On Tue, Oct 20, 2015 at 09:34:04AM +0200, LABBE Corentin wrote: > Since md5/shaxxx headers have hash for zero message length, just use them. > > Signed-off-by: LABBE Corentin This too would need a dependency on the MD5/SHA Kconfig options. However, for now this is

Re: [PATCH 2/8] crypto: niagara: Use precalculated hash from headers

2015-11-17 Thread Herbert Xu
On Tue, Oct 20, 2015 at 09:33:58AM +0200, LABBE Corentin wrote: > Precalculated hash for empty message are now present in hash headers. > This patch just use them. > > Signed-off-by: LABBE Corentin You need to select CRYPTO_MD5 and CRYPTO_SHA*. Please add the

Re: [PATCH 6/8] crypto: akcipher: the key parameter must be const u8 *

2015-11-17 Thread Herbert Xu
On Tue, Oct 20, 2015 at 09:34:02AM +0200, LABBE Corentin wrote: > All cryptoAPI setkey function set the key parameter as const u8 *. > This patch make the crypto_akcipher_setkey parameters like others. > > Signed-off-by: LABBE Corentin This patch no longer applies. --

Re: [PATCH 1/4] crypto: hifn_795x: replace simple_strtoul by kstrtouint

2015-11-17 Thread Herbert Xu
On Thu, Oct 22, 2015 at 08:51:49AM +0200, LABBE Corentin wrote: > The simple_strtoul function is marked as obsolete. > This patch replace it by kstrtouint at the cost of changing some function > return type from void to int. > > Signed-off-by: LABBE Corentin If you're

[PATCH] crypto: atmel: fix 64-bit warnings

2015-11-17 Thread Arnd Bergmann
The atmel AES driver assumes that 'int' and 'size_t' are the same type in multiple locations, which the compiler warns about when building it for 64-bit systems: In file included from ../drivers/crypto/atmel-aes.c:17:0: drivers/crypto/atmel-aes.c: In function 'atmel_aes_sg_copy':

Crypto Fixes for 4.4

2015-11-17 Thread Herbert Xu
Hi Linus: This push fixes a bug in the qat driver where a user-space pointer is dereferenced. Please pull from git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6.git linus Tadeusz Struk (1): crypto: qat - don't use userspace pointer

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

2015-11-17 Thread Greg KH
On Tue, Nov 17, 2015 at 10:27:42PM +0800, Herbert Xu wrote: > On Tue, Nov 17, 2015 at 03:26:03PM +0100, LABBE Corentin wrote: > > > > I have lots of user reporting that they cannot use the device since it wont > > load. > > For me it need to go stable since it respect all "stable rules", simple,

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

2015-11-17 Thread Andrzej Zaborowski
Hi Herbert, On 17 November 2015 at 14:42, Herbert Xu wrote: > Andrew Zaborowski wrote: >> Add two dummy methods that are required by the crypto API internals: >> .ctxsize and .init >> (just because the framework calls them without