Re: [PATCH] crypto: fix AEAD tag memory handling

2016-11-01 Thread Stephan Mueller
Am Montag, 31. Oktober 2016, 16:18:32 CET schrieb Mat Martineau: Hi Mat, > My main concern is getting the semantics correct and consistent in a > single patch series. It would be a big problem to explain that AF_ALG AEAD > read and write works one way in 4.x, another way in 4.y, and some >

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

2016-11-01 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 2/16] crypto: aes-ce-ccm - Use skcipher walk interface

2016-11-01 Thread Herbert Xu
This patch makes use of the new skcipher walk interface instead of the obsolete blkcipher walk interface. Signed-off-by: Herbert Xu --- arch/arm64/crypto/aes-ce-ccm-glue.c | 50 +--- 1 file changed, 13 insertions(+), 37

[PATCH 1/16] crypto: skcipher - Add skcipher walk interface

2016-11-01 Thread Herbert Xu
This patch adds the skcipher walk interface which replaces both blkcipher walk and ablkcipher walk. Just like blkcipher walk it can also be used for AEAD algorithms. Signed-off-by: Herbert Xu --- crypto/skcipher.c | 512

[PATCH 5/16] crypto: api - Do not clear type bits in crypto_larval_lookup

2016-11-01 Thread Herbert Xu
Currently all bits not set in mask are cleared in crypto_larval_lookup. This is unnecessary as wherever the type bits are used it is always masked anyway. This patch removes the clearing so that we may use bits set in the type but not in the mask for special purposes, e.g., picking up internal

[PATCH 7/16] crypto: simd - Add simd skcipher helper

2016-11-01 Thread Herbert Xu
This patch adds the simd skcipher helper which is meant to be a replacement for ablk helper. It replaces the underlying blkcipher interface with skcipher, and also presents the top-level algorithm as an skcipher. Signed-off-by: Herbert Xu --- crypto/Kconfig

[PATCH 6/16] crypto: cryptd - Add support for skcipher

2016-11-01 Thread Herbert Xu
This patch adds skcipher support to cryptd alongside ablkcipher. Signed-off-by: Herbert Xu --- crypto/cryptd.c | 284 +++- include/crypto/cryptd.h | 13 ++ 2 files changed, 294 insertions(+), 3 deletions(-)

[PATCH 12/16] crypto: arm64/aes - Convert to skcipher

2016-11-01 Thread Herbert Xu
This patch converts arm64/aes over to the skcipher interface. Signed-off-by: Herbert Xu --- arch/arm64/crypto/aes-glue.c | 382 +-- 1 file changed, 158 insertions(+), 224 deletions(-) diff --git

[PATCH 11/16] crypto: aesni - Convert to skcipher

2016-11-01 Thread Herbert Xu
This patch converts aesni (including fpu) over to the skcipher interface. The LRW implementation has been removed as the generic LRW code can now be used directly on top of the accelerated ECB implementation. Signed-off-by: Herbert Xu ---

[PATCH 15/16] crypto: cbc - Export CBC implementation

2016-11-01 Thread Herbert Xu
This patch moves the core CBC implementation into a header file so that it can be reused by drivers implementing CBC. Signed-off-by: Herbert Xu --- crypto/cbc.c | 129 - include/crypto/cbc.h | 146

[PATCH 14/16] crypto: cbc - Convert to skcipher

2016-11-01 Thread Herbert Xu
This patch converts cbc over to the skcipher interface. It also rearranges the code to allow it to be reused by drivers. Signed-off-by: Herbert Xu --- crypto/cbc.c | 242 +-- 1 file changed, 138

[PATCH 8/16] crypto: pcbc - Convert to skcipher

2016-11-01 Thread Herbert Xu
This patch converts lrw over to the skcipher interface. Signed-off-by: Herbert Xu --- crypto/pcbc.c | 201 +++--- 1 file changed, 109 insertions(+), 92 deletions(-) diff --git a/crypto/pcbc.c b/crypto/pcbc.c

[PATCH 16/16] crypto: aesbs - Convert to skcipher

2016-11-01 Thread Herbert Xu
This patch converts aesbs over to the skcipher interface. Signed-off-by: Herbert Xu --- arch/arm/crypto/aesbs-glue.c | 380 +-- 1 file changed, 152 insertions(+), 228 deletions(-) diff --git a/arch/arm/crypto/aesbs-glue.c

[PATCH 4/16] crypto: xts - Convert to skcipher

2016-11-01 Thread Herbert Xu
This patch converts xts over to the skcipher interface. It also optimises the implementation to be based on ECB instead of the underlying cipher. For compatibility the existing naming scheme of xts(aes) is maintained as opposed to the more obvious one of xts(ecb(aes)). Signed-off-by: Herbert Xu

[PATCH 13/16] crypto: aes-ce - Convert to skcipher

2016-11-01 Thread Herbert Xu
This patch converts aes-ce over to the skcipher interface. Signed-off-by: Herbert Xu --- arch/arm/crypto/aes-ce-glue.c | 390 -- 1 file changed, 157 insertions(+), 233 deletions(-) diff --git a/arch/arm/crypto/aes-ce-glue.c

[PATCH 10/16] crypto: testmgr - Do not test internal algorithms

2016-11-01 Thread Herbert Xu
Currently we manually filter out internal algorithms using a list in testmgr. This is dangerous as internal algorithms cannot be safely used even by testmgr. This patch ensures that they're never processed by testmgr at all. This patch also removes an obsolete bypass for nivciphers which no

[PATCH 3/16] crypto: lrw - Convert to skcipher

2016-11-01 Thread Herbert Xu
This patch converts lrw over to the skcipher interface. It also optimises the implementation to be based on ECB instead of the underlying cipher. For compatibility the existing naming scheme of lrw(aes) is maintained as opposed to the more obvious one of lrw(ecb(aes)). Signed-off-by: Herbert Xu

[PATCH 9/16] crypto: glue_helper - Add skcipher xts helpers

2016-11-01 Thread Herbert Xu
This patch adds xts helpers that use the skcipher interface rather than blkcipher. This will be used by aesni_intel. Signed-off-by: Herbert Xu --- arch/x86/crypto/glue_helper.c | 74 +-

[PATCH 0/16] crypto: skcipher - skcipher algorithm conversion part 3

2016-11-01 Thread Herbert Xu
Hi: This patch series is the third instalment of the skcipher conversion. It introduces the skcipher walk interface, and converts a number of core algorithms such as CBC and LRW/XTS, as well as the aesni on x86 and various ARM aes implementations. It also adds an skcipher version of cryptd, as

[PATCH] crypto: talitos: fix spelling mistake

2016-11-01 Thread Colin King
From: Colin Ian King Trivial fix to spelling mistake "pointeur" to "pointer" in dev_err message Signed-off-by: Colin Ian King --- drivers/crypto/talitos.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git