Re: [PATCH] dm-crypt: disable block encryption with arc4

2010-01-25 Thread Mikulas Patocka
BTW. I created a script that tests all possible ciphers, keysizes, chaining modes and iv modes for dm-crypt. arc4 is the only one that fails. You can add it your regression testsuite if you want. Mikulas#!/bin/sh dmsetup remove cr0 set -e cipher="$@" cryptsetup -d key $cipher create cr0 /dev/ram

Re: [PATCH] dm-crypt: disable block encryption with arc4

2010-01-25 Thread Milan Broz
On 01/25/2010 07:29 PM, Mikulas Patocka wrote: > Hi > > When using arc4 to encrypt a block device, the resulting device is > unreliable. It reads garbage. That's because arc4 is a stream cipher, if > you write something, it advances its state and if you attempt to decrypt > the same sector, it

[PATCH] dm-crypt: disable block encryption with arc4

2010-01-25 Thread Mikulas Patocka
Hi When using arc4 to encrypt a block device, the resulting device is unreliable. It reads garbage. That's because arc4 is a stream cipher, if you write something, it advances its state and if you attempt to decrypt the same sector, it uses new state that is different. This patch disables the