Re: LRW implementation, please comment

2006-08-31 Thread Herbert Xu
Hi Rik: On Thu, Aug 31, 2006 at 02:39:30PM +0200, Rik Snel wrote: > > This is an attempt at implementing LRW for the new blockcipher API. > Please review, test and comment. Thanks a lot for doing this. It looks good to me. There are a few style (see Documentation/CodingStyle) issues. It woul

[PATCH 6/6] crypto: a simple way of storing and checking test vectors, LRW vectors included

2006-08-31 Thread Rik Snel
Test vectors for LRW and a simple way of checking them. For your convenience and/or for real inclusion. Signed-off-by: Rik Snel <[EMAIL PROTECTED]> --- Documentation/crypto/README.testvector |7 ++ Documentation/crypto/lrw-32-aes| 113 Documentation/c

[PATCH 2/6] crypto: benbi IV, big endian narrow block count for LRW-32-AES

2006-08-31 Thread Rik Snel
LRW-32-AES needs a certain IV. This IV should be provided dm-crypt. The block cipher mode could, in principle generate the correct IV from the plain IV, but I think that it is cleaner to supply the right IV directly. The sector -> narrow block calculation uses a shift for performance reasons. Thi

[PATCH 1/6] crypto: trivial comment improvements

2006-08-31 Thread Rik Snel
Just some minor comment nits. - little-endian is better than low-endian - and since it is called essiv everywere it should also be essiv in the comments (and not ess_iv) Signed-off-by: Rik Snel <[EMAIL PROTECTED]> --- drivers/md/dm-crypt.c |8 1 files changed, 4 insertions(+), 4

[PATCH 5/6] crypto: LRW, Liskov Rivest Wagner, a tweakable narrow block cipher mode

2006-08-31 Thread Rik Snel
Main module, this implements the Liskov Rivest Wagner block cipher mode in the new blockcipher API. The implementation is based on ecb.c. The first iteration of the blockcipher_walk loop is unrolled to give the first narrow block special treatment. The LRW-32-AES specification I used can be found

[PATCH 3/6] crypto: some common 128-bit block operations, nicely centralized

2006-08-31 Thread Rik Snel
128bit is a common blocksize in linux kernel cryptography, so it helps to centralize some common operations. The data must be aligned at sizeof(int) for decent performance. The code, while mostly trivial, is based on a header file mode_hdr.h in http://fp.gladman.plus.com/AES/modes.vc8.19-06-06.zip

[PATCH 4/6] crypto: table driven multiplications in GF(2^128), needed by LRW (and in the future ABL)

2006-08-31 Thread Rik Snel
WARNING: untested on bigendian, please test. A lot of cypher modes need multiplications in GF(2^128). LRW, ABL, GCM... I use functions from this library in my LRW implementation and I will also use them in my ABL (Arbitrary Block Length, an unencumbered (correct me if I am wrong, wide block cipher

LRW implementation, please comment

2006-08-31 Thread Rik Snel
Hello Herbert (cc: list), This is an attempt at implementing LRW for the new blockcipher API. Please review, test and comment. I intend to implement ABL also (arbitrary block length), an unencumbered wide block cipher mode (it is based on GMC (Galois/Counter Mode) which is explicitly claimed to