Re: [PATCHv2] crypto: xts - Add support for Cipher Text Stealing

2019-08-09 Thread Ard Biesheuvel
On Thu, 8 Aug 2019 at 16:11, Milan Broz wrote: > > On 08/08/2019 12:37, Ard Biesheuvel wrote: > >>> True. Which is another historical mistake imo, since XTS is only > >>> specified for AES, but I digress ... :-) > >>> > >> Yes, I was also surprised by the use of XTS with other blockciphers. > >> I

RE: [RFC PATCH v2] md/dm-crypt - reuse eboiv skcipher for IV generation

2019-08-09 Thread Pascal Van Leeuwen
> -Original Message- > From: Eric Biggers > Sent: Saturday, August 10, 2019 12:05 AM > To: Pascal Van Leeuwen > Cc: linux-crypto@vger.kernel.org > Subject: Re: [RFC PATCH v2] md/dm-crypt - reuse eboiv skcipher for IV > generation > > On Fri, Aug 09, 2019 at 09:33:14PM +, Pascal Van

Re: [RFC PATCH v2] md/dm-crypt - reuse eboiv skcipher for IV generation

2019-08-09 Thread Eric Biggers
On Fri, Aug 09, 2019 at 09:33:14PM +, Pascal Van Leeuwen wrote: > Real life designs require all kinds of trade-offs and compromises. > If you want to make something twice as expensive, you'd better have a > really solid reason for doing so. So yes, I do believe it is useful to > be sceptical a

RE: XTS template wrapping question

2019-08-09 Thread Pascal Van Leeuwen
> -Original Message- > From: Eric Biggers > Sent: Friday, August 9, 2019 7:07 PM > To: Pascal Van Leeuwen > Cc: linux-crypto@vger.kernel.org; herb...@gondor.apana.org.au; > da...@davemloft.net > Subject: Re: XTS template wrapping question > > On Fri, Aug 09, 2019 at 03:06:23PM +, Pa

RE: XTS template wrapping question

2019-08-09 Thread Pascal Van Leeuwen
> -Original Message- > From: Eric Biggers > Sent: Friday, August 9, 2019 6:46 PM > To: Pascal Van Leeuwen > Cc: linux-crypto@vger.kernel.org; herb...@gondor.apana.org.au; > da...@davemloft.net > Subject: Re: XTS template wrapping question > > On Fri, Aug 09, 2019 at 11:39:12AM +, Pa

RE: [RFC PATCH v2] md/dm-crypt - reuse eboiv skcipher for IV generation

2019-08-09 Thread Pascal Van Leeuwen
> -Original Message- > From: Eric Biggers > Sent: Friday, August 9, 2019 10:56 PM > To: Pascal Van Leeuwen > Cc: linux-crypto@vger.kernel.org > Subject: Re: [RFC PATCH v2] md/dm-crypt - reuse eboiv skcipher for IV > generation > > On Fri, Aug 09, 2019 at 08:29:59PM +, Pascal Van Lee

[PATCH v2] padata: validate cpumask without removed CPU during offline

2019-08-09 Thread Daniel Jordan
Configuring an instance's parallel mask without any online CPUs... echo 2 > /sys/kernel/pcrypt/pencrypt/parallel_cpumask echo 0 > /sys/devices/system/cpu/cpu1/online ...crashes like this: divide error: [#1] SMP PTI CPU: 4 PID: 281 Comm: modprobe Not tainted 5.2.0-padata-base+ #25

Re: [RFC PATCH v2] md/dm-crypt - reuse eboiv skcipher for IV generation

2019-08-09 Thread Eric Biggers
On Fri, Aug 09, 2019 at 08:29:59PM +, Pascal Van Leeuwen wrote: > > > > There's no proof that other attacks don't exist. > > > As you can't prove something doesn't exist ... Of course you can, that's what the security proofs for crypto constructions always do. They prove that no efficient at

RE: [RFC PATCH v2] md/dm-crypt - reuse eboiv skcipher for IV generation

