View Poll Results: Did you find this tutorial useful?

Voters
5. You may not vote on this poll
  • yes

    5 100.00%
  • no

    0 0%
Results 1 to 7 of 7

Thread: HOWTO Encrypt CD/DVDs

  1. #1
    Join Date
    Dec 2006
    Location
    Florida
    Beans
    43
    Distro
    Ubuntu 8.04 Hardy Heron

    HOWTO Encrypt CD/DVDs

    HOWTO Encrypt CD/DVDs in Ubutnu

    Hello everyone this is my first HOWTO i am writing based on this link
    http://tinyurl.com/36auez. I find it pretty useful if you have sensitive data u want to encrypt and burn to a cd or dvd for backup purposes. I know there is a program called truecrypt but because i only run ubuntu i found that truecrypt is a little hard to use from the CLI. The GUI called forcefield i find kinda clunky so this method works best for me unfortunately this method only works on linux and is not cross platform. I hope some other people will find it useful so lets get started shall we. If u decide to use 128bit please use the 128bit commands otherwise use the 256bit commands

    first we need to get the necessary tools
    Code:
    sudo aptitude install aespipe mkisofs loop-aes-utils
    I also recommend making a directory in media so we have a mount point for the iso.
    Code:
    sudo mkdir /media/iso
    Creating the CD/DVD image
    Lets first make a directory in your home folder we will call it encrypt.
    Code:
    "mkdir encrypt"
    Now go ahead and drop the files u want to burn into the directory. We are using AES encryption you can choose from 128 or 256 bit encryption

    128bit command
    Code:
    mkisofs -r encrypt | aespipe -e aes128 > encrypt.iso
    or

    256bit command
    Code:
    "mkisofs -r encrypt | aespipe -e aes256 > encrypt.iso"
    It will now ask for a password i recommend at least a 20+ character password remember it or else you will lose your data.

    Mounting the image
    First we need to load some modules.
    Code:
    sudo modprobe aes
    Code:
    sudo modprobe cryptoloop
    128bit command
    Code:
    sudo mount -t iso9660 encrypt.iso /media/iso -o loop=/dev/loop0,encryption=aes128
    or

    256bit commad
    Code:
    sudo mount -t iso9660 encrypt.iso /media/iso -o loop=/dev/loop0,encryption=aes256
    You can now burn the image but i found if i use the nautilus cd burner it may give you a error stating its a invalid image. I'm not sure if it was just my box or not but if you get the error i recommend using gnomebaker as i was able to successfully burn the image without a problem i did not test it with k3b.

    Mounting the new CD/DVD
    Make sure you loaded the required modules.
    Code:
    sudo modprobe aes
    Code:
    sudo modprobe cryptoloop

    The command to mount the CD/DVD

    128bit command
    Code:
    sudo mount -t iso9660 /dev/cdrom /media/iso -o loop=/dev/loop0,encryption=aes128
    or

    256bit command
    Code:
    sudo mount -t iso9660 /dev/cdrom /media/iso -o loop=/dev/loop0,encryption=aes256
    Then simply enter your password you entered when you created the iso and you should see your sensitive data.

    Tested on ubuntu 7.04 32bit i did not test it on any other version of ubuntu but it should work. I do support this thread so if u need help let me know.

  2. #2
    Join Date
    Dec 2006
    Location
    Toronto, Ontario
    Beans
    76

    Re: HOWTO Encrypt CD/DVDs

    Thanks.

    How would I do this on the fly? I have like 20 dvds that I want to encrypt. DVD -> encrypted ISO on hd

    Also how would I make it read the same password? Like I want to make sure I don't type it wrong. Preferably read it off a text file.

    Is there any equivalent program to open these ISO's on windows?
    Last edited by db9s; November 20th, 2007 at 05:12 AM.

  3. #3
    Join Date
    Dec 2006
    Location
    Toronto, Ontario
    Beans
    76

    Re: HOWTO Encrypt CD/DVDs

    Also what is the most cross platform method? I want to be able to open these burned ISO's on Windows. Things get a little trickier because the entire CD is encrypted instead of a single file/folder so it doesn't mount properly in Windows in the first place. Is there any program to decrpyt in Windows?

  4. #4
    Join Date
    Mar 2007
    Location
    $HOME (Washington State)
    Beans
    4,590

    Re: HOWTO Encrypt CD/DVDs

    You could always make a shell script which executes all of the commands for you. That will pretty much automate the process.
    See my themes here! | Dont preach Linux, mention it | Make GNOME Themes
    I'm no longer on here. If you want to talk to me, go to noost.org.
    My DeviantArt | Linux user #461096 | Ubuntu user #15753

  5. #5
    Join Date
    Nov 2007
    Beans
    82
    Distro
    Ubuntu

    Re: HOWTO Encrypt CD/DVDs

    thanks

  6. #6
    Join Date
    Dec 2006
    Location
    Toronto, Ontario
    Beans
    76

    Re: HOWTO Encrypt CD/DVDs

    yeah but for the password field, it gets a little weird. How do I feed in an input from a shell script? Like it prompts for a password after I run "mkisofs -r encrypt | aespipe -e aes128 > encrypt.iso"

    so how do I feed it a password from a shell script?
    Last edited by db9s; November 30th, 2007 at 11:09 PM.

  7. #7
    Join Date
    May 2008
    Beans
    15

    Re: HOWTO Encrypt CD/DVDs

    you can use the -p option in aespipe to specify a file with the password in it, one per line.

    from the man page:

    -p fdnumber
    Read the password from file descriptor fdnumber instead of the terminal. If -K option is not being used (no gpg key file), then aespipe attempts to read 65 keys from passwdfd, each key at least 20 characters and separated by newline. If aespipe successfully reads 64 or 65 keys, then aespipe is put to multi-key mode. If aespipe encounters end-of-file before 64 keys are read, then only first key is used in single-key mode

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •