Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Yes more tests

  • Loading branch information...
commit 8a9cb8713513185946effef94b454b7af5f0fd46 1 parent ab61887
@thomasfrivold authored
Showing with 17 additions and 7 deletions.
  1. +2 −0  LUKSUS
  2. +15 −7 LUKSUS.functions
View
2  LUKSUS
@@ -73,7 +73,9 @@ DISPLAYLOGO
ASKUSERVERIFY
LOOPBACKMETHOD
DONTSHREDIFLOOPBACK
+CREATEKEYFILE
LUKSUS1TRUECRYPT
+LUKSUS1TRUECRYPTKEYFILE
LUKSUS2LUKS
LUKSUS2LUKSPASSPHRASE
LUKSUS3LUKSVERIFY
View
22 LUKSUS.functions
@@ -120,6 +120,17 @@ echo SERIOUSLY - LAST CHANCE
read || exit
}
+CREATEKEYFILE()
+{
+if [[ $USEKEY == true ]];
+then
+echo Creating key
+# generate a keyfile using completely random data
+dd if=/dev/urandom of=$keyfile bs=512 count=256
+else
+echo ...
+fi
+}
LUKSUS1TRUECRYPT()
{
@@ -138,9 +149,9 @@ fi
LUKSUS1TRUECRYPTKEYFILE()
{
# Begin the encryption - with TrueCrypt and with key?
-if [[ $ENCRYPTION == TRUECRYPT ]] && [[ $USEKEY == TRUE ]];
+if [[ $ENCRYPTION == TRUECRYPT ]] && [[ $USEKEY == true ]];
then
-echo TrueCrypt mode
+echo TrueCrypt mode and adding a keyfile
# had to remove --map=$name
tcplay --create --device=$device --cipher=AES-256-XTS --keyfile=$keyfile
else
@@ -151,11 +162,8 @@ fi
LUKSUS2LUKS()
{
# Begin the encryption - with LUKS and with a keyfile?
-if [[ $USEKEY = true ]];
-#if [[ $USEKEY == true ]] && [[ $ENCRYPTION == LUKS ]] ;
+if [[ $ENCRYPTION == LUKS ]] && [[ $USEKEY = true ]];
then
-# generate a keyfile using completely random data
-dd if=/dev/urandom of=$keyfile bs=512 count=256
# cryptsetup
# format the drive using encryption
# create an encrypted drive with aes-xts-plain cipher
@@ -278,4 +286,4 @@ WRITEINFORMATIONFILE()
DISPLAYLOGO 1>$keydir/$name.information 2>$keydir/$name.information
DISPLAYSUMMARY 1>>$keydir/$name.information 2>>$keydir/$name.information
ls -l $keydir/$name* 1>>$keydir/$name.information 2>>$keydir/$name.information
-}
+}
Please sign in to comment.
Something went wrong with that request. Please try again.