2019-08-09 Thread Pascal Van Leeuwen
> -Original Message- > From: Eric Biggers > Sent: Friday, August 9, 2019 7:17 PM > To: Pascal Van Leeuwen > Cc: linux-crypto@vger.kernel.org > Subject: Re: [RFC PATCH v2] md/dm-crypt - reuse eboiv skcipher for IV > generation > > On Fri, Aug 09, 2019 at 09:17:23AM +, Pascal Van Leeu

[PATCH 2/2] padata: validate cpumask without removed CPU during offline

2019-08-09 Thread Daniel Jordan
Configuring an instance's parallel mask without any online CPUs... echo 2 > /sys/kernel/pcrypt/pencrypt/parallel_cpumask echo 0 > /sys/devices/system/cpu/cpu1/online ...crashes like this: divide error: [#1] SMP PTI CPU: 4 PID: 281 Comm: modprobe Not tainted 5.2.0-padata-base+ #25

[PATCH 1/2] padata: always acquire cpu_hotplug_lock before pinst->lock

2019-08-09 Thread Daniel Jordan
On a 5.2 kernel, lockdep complains when offlining a CPU and writing to a parallel_cpumask sysfs file. echo 0 > /sys/devices/system/cpu/cpu1/online echo ff > /sys/kernel/pcrypt/pencrypt/parallel_cpumask == WARNING: possible circular locki

Re: [PATCH -next] crypto: aes-generic - remove unused variable 'rco_tab'

2019-08-09 Thread Ard Biesheuvel
On Fri, 9 Aug 2019 at 11:30, YueHaibing wrote: > > crypto/aes_generic.c:64:18: warning: > rco_tab defined but not used [-Wunused-const-variable=] > > It is never used, so can be removed. > > Reported-by: Hulk Robot > Signed-off-by: YueHaibing Acked-by: Ard Biesheuvel > --- > crypto/aes_gene

Re: [PATCH RFC 3/3] crypto: arm64/aegis128 - implement plain NEON version

2019-08-09 Thread Ard Biesheuvel
On Fri, 9 Aug 2019 at 01:31, Nick Desaulniers wrote: > > On Fri, Aug 2, 2019 at 8:15 AM Ard Biesheuvel > wrote: > > > > Provide a version of the core AES transform to the aegis128 SIMD > > code that does not rely on the special AES instructions, but uses > > plain NEON instructions instead. This

Re: [RFC PATCH v2] md/dm-crypt - reuse eboiv skcipher for IV generation

2019-08-09 Thread Eric Biggers
On Fri, Aug 09, 2019 at 09:17:23AM +, Pascal Van Leeuwen wrote: > > > -Original Message- > > From: Eric Biggers > > Sent: Thursday, August 8, 2019 7:15 PM > > To: Pascal Van Leeuwen > > Cc: Milan Broz ; Ard Biesheuvel > > ; linux- > > cry...@vger.kernel.org; herb...@gondor.apana.org

[PATCH v2] crypto: xts - add support for ciphertext stealing

2019-08-09 Thread Ard Biesheuvel
Add support for the missing ciphertext stealing part of the XTS-AES specification, which permits inputs of any size >= the block size. Cc: Pascal van Leeuwen Cc: Ondrej Mosnacek Tested-by: Milan Broz Signed-off-by: Ard Biesheuvel --- v2: fix scatterlist issue in async handling remove stale

Re: [PATCH] crypto: xts - add support for ciphertext stealing

2019-08-09 Thread Ard Biesheuvel
On Fri, 9 Aug 2019 at 18:00, Pascal Van Leeuwen wrote: > > > -Original Message- > > From: linux-crypto-ow...@vger.kernel.org > > On Behalf Of > > Pascal Van Leeuwen > > Sent: Friday, August 9, 2019 12:22 PM > > To: Ard Biesheuvel ; linux-crypto@vger.kernel.org > > Cc: herb...@gondor.apan

Re: XTS template wrapping question

