Re: [CryptoAPI-devel] Re: cryptoloop 2.6 "backport" for 2.4.22-rc2

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



At HVR's request I've worked my way through the new patches and
set up. There's a bit of work remaining to be done, but the good
news is that it does work on a loopback file created on a 2.4.18
system. Here's a summary of what is required, at this time, to
get it "sort-of" working with a Debian woody dist.

Build a 2.4.22rc2 kernel. First off I did:

 tar jxf linux-2.4.21.tar.bz2
 cd linux-2.4.21
 patch -p1 < ../patch-2.4.22-rc2

Then I applied:
                
 patch -p1 < ../patch-cryptoloop-jari-2.4.22-rc2.0 
 patching file crypto/Config.in
 patching file drivers/block/Config.in
 patching file drivers/block/cryptoloop.c
 patching file drivers/block/loop.c
 patching file drivers/block/Makefile
 patching file include/linux/loop.h

 patch -p1 < ../patch-aes-asm-2.4.22-rc2.0 
 patching file crypto/aes-i586-asm.S
 patching file crypto/aes-i586-glue.c
 patching file crypto/Config.in
 Reversed (or previously applied) patch detected!  Assume -R? [n] 

The conflict is due to the same bit of Config.in showing
up in both patches. I edited the overlap out of
patch-aes-asm-2.4.22-rc2.0 and re-ran the patches by skipping
the first two hunks and letting the 3rd get applied.

Download all of the materials for building a new util-linux-2.12:

 wget http://ftp.cwi.nl/aeb/util-linux/util-linux-2.12.tar.gz
 wget http://www.stwing.org/~sluskyb/util-linux/hashalot.tar.bz2
 wget http://www.stwing.org/~sluskyb/util-linux/losetup-keygen-prog-mk3.patch
 wget http://www.stwing.org/~sluskyb/util-linux/losetup-variable-key-size-mk2.patch
 tar zxf util-linux-2.12.tar.gz 
 cd util-linux-2.12/
 ./configure
 make

Some build problems, I wonder if this is a version dependency in the
developer packages. I'm using the debian woody dist on this machine.

 sundries.c: In function `use_keygen_prog':
 sundries.c:343: unknown field `sa_handler' specified in initializer
 sundries.c:343: warning: missing braces around initializer
 sundries.c:343: warning: (near initialization for `sa.__sigaction_handler')
 sundries.c:344: unknown field `sa_flags' specified in initializer
 sundries.c:370: warning: assignment discards qualifiers from pointer target type
 make: *** [sundries.o] Error 1

sundries.c is needed for mount. However I can build just
losetup:

 cd util-linux-2.12/mount/
 make losetup

Gets me a new losetup. I can get buy with the standard debian 
woody mount by doing a two stage mount of old loopback file.
I did not install because that would wreck my system. I executed
all files in place.

Build the hashalot program and put it where the test will
occur:

 cd /usr/src/hashalot
 make
 cp -a hashalot  ../util-linux-2.12/mount/
 cp -a ripemd160 ../util-linux-2.12/mount/
 cd ../util-linux-2.12/mount/

This works:

  ./ripemd160 | ./losetup -p0 -e aes-cbc-256 /dev/loop3 /dma/home/amon/data
  mount /dev/loop3 /mnt

This doesn't:
  ./hashalot rmd160 | \
	./losetup -p0 -e aes-cbc-256 /dev/loop3 /dma/home/amon/data
  unknown hash type requested
  USAGE:
                hashalot _hashtype_
        OR
                _hashtype_

Question: is proper care taken in hashalot to ensure plaintext
          security? Is memory containing plaintext locked in
          memory so it cannot be swapped out?
-
Linux-crypto:  cryptography in and on the Linux system
Archive:       http://mail.nl.linux.org/linux-crypto/


[Index of Archives]     [Kernel]     [Linux Crypto]     [Gnu Crypto]     [Gnu Classpath]     [Netfilter]     [Bugtraq]
  Powered by Linux