[PATCH 4/5] crypto: testmgr - add extra kw(aes) encryption test vector

2018-05-20 Thread Eric Biggers
From: Eric Biggers One "kw(aes)" decryption test vector doesn't exactly match an encryption test vector with input and result swapped. In preparation for removing the decryption test vectors, add this test vector to the encryption test vectors, so we don't lose any test

[PATCH 3/5] crypto: testmgr - add extra ecb(tnepres) encryption test vectors

2018-05-20 Thread Eric Biggers
From: Eric Biggers None of the four "ecb(tnepres)" decryption test vectors exactly match an encryption test vector with input and result swapped. In preparation for removing the decryption test vectors, add these to the encryption test vectors, so we don't lose any test

[PATCH 1/5] crypto: testmgr - add extra ecb(des) encryption test vectors

2018-05-20 Thread Eric Biggers
From: Eric Biggers Two "ecb(des)" decryption test vectors don't exactly match any of the encryption test vectors with input and result swapped. In preparation for removing the decryption test vectors, add these to the encryption test vectors, so we don't lose any test

[PATCH 2/5] crypto: testmgr - make an cbc(des) encryption test vector chunked

2018-05-20 Thread Eric Biggers
From: Eric Biggers One "cbc(des)" decryption test vector doesn't exactly match an encryption test vector with input and result swapped. It's *almost* the same as one, but the decryption version is "chunked" while the encryption version is "unchunked". In preparation for

[PATCH 0/5] crypto: eliminate redundant decryption test vectors

2018-05-20 Thread Eric Biggers
Hello, When adding the Speck cipher support I was annoyed by having to add both encryption and decryption test vectors, since they are redundant: the decryption ones are just the encryption ones with the input and result flipped. It turns out that's nearly always the case for all the other

Re: [PATCH v2] fscrypt: log the crypto algorithm implementations

2018-05-20 Thread Theodore Y. Ts'o
On Fri, May 18, 2018 at 10:58:14AM -0700, Eric Biggers wrote: > Log the crypto algorithm driver name for each fscrypt encryption mode on > its first use, also showing a friendly name for the mode. > > This will help people determine whether the expected implementations are > being used. In some

Re: [PATCH v2] fscrypt: add Speck128/256 support

2018-05-20 Thread Theodore Y. Ts'o
On Mon, May 07, 2018 at 05:22:08PM -0700, Eric Biggers wrote: > fscrypt currently only supports AES encryption. However, many low-end > mobile devices have older CPUs that don't have AES instructions, e.g. > the ARMv8 Cryptography Extensions. Currently, user data on such devices > is not

Re: cryptomgr_test / drbg_ctr: BUG: sleeping function called from invalid context

2018-05-20 Thread Stephan Müller
Am Freitag, 18. Mai 2018, 10:36:04 CEST schrieb Geert Uytterhoeven: Hi Geert, > > I tried following the code path, but couldn't find where it went wrong. > > mutex_lock(>drbg_mutex) is called from drbg_instantiate(), which is > inlined by the compiler into drbg_kcapi_seed(). > > Do you have a

4.16: /dev/random - a new approach

2018-05-20 Thread Stephan Müller
Hi, The patch set available at [1] provides a different approach to /dev/random which I call Linux Random Number Generator (LRNG) to collect entropy within the Linux kernel. The main improvements compared to the legacy /dev/random is to provide sufficient entropy during boot time as well as in

[PATCH] crypto: x86/aegis256 - Fix wrong key buffer size

2018-05-20 Thread Ondrej Mosnáček
From: Ondrej Mosnacek AEGIS-256 key is two blocks, not one. Fixes: 1d373d4e8e15 ("crypto: x86 - Add optimized AEGIS implementations") Reported-by: Eric Biggers Signed-off-by: Ondrej Mosnacek ---

Re: [PATCH 3/3] crypto: x86 - Add optimized AEGIS implementations

2018-05-20 Thread Ondrej Mosnáček
2018-05-20 4:41 GMT+02:00 Eric Biggers : > Hi Ondrej, > > On Fri, May 11, 2018 at 02:12:51PM +0200, Ondrej Mosnáček wrote: >> From: Ondrej Mosnacek >> >> This patch adds optimized implementations of AEGIS-128, AEGIS-128L, >> and AEGIS-256, utilizing the