2019-08-09 Thread Eric Biggers
On Fri, Aug 09, 2019 at 03:06:23PM +, Pascal Van Leeuwen wrote: > > -Original Message- > > From: Pascal Van Leeuwen > > Sent: Friday, August 9, 2019 4:18 PM > > To: Pascal Van Leeuwen ; > > linux-crypto@vger.kernel.org; > > herb...@gondor.apana.org.au; da...@davemloft.net; Eric Bigger

[PATCH] crypto: aead - Do not allow authsize=0 if auth. alg has digestsize>0

2019-08-09 Thread Pascal van Leeuwen
Return -EINVAL on an attempt to set the authsize to 0 with an auth. algorithm with a non-zero digestsize (i.e. anything but digest_null) as authenticating the data and then throwing away the result does not make any sense at all. The digestsize zero exception is for use with digest_null for testin

Re: XTS template wrapping question

2019-08-09 Thread Eric Biggers
On Fri, Aug 09, 2019 at 11:39:12AM +, Pascal Van Leeuwen wrote: > Herbert, Eric, > > While working on the XTS template, I noticed that it is being used > (e.g. from testmgr, but also when explictly exported from other drivers) > as e.g. "xts(aes)", with the generic driver actually being > "x

Re: [GIT] Crypto Fixes for 5.3

2019-08-09 Thread pr-tracker-bot
The pull request you sent on Fri, 9 Aug 2019 16:15:48 +1000: > git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6.git linus has been merged into torvalds/linux.git: https://git.kernel.org/torvalds/c/e577dc152e232c78e5774e4c9b5486a04561920b Thank you! -- Deet-doot-dot, I am a bot.

RE: XTS template wrapping question

2019-08-09 Thread Pascal Van Leeuwen
> -Original Message- > From: Pascal Van Leeuwen > Sent: Friday, August 9, 2019 4:18 PM > To: Pascal Van Leeuwen ; > linux-crypto@vger.kernel.org; > herb...@gondor.apana.org.au; da...@davemloft.net; Eric Biggers > > Subject: RE: XTS template wrapping question > > > -Original Message

Re: [PATCH -next] crypto: streebog - remove two unused variables

2019-08-09 Thread Vitaly Chikunov
On Fri, Aug 09, 2019 at 04:49:05PM +0800, YueHaibing wrote: > crypto/streebog_generic.c:162:17: warning: > Pi defined but not used [-Wunused-const-variable=] > crypto/streebog_generic.c:151:17: warning: > Tau defined but not used [-Wunused-const-variable=] > > They are never used, so can be remo

RE: [PATCH] crypto: xts - add support for ciphertext stealing

2019-08-09 Thread Pascal Van Leeuwen
> -Original Message- > From: linux-crypto-ow...@vger.kernel.org > On Behalf Of > Pascal Van Leeuwen > Sent: Friday, August 9, 2019 12:22 PM > To: Ard Biesheuvel ; linux-crypto@vger.kernel.org > Cc: herb...@gondor.apana.org.au; ebigg...@kernel.org; Ondrej Mosnacek > ; Milan Broz > Subject

RE: XTS template wrapping question

2019-08-09 Thread Pascal Van Leeuwen
> -Original Message- > From: linux-crypto-ow...@vger.kernel.org > On Behalf Of > Pascal Van Leeuwen > Sent: Friday, August 9, 2019 1:39 PM > To: linux-crypto@vger.kernel.org; herb...@gondor.apana.org.au; > da...@davemloft.net; Eric > Biggers > Subject: XTS template wrapping question >

[cryptodev:master 124/144] drivers/crypto/hisilicon/qm.c:322:2: error: impossible constraint in 'asm'

2019-08-09 Thread kbuild test robot
tree: https://kernel.googlesource.com/pub/scm/linux/kernel/git/herbert/cryptodev-2.6.git master head: ec9c7d19336ee98ecba8de80128aa405c45feebb commit: 62c455ca853e3e352e465d66a6cc39f1f88caa60 [124/144] crypto: hisilicon - add HiSilicon ZIP accelerator support config: sparc64-allmodconfig (at

[cryptodev:master 124/144] drivers/crypto/hisilicon/qm.c:338:2: note: in expansion of macro 'dev_dbg'

