[Pkg-loop-aes-commits] r1332 -
/trunk/loop-aes-utils/debian/loop-aes-keygen
xam at users.alioth.debian.org
xam at users.alioth.debian.org
Fri Nov 24 21:21:27 CET 2006
Author: xam
Date: Fri Nov 24 21:21:26 2006
New Revision: 1332
URL: http://svn.debian.org/wsvn/pkg-loop-aes/?sc=1&rev=1332
Log:
Update multi-key check based on feedback by people on
linux-crypto at nl.linux.org
Modified:
trunk/loop-aes-utils/debian/loop-aes-keygen
Modified: trunk/loop-aes-utils/debian/loop-aes-keygen
URL: http://svn.debian.org/wsvn/pkg-loop-aes/trunk/loop-aes-utils/debian/loop-aes-keygen?rev=1332&op=diff
==============================================================================
--- trunk/loop-aes-utils/debian/loop-aes-keygen (original)
+++ trunk/loop-aes-utils/debian/loop-aes-keygen Fri Nov 24 21:21:26 2006
@@ -139,7 +139,16 @@
check_multikey_support ()
{
- strings /sbin/losetup | grep -q -s multi-key-v$1
+ match=
+ case $1 in
+ 1)
+ return 0;;
+ 2)
+ match="multi-key";;
+ 3)
+ match="multi-key-v3";;
+ esac
+ grep -q -a "$match" /sbin/losetup
}
keygen()
@@ -153,10 +162,14 @@
# v2.x 64 2880 bytes(45 * 64) AES keys
# v3.x 65 2925 bytes(45 * 65) #65 is md5 seed
case $version in
- 1) nkeys=1 ;;
- 2) nkeys=64 ;;
- 3) nkeys=65 ;;
- *) return 1 ;;
+ 1)
+ nkeys=1;;
+ 2)
+ nkeys=64;;
+ 3)
+ nkeys=65;;
+ *)
+ return 1;;
esac
bytes=$((45*$nkeys))
More information about the Pkg-loop-aes-commits
mailing list