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 > > + dm-crypt cipher string

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 **argv) > > char *ivopts; > > u

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

2009-12-28 Thread Richard Zidlicky
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 > + dm-crypt cipher string aes-lmk2-plain64-multi:64 (for Loop-AES > + v2.x) or aes-lmk2-plai

Re: Crypto test results unused?

2009-12-28 Thread Krzysztof Halasa
Krzysztof Halasa writes: > is the core crypto code supposed to "kill" algorithms which fail the > test? > > On little-endian IXP4xx 3 hardware-assisted algorithms fail (due to > apparently unrelated bug which I will take care of). It seems the kernel > is still using these failing algorithms (my

Re: Crypto test results unused?

2009-12-28 Thread Krzysztof Halasa
> int crypto_register_alg(struct crypto_alg *alg) > { > struct crypto_larval *larval; > int err; > > err = crypto_check_alg(alg); > if (err) > return err; > > down_write(&crypto_alg_sem); > larval = __crypto_register_alg(alg); > up_write(&cryp

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

2009-12-28 Thread Milan Broz
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 **argv) > char *ivopts; > unsigned int key_size; > unsigned long long tmpll; > + char c

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

2009-12-28 Thread Max Vozeler
This is a compatible implementation of the block chaining modes used by the Loop-AES block device encryption system (http://loop-aes.sf.net/). It implements two modes: lmk2 and lmk3. They correspond to the modes used in Loop-AES v2.x and Loop-AES v3.x and are intended to be full compatible. Both

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

2009-12-28 Thread Max Vozeler
The original code used cc->cipher for two things: (a) It starts out containing the cipher mode string ("xts(aes)") used to get the ablkcipher. (b) Then it gets overwritten to contain just the plain cipher string ("aes") used to allocate the plain cipher for essiv and for display by dm status. So

[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 Cc: Jari R

[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

Crypto test results unused?

2009-12-28 Thread Krzysztof Halasa
Hi, is the core crypto code supposed to "kill" algorithms which fail the test? On little-endian IXP4xx 3 hardware-assisted algorithms fail (due to apparently unrelated bug which I will take care of). It seems the kernel is still using these failing algorithms (my debugging code adds extra fields