2019-08-09 Thread kbuild test robot
tree: https://kernel.googlesource.com/pub/scm/linux/kernel/git/herbert/cryptodev-2.6.git master head: ec9c7d19336ee98ecba8de80128aa405c45feebb commit: 62c455ca853e3e352e465d66a6cc39f1f88caa60 [124/144] crypto: hisilicon - add HiSilicon ZIP accelerator support config: sh-allmodconfig (attache

XTS template wrapping question

2019-08-09 Thread Pascal Van Leeuwen
Herbert, Eric, While working on the XTS template, I noticed that it is being used (e.g. from testmgr, but also when explictly exported from other drivers) as e.g. "xts(aes)", with the generic driver actually being "xts(ecb(aes-generic))". While what I would expect would be "xts(ecb(aes))", the

RE: [PATCH] crypto: xts - add support for ciphertext stealing

2019-08-09 Thread Pascal Van Leeuwen
Ard, Nitpicking: you patch does not fix the comment at the top stating that sector sizes which are not a multiple of 16 bytes are not supported. Otherwise, it works fine over here and I like the way you actually queue up that final cipher call, which largely addresses my performance concerns w.

RE: [PATCH 2/2] crypto: inside-secure: This fixes a mistake in a comment for XTS

2019-08-09 Thread Pascal Van Leeuwen
> -Original Message- > From: linux-crypto-ow...@vger.kernel.org > On Behalf Of > Herbert Xu > Sent: Friday, August 9, 2019 7:11 AM > To: Pascal van Leeuwen > Cc: linux-crypto@vger.kernel.org; antoine.ten...@bootlin.com; > da...@davemloft.net; Pascal > Van Leeuwen > Subject: Re: [PATCH

RE: [RFC PATCH v2] md/dm-crypt - reuse eboiv skcipher for IV generation

2019-08-09 Thread Pascal Van Leeuwen
> -Original Message- > From: Eric Biggers > Sent: Thursday, August 8, 2019 7:15 PM > To: Pascal Van Leeuwen > Cc: Milan Broz ; Ard Biesheuvel > ; linux- > cry...@vger.kernel.org; herb...@gondor.apana.org.au; a...@redhat.com; > snit...@redhat.com; > dm-de...@redhat.com > Subject: Re: [R

[PATCH -next] crypto: streebog - remove two unused variables

2019-08-09 Thread YueHaibing
crypto/streebog_generic.c:162:17: warning: Pi defined but not used [-Wunused-const-variable=] crypto/streebog_generic.c:151:17: warning: Tau defined but not used [-Wunused-const-variable=] They are never used, so can be removed. Reported-by: Hulk Robot Signed-off-by: YueHaibing --- crypto/st

[PATCH -next] crypto: aes-generic - remove unused variable 'rco_tab'

2019-08-09 Thread YueHaibing
crypto/aes_generic.c:64:18: warning: rco_tab defined but not used [-Wunused-const-variable=] It is never used, so can be removed. Reported-by: Hulk Robot Signed-off-by: YueHaibing --- crypto/aes_generic.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/crypto/aes_generic.c b/crypto/aes_g

Re: [PATCH] crypto: xts - add support for ciphertext stealing

2019-08-09 Thread Milan Broz
On 09/08/2019 08:31, Ard Biesheuvel wrote: > Add support for the missing ciphertext stealing part of the XTS-AES > specification, which permits inputs of any size >= the block size. > > Cc: Pascal van Leeuwen > Cc: Ondrej Mosnacek > Cc: Milan Broz > Signed-off-by: Ard Biesheuvel > --- > This i

Re: [PATCH v3 0/7] crypto: hisilicon: Add HiSilicon QM and ZIP controller driver

2019-08-09 Thread Zhou Wang
On 2019/8/9 14:19, Herbert Xu wrote: > On Fri, Aug 02, 2019 at 03:57:49PM +0800, Zhou Wang wrote: >> This series adds HiSilicon QM and ZIP controller driver in crypto subsystem. >> >> A simple QM/ZIP driver which helps to provide an example for a general >> accelerator framework is under review in