Mercurial > backup
changeset 11:e15c393dffa8
added pipelined encryption layer.
author | Robert McIntyre <rlm@mit.edu> |
---|---|
date | Mon, 25 Feb 2013 15:34:01 +0000 |
parents | 07bb57b65da1 |
children | d5e1419ed984 |
files | cd-burn.pl cd-mount.sh |
diffstat | 2 files changed, 10 insertions(+), 3 deletions(-) [+] |
line wrap: on
line diff
1.1 --- a/cd-burn.pl Mon Feb 25 14:15:13 2013 +0000 1.2 +++ b/cd-burn.pl Mon Feb 25 15:34:01 2013 +0000 1.3 @@ -20,11 +20,13 @@ 1.4 $size = `mkisofs -print-size @mkisofs_args 2>/dev/null`; 1.5 chomp($size); 1.6 1.7 -@burn_command = ("cdrecord", "gracetime=3", 1.8 +@burn_command = ("cdrecord", "gracetime=3", "-v", 1.9 "-overburn", "tsize=".$size."s", "-data", "-"); 1.10 1.11 +@aes_loop_command = ("aespipe", "-P", "/etc/cd-key", "-e", "aes256"); 1.12 1.13 -$final_command = "mkisofs @mkisofs_args | @burn_command"; 1.14 + 1.15 +$final_command = "mkisofs @mkisofs_args | @aes_loop_command | @burn_command"; 1.16 1.17 print "$final_command\n"; 1.18 system($final_command);
2.1 --- a/cd-mount.sh Mon Feb 25 14:15:13 2013 +0000 2.2 +++ b/cd-mount.sh Mon Feb 25 15:34:01 2013 +0000 2.3 @@ -1,4 +1,9 @@ 2.4 #!/bin/sh 2.5 2.6 -mount -v -t iso9660 /dev/cdrom "$1" 2.7 2.8 +cryptsetup loopaesOpen /dev/cdrom encrypted_cd --key-size 256 \ 2.9 + --key-file /etc/cd-key 2.10 + 2.11 +mount /dev/mapper/encrypted_cd "$1" 2.12 + 2.13 +