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

2019-08-09 Thread Ard Biesheuvel
On Thu, 8 Aug 2019 at 14:53, Milan Broz wrote: > > Hi, > > On 07/08/2019 07:50, Ard Biesheuvel wrote: > > Instead of instantiating a separate cipher to perform the encryption > > needed to produce the IV, reuse the skcipher used for the block data > > and invoke it one additional time for each blo

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

2019-08-08 Thread Eric Biggers
gt; linux-cry...@vger.kernel.org; > > herb...@gondor.apana.org.au; a...@redhat.com; snit...@redhat.com; > > dm-devel@redhat.com > > Subject: Re: [RFC PATCH v2] md/dm-crypt - reuse eboiv skcipher for IV > > generation > > > > On 08/08/2019 11:31, Pascal Van Leeuwen wrote: >

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

2019-08-08 Thread Pascal Van Leeuwen
t;> To: Pascal Van Leeuwen > >> Cc: Ard Biesheuvel ; > >> linux-cry...@vger.kernel.org; > >> herb...@gondor.apana.org.au; a...@redhat.com; snit...@redhat.com; > >> dm-devel@redhat.com; > >> gmazyl...@gmail.com > >> Subject: Re: [RFC PATCH v2] md/

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

2019-08-08 Thread Milan Broz
a...@redhat.com; snit...@redhat.com; >> dm-devel@redhat.com; >> gmazyl...@gmail.com >> Subject: Re: [RFC PATCH v2] md/dm-crypt - reuse eboiv skcipher for IV >> generation >> >> On Wed, Aug 07, 2019 at 04:14:22PM +, Pascal Van Leeuwen wrote: >>>>>&

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

2019-08-08 Thread Milan Broz
Hi, On 07/08/2019 07:50, Ard Biesheuvel wrote: > Instead of instantiating a separate cipher to perform the encryption > needed to produce the IV, reuse the skcipher used for the block data > and invoke it one additional time for each block to encrypt a zero > vector and use the output as the IV. >

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

2019-08-08 Thread Pascal Van Leeuwen
l...@gmail.com > Subject: Re: [RFC PATCH v2] md/dm-crypt - reuse eboiv skcipher for IV > generation > > On Wed, Aug 07, 2019 at 04:14:22PM +, Pascal Van Leeuwen wrote: > > > > > In your case, we are not dealing with known plaintext attacks, > > > > > >

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

2019-08-08 Thread Eric Biggers
On Wed, Aug 07, 2019 at 04:14:22PM +, Pascal Van Leeuwen wrote: > > > > In your case, we are not dealing with known plaintext attacks, > > > > > > > Since this is XTS, which is used for disk encryption, I would argue > > > we do! For the tweak encryption, the sector number is known plaintext, >

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

2019-08-07 Thread Pascal Van Leeuwen
; gmazyl...@gmail.com > Subject: Re: [RFC PATCH v2] md/dm-crypt - reuse eboiv skcipher for IV > generation > > On Wed, 7 Aug 2019 at 16:52, Pascal Van Leeuwen > wrote: > > > > Ard, > > > > > -Original Message- > > > From: Ard Biesheuvel &g

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

2019-08-07 Thread Ard Biesheuvel
org.au; > > ebigg...@kernel.org; > > a...@redhat.com; snit...@redhat.com; dm-devel@redhat.com; > > gmazyl...@gmail.com > > Subject: Re: [RFC PATCH v2] md/dm-crypt - reuse eboiv skcipher for IV > > generation > > > > On Wed, 7 Aug 2019 at 10:28, Pascal Van L

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

2019-08-07 Thread Pascal Van Leeuwen
; gmazyl...@gmail.com > Subject: Re: [RFC PATCH v2] md/dm-crypt - reuse eboiv skcipher for IV > generation > > On Wed, 7 Aug 2019 at 10:28, Pascal Van Leeuwen > wrote: > > > > Ard, > > > > I've actually been following this discussion with some interest,

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

2019-08-07 Thread Ard Biesheuvel
gt; To: linux-cry...@vger.kernel.org > > Cc: herb...@gondor.apana.org.au; ebigg...@kernel.org; a...@redhat.com; > > snit...@redhat.com; > > dm-devel@redhat.com; gmazyl...@gmail.com; Ard Biesheuvel > > > > Subject: [RFC PATCH v2] md/dm-crypt - reuse eboiv skcipher for IV

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

2019-08-07 Thread Milan Broz
On 07/08/2019 07:50, Ard Biesheuvel wrote: > Instead of instantiating a separate cipher to perform the encryption > needed to produce the IV, reuse the skcipher used for the block data > and invoke it one additional time for each block to encrypt a zero > vector and use the output as the IV. > > F

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

2019-08-07 Thread Pascal Van Leeuwen
iesheuvel > Sent: Wednesday, August 7, 2019 7:50 AM > To: linux-cry...@vger.kernel.org > Cc: herb...@gondor.apana.org.au; ebigg...@kernel.org; a...@redhat.com; > snit...@redhat.com; > dm-devel@redhat.com; gmazyl...@gmail.com; Ard Biesheuvel > > Subject: [RFC PATCH v2] md/d

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

2019-08-06 Thread Ard Biesheuvel
Instead of instantiating a separate cipher to perform the encryption needed to produce the IV, reuse the skcipher used for the block data and invoke it one additional time for each block to encrypt a zero vector and use the output as the IV. For CBC mode, this is equivalent to using the bare block