Re: aes.c questions in 2.6.0-test9

From: rblah (deepcover_at_mpx.com.au)
Date: 01/07/04


Date: Wed, 07 Jan 2004 09:01:54 +0000


<tongue in mouth>

Sudden random thought... a good way to circumvent the US's export
restrictions? Just change a define value in a kernel header file ;)

</tongue in mouth>

thrugoodmarshall wrote:
> I am trying to create and use an encrypted file system with
> linux-2.6.0-test9.
>
> I have built my kernel with the appropriate support, mounted a device
> on a loop, created a fs, and mounted the fs, following instructions in
> various documentation:
>
> # losetup -e aes /dev/loop1 /dev/sda1
> password:
> # mke2fs /dev/loop1
> # mount -t ext2 /dev/loop1 /mnt/crypto
>
> And, voila! A filesystem appears over at /mnt/crypto.
>
> unmount the filesystem and decomission the loop:
> # umount /mnt/crypto
> # losetup -d /dev/loop1
>
> Now, I attempt to specify the keysize and repeat the process:
>
> # losetup -e aes256 /dev/loop1 /dev/sda1
> password:
> ioctl: LOOP_SET_STATUS: Invalid argument
>
> First question & related followups:
> What is the syntax to specify the keysize for the aes module in linux?
> And, where might I find this documented? I did not find anything in
> /usr/src/linux/Documentation or on the web / NGs. Util-linux does
> have an example in man losetup(8), but does not specify the syntax of
> keysize.
>
> Inspecting aes.c for comments, I noticed the following lines:
>
> #define AES_MIN_KEY_SIZE 16
> #define AES_MAX_KEY_SIZE 32
>
> #define AES_BLOCK_SIZE 16
>
>
> It looks to me like the module as shipped with the kernel allows a
> maximum keysize of 32 (bits?).
>
> Second question & related:
> Is AES_MAX_KEY_SIZE in aes.c where you specify the maximum keysize (in
> bits?) that aes will use?
> Can I change the maximum key size simply by modifying that line and
> rebuilding?
>
> I understand from reading the docmentation that a keysize of 128 is
> pretty secure, and a keysize of 256 is truly paranoid. Unless there
> is an intolerable performance hit, I intend to use the "truly
> paranoid" option!
>
> Thank you for any assistance you can suggest!



Relevant Pages

  • aes.c questions in 2.6.0-test9
    ... I have built my kernel with the appropriate support, ... What is the syntax to specify the keysize for the aes module in linux? ... Is AES_MAX_KEY_SIZE in aes.c where you specify the maximum keysize (in ...
    (comp.os.linux.security)
  • Re: AES loopback filesystem encryption
    ... length not supported by kernel. ... and I have both the loop and aes modules loaded. ... min keysize: 16 ... another set of instructions. ...
    (Ubuntu)
  • Re: 2.6.24 Kernel Soft Lock Up with heavy I/O in dm-crypt
    ... Will the result of testing a Debian 2.6.24-etchnhalf.1-amd64 kernel ... aes-cbc-essiv:sha256, keysize 128 ... aes-xts-plain, keysize 256 ... without the patch. ...
    (Linux-Kernel)

Loading