[PATCH] crypto: caam: do not register AES-XTS mode on LP units

2016-11-04 Thread Sven Ebenfeld
When using AES-XTS on a Wandboard, we receive a Mode error: caam_jr 2102000.jr1: 20001311: CCB: desc idx 19: AES: Mode error. Due to the Security Reference Manual, the Low Power AES units of the i.MX6 do not support the XTS mode. Therefore we should try to provide them them in the API.

[PATCH] crypto: rsa: rename two rsa key files

2016-11-04 Thread yanjiang.jin
From: Yanjiang Jin This is to eliminate the below compile error: crypto/rsa_helper.c:19:29: fatal error: rsaprivkey-asn1.h: No such file or directory #include "rsaprivkey-asn1.h" ^ compilation terminated. Signed-off-by: Yanjiang Jin

[PATCH V2 7/9] crypto: ccp - Enhance RSA support for a v5 CCP

2016-11-04 Thread Gary R Hook
Take advantage of the increased RSA key size support in the v5 CCP. Signed-off-by: Gary R Hook --- drivers/crypto/ccp/ccp-crypto-rsa.c |5 ++ drivers/crypto/ccp/ccp-crypto.h |1 drivers/crypto/ccp/ccp-dev-v3.c |1 drivers/crypto/ccp/ccp-dev-v5.c |

[PATCH V2 8/9] crypto: ccp - Enable support for AES GCM on v5 CCPs

2016-11-04 Thread Gary R Hook
A version 5 device provides the primitive commands required for AES GCM. This patch adds support for en/decryption. Signed-off-by: Gary R Hook --- drivers/crypto/ccp/Makefile|1 drivers/crypto/ccp/ccp-crypto-aes-galois.c | 257

[PATCH V2 6/9] crypto: ccp - Add support for RSA on the CCP

2016-11-04 Thread Gary R Hook
Wire up the CCP as an RSA cipher provider. Signed-off-by: Gary R Hook --- drivers/crypto/ccp/Makefile |1 drivers/crypto/ccp/ccp-crypto-main.c | 19 ++ drivers/crypto/ccp/ccp-crypto-rsa.c | 294 ++

[PATCH V2 4/9] crypto: ccp - Add SHA-2 support

2016-11-04 Thread Gary R Hook
Incorporate 384-bit and 512-bit hashing for a version 5 CCP device Signed-off-by: Gary R Hook --- drivers/crypto/ccp/ccp-crypto-sha.c | 22 +++ drivers/crypto/ccp/ccp-crypto.h |8 ++-- drivers/crypto/ccp/ccp-ops.c| 72

[PATCH V2 3/9] crypto: ccp - Simplify some buffer management routines

2016-11-04 Thread Gary R Hook
The reverse-get/set functions can be simplified by eliminating unused code. Signed-off-by: Gary R Hook --- drivers/crypto/ccp/ccp-ops.c | 142 +- 1 file changed, 56 insertions(+), 86 deletions(-) diff --git

[PATCH V2 2/9] crypto: ccp - Update the command queue on errors

2016-11-04 Thread Gary R Hook
Move the command queue tail pointer when an error is detected. Always return the error. Signed-off-by: Gary R Hook --- drivers/crypto/ccp/ccp-dev-v5.c |7 +-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/drivers/crypto/ccp/ccp-dev-v5.c

[PATCH V2 1/9] crypto: ccp - Fix handling of RSA exponent on a v5 device

2016-11-04 Thread Gary R Hook
The exponent size in the ccp_op structure is in bits. A v5 CCP requires the exponent size to be in bytes, so convert the size from bits to bytes when populating the descriptor. The current code references the exponent in memory, but these fields have not been set since the exponent is actually

[PATCH V2 0/9] Enable hashing and ciphers for v5 CCP

2016-11-04 Thread Gary R Hook
The following series implements new function for a version 5 CCP: Support for SHA-2, wiring of RSA using the updated framework, additional RSA features for new devices, AES GCM mode, and Triple-DES in ECB and CBC mode. --- Gary R Hook (9): crypto: ccp - Fix handling of RSA exponent on a v5

[PATCH V2 9/9] crypto: ccp - Enable 3DES function on v5 CCPs

2016-11-04 Thread Gary R Hook
Wire up support for Triple DES in ECB mode. Signed-off-by: Gary R Hook --- drivers/crypto/ccp/Makefile |1 drivers/crypto/ccp/ccp-crypto-des3.c | 254 ++ drivers/crypto/ccp/ccp-crypto-main.c | 10 +

Re: vmalloced stacks and scatterwalk_map_and_copy()

2016-11-04 Thread Eric Biggers
On Thu, Nov 03, 2016 at 08:57:49PM -0700, Andy Lutomirski wrote: > > The crypto request objects can live on the stack just fine. It's the > request buffers that need to live elsewhere (or the alternative > interfaces can be used, or the crypto core code can start using > something other than

Re: [PATCH] poly1305: generic C can be faster on chips with slow unaligned access

2016-11-04 Thread Eric Biggers
On Thu, Nov 03, 2016 at 11:20:08PM +0100, Jason A. Donenfeld wrote: > Hi David, > > On Thu, Nov 3, 2016 at 6:08 PM, David Miller wrote: > > In any event no piece of code should be doing 32-bit word reads from > > addresses like "x + 3" without, at a very minimum, going