Re: [PATCH 4/4] crypto: lmk2/lmk3 cipher block modes

2010-02-01 Thread Max Vozeler
Hi Herbert, On Tue, Jan 19, 2010 at 09:00:38PM +1300, Herbert Xu wrote: > Let's keep lmk2/lmk3 as separate modes, but implement it as a > wrapper around cbc. That is, instead of allocating the cipher, > you'd allocate "cbc(cipher)" (as an ablkcipher) and use it to > perform the actual encryption/

Re: [PATCH 1/4] dm-crypt: clarify cipher vs. cipher mode

2010-01-18 Thread Max Vozeler
Hello Richard, On Sun, Jan 17, 2010 at 11:02:34PM +0100, Richard Zidlicky wrote: > > diff --git a/Documentation/crypto/lmk.txt b/Documentation/crypto/lmk.txt > > new file mode 100644 > > index 000..91ca7f7 > > --- /dev/null > > +++ b/Documentation/crypto/lmk.txt > > @@ -0,0 +1,102 @@ > > +Loop

Re: [PATCH 4/4] crypto: lmk2/lmk3 cipher block modes

2010-01-18 Thread Max Vozeler
Hello Herbert, On Sun, Jan 17, 2010 at 10:03:25PM +1100, Herbert Xu wrote: > On Mon, Dec 28, 2009 at 06:59:15PM +0000, Max Vozeler wrote: > > Both modes operate on full 512 byte sectors. They use CBC > > with an IV derived from the sector number, the data and (for > > lmk3 o

Re: [PATCH 3/4] crypto: md5 - Add export support

2010-01-13 Thread Max Vozeler
On Wed, Jan 13, 2010 at 08:52:39PM +1100, Herbert Xu wrote: > On Mon, Dec 28, 2009 at 06:59:14PM +0000, Max Vozeler wrote: > > This patch adds export support to md5. The exported type is > > defined by struct md5_state. > > > > This is modeled after the equiva

Re: [PATCH 1/4] dm-crypt: clarify cipher vs. cipher mode

2010-01-13 Thread Max Vozeler
Hi Richard, On Mon, Jan 11, 2010 at 10:28:39PM +0100, Richard Zidlicky wrote: > On Mon, Jan 04, 2010 at 04:25:42PM +0100, Max Vozeler wrote: > > + > > +These modes have two main characteristics compared to regular CBC > > +with sector IV. The first is implemented in dm-cryp

Re: [PATCH 1/4] dm-crypt: clarify cipher vs. cipher mode

2010-01-04 Thread Max Vozeler
On Tue, Dec 29, 2009 at 02:46:39AM +0100, Max Vozeler wrote: > On Mon, Dec 28, 2009 at 08:37:43PM +0100, Milan Broz wrote: > > But anyway, I see that the reason for this is to introduce multikey feature > > (compatible with loop-AES mode). That's interesting idea. > >

Re: [PATCH 4/4] crypto: lmk2/lmk3 cipher block modes

2009-12-28 Thread Max Vozeler
On Tue, Dec 29, 2009 at 02:18:21AM +0100, Richard Zidlicky wrote: > On Mon, Dec 28, 2009 at 07:59:15PM +0100, Max Vozeler wrote: > > > + help > > + LMK block cipher modes (lmk2/lmk3). > > + > > + These modes are compatible with Loop-AES. Use them with a &g

Re: [PATCH 1/4] dm-crypt: clarify cipher vs. cipher mode

2009-12-28 Thread Max Vozeler
On Mon, Dec 28, 2009 at 08:37:43PM +0100, Milan Broz wrote: > On 12/28/2009 07:59 PM, Max Vozeler wrote: > > The original code used cc->cipher for two things: > > > @@ -1014,6 +1014,7 @@ static int crypt_ctr(struct dm_target *ti, unsigned > > int argc, char *

[PATCH 4/4] crypto: lmk2/lmk3 cipher block modes

2009-12-28 Thread Max Vozeler
modes operate on full 512 byte sectors. They use CBC with an IV derived from the sector number, the data and (for lmk3 only) an extra 128-bit IV seed. Signed-off-by: Max Vozeler Cc: Jari Ruusu --- MAINTAINERS |6 + crypto/Kconfig | 17 ++ crypto/Makefile |1 + crypto/lmk.c

[PATCH 1/4] dm-crypt: clarify cipher vs. cipher mode

2009-12-28 Thread Max Vozeler
or display by dm status. So change it to be used only for the latter and put cipher mode string on the stack. Signed-off-by: Max Vozeler Cc: Milan Broz Cc: Jari Ruusu --- drivers/md/dm-crypt.c |5 +++-- 1 files changed, 3 insertions(+), 2 deletions(-) diff --git a/drivers/md/dm-crypt.c b/driv

[PATCH 2/4] dm-crypt: multi tfm mode

2009-12-28 Thread Max Vozeler
Introduces a mode for dm-crypt which uses multiple encryption keys (and thus tfms) alternating based on the sector number and the number of keys. This change is needed to support loop-AES compatible block chaining modes, which use "multi:64". Signed-off-by: Max Vozeler Cc: Milan Broz

[PATCH 3/4] crypto: md5 - Add export support

2009-12-28 Thread Max Vozeler
This patch adds export support to md5. The exported type is defined by struct md5_state. This is modeled after the equivalent change to sha1_generic, except only export is added for now. Signed-off-by: Max Vozeler Cc: Jari Ruusu --- crypto/md5.c | 31

[RFC PATCH] crypto: loop-AES support

2009-12-28 Thread Max Vozeler
This set adds an implementation of the Loop-AES block encryption modes for dm-crypt. It consists of two main parts: (1) blkcipher implementation of the Loop-AES block chaining modes (lmk2, lmk3) (2) Support for alternating keys in dm-crypt. The patches are based on cryptodev-2.6. Toget