[PATCH] crypto: sha*-mb Fix total_len for correct hash when larger than 512MB

2016-11-14 Thread Greg Tucker
Current multi-buffer hash implementations have a restriction on the total length of a hash job to 512MB. Hashing larger buffers will result in an incorrect hash. This extends the limit to 2^62 - 1. Signed-off-by: Greg Tucker --- arch/x86/crypto/sha1-mb/sha1_mb.c

[RFC][PATCH 3/7] crypto: gf128mul - Add ble multiplication functions

2016-11-14 Thread Alex Cope
Adding ble multiplication to GF128mul, and fixing up comments. The ble multiplication functions multiply GF(2^128) elements in the ble format. This format is preferable because the bits within each byte map to polynomial coefficients in the natural order (lowest order bit = coefficient of lowest

[RFC][PATCH 4/7] crypto: shash - Add crypto_grab_shash() and crypto_spawn_shash_alg()

2016-11-14 Thread Alex Cope
Analogous to crypto_grab_skcipher() and crypto_spawn_skcipher_alg(), these are useful for algorithms that need to use a shash sub-algorithm, possibly in addition to other sub-algorithms. Signed-off-by: Alex Cope Signed-off-by: Eric Biggers ---

[RFC][PATCH 6/7] crypto: testmgr - Add test vectors for HEH

2016-11-14 Thread Alex Cope
Adding test vectors from https://tools.ietf.org/html/draft-cope-heh-00 Signed-off-by: Alex Cope Signed-off-by: Eric Biggers --- crypto/testmgr.c | 15 crypto/testmgr.h | 226 +++ 2 files

[RFC][PATCH 5/7] crypto: heh - Add Hash Encrypt Hash(HEH) algorithm

2016-11-14 Thread Alex Cope
Hash Encrypt Hash (HEH) is a proposed block cipher mode of operation which extends the strong pseudo-random permutation property of block ciphers (e.g. AES) to arbitrary length input strings. This provides a stronger notion of security than existing block cipher modes of operation (e.g. CBC, CTR,

[RFC][PATCH 1/7] crypto: skcipher adding skciper_walk_virt_init

2016-11-14 Thread Alex Cope
Adding skcipher_walk_virt_init to allow a skciper_walk to specify length and input/output sg. Provides similar funcationalty to blkcipher_walk_init Signed-off-by: Alex Cope Signed-off-by: Eric Biggers --- crypto/skcipher.c | 32

[RFC][PATCH 2/7] crypto: gf128mul - Refactor gf128 overflow macros

2016-11-14 Thread Alex Cope
Rename and clean up the overflow macros. Their usage is more general than the name suggested. Signed-off-by: Alex Cope Signed-off-by: Eric Biggers --- crypto/gf128mul.c | 68 +-- 1 file changed, 41

[RFC][PATCH 0/7] crypto: Adding Hash-Encrypt-Hash(HEH)

2016-11-14 Thread Alex Cope
This patchset implements HEH, which is currently specified by the following Internet Draft: https://tools.ietf.org/html/draft-cope-heh-00 This patchset is a request for comments, and should not be merged at this time. We would like to wait for further comments on the Internet

[PATCH] crypto: gf128mul - Zero memory when freeing multiplication table

2016-11-14 Thread Alex Cope
GF(2^128) multiplication tables are typically used for secret information, so it's a good idea to zero them on free. Signed-off-by: Alex Cope Signed-off-by: Eric Biggers --- crypto/gf128mul.c | 4 ++-- include/crypto/gf128mul.h | 2 +- 2 files

Re: [PATCH -next] hwrng: atmel - use clk_disable_unprepare instead of clk_disable

2016-11-14 Thread Nicolas Ferre
Le 11/11/2016 à 15:56, Wei Yongjun a écrit : > From: Wei Yongjun > > Since clk_prepare_enable() is used to get trng->clk, we should > use clk_disable_unprepare() to release it for the error path. > > Signed-off-by: Wei Yongjun Acked-by: Nicolas