[PATCH 2/2] crypto: hash - Add crypto_has_ahash helper

2016-01-22 Thread Herbert Xu
This patch adds the helper crypto_has_ahash which should replace crypto_has_hash. Signed-off-by: Herbert Xu diff --git a/crypto/ahash.c b/crypto/ahash.c index d19b523..8b08a59 100644 --- a/crypto/ahash.c +++ b/crypto/ahash.c @@ -542,6 +542,12 @@ struct crypto_ahash *crypto_alloc_ahash(const char

[PATCH 1/2] crypto: api - Add crypto_type_has_alg helper

2016-01-22 Thread Herbert Xu
This patch adds the helper crypto_type_has_alg which is meant to replace crypto_has_alg for new-style crypto types. Rather than hard-coding type/mask information they're now retrieved from the crypto_type object. Signed-off-by: Herbert Xu diff --git a/crypto/algapi.c b/crypto/algapi.c index 7be

Re: [PATCH v1] crypto: ccp - Add hash state import and export support

2016-01-22 Thread Tom Lendacky
On 01/12/2016 11:17 AM, Tom Lendacky wrote: > Commit 8996eafdcbad ("crypto: ahash - ensure statesize is non-zero") > added a check to prevent ahash algorithms from successfully registering > if the import and export functions were not implemented. This prevents > an oops in the hash_accept function

Re: [PATCH 0/2] crypto: caam - performance fixes/improvements

2016-01-22 Thread Horia Ioan Geanta Neag
On 1/12/2016 5:14 PM, Horia Geantă wrote: > The following patches increase/fix CAAM performance by modifying > the configuration of MCFGR (Master Configuration Register): > -1st patch fixes a ~ 5% performance drop on PPC platforms > -2nd patch improves performance in some use cases, since CAAM DMA

Re: [PATCH 0/5] crypto: atmel-sha: fix registration issue and other bugs

2016-01-22 Thread Nicolas Ferre
Le 15/01/2016 15:49, Cyrille Pitchen a écrit : > Hi all, > > This series of patches fixes many issues such as the algo registration failure > or the broken support of context switches. I think it's eligible as a "fixes" series for 4.5... Herbert, is the whole series can be queued as fixes, in you

[PATCH] crypto: skcipher - Add helper to zero stack request

2016-01-22 Thread Herbert Xu
As the size of an skcipher_request is variable, it's awkward to zero it explicitly. This patch adds a helper to do that which should be used when it is created on the stack. Signed-off-by: Herbert Xu diff --git a/include/crypto/skcipher.h b/include/crypto/skcipher.h index 2f07b4f..905490c 10064

[PATCH] crypto: hash - Add helpers to zero stack request/descriptor

2016-01-22 Thread Herbert Xu
As the size of an ahash_request or shash_desc is variable, it's awkward to zero them explicitly. This patch adds helpers to do that which should be used when they are created on the stack. Signed-off-by: Herbert Xu diff --git a/include/crypto/hash.h b/include/crypto/hash.h index 6361892..aef819

Non-destructive ChaCha20Poly1305 Decryption

2016-01-22 Thread Jason A. Donenfeld
Hi Martin, Your ChaCha20Poly1305 implementation when decrypting calls chacha20 decryption before it verifies the auth tag. Not only does this waste CPU cycles, but it makes it impossible to attempt decryption of cipher texts using different keys (until one is right) without creating a copy, which

Crypto Fixes for 4.5

2016-01-22 Thread Herbert Xu
Hi Linus: This push fixes the following issues: API: * A large number of bug fixes for the af_alg interface, credit goes to Dmitry Vyukov for discovering and reporting these issues. Algorithms: * sw842 needs to select crc32. * The soft dependency on crc32c is now in the correct spot. Drivers:

[PATCH] crypto: drbg - remove FIPS 140-2 continuous test

2016-01-22 Thread Stephan Mueller
Hi, the following patch is fully CAVS tested on 64 bit and 32 bit. Note, this change cannot be made for random.c or ansi_cprng.c, unfortunately. ---8<--- The newly released FIPS 140-2 IG 9.8 specifies that for SP800-90A compliant DRBGs, the FIPS 140-2 continuous random number generator test is n

Re: [PATCH] crypto: chacha20_4block_xor_ssse3: Align stack pointer to 64 bytes

2016-01-22 Thread Martin Willi
Hi Eli, > This aligns the stack pointer in chacha20_4block_xor_ssse3 to 64 bytes. > Fixes general protection faults and potential kernel panics. I assumed 16-byte alignment according to the System V AMD64 ABI, but this is obviously not true with -mpreferred-stack-boundary=3. The AVX2 version seem