In this tutorial, we will learn how to create an encrypted iso image containing your data using the terminal under Ubuntu or Linux Mint. We will use the AES (Advanced Encryption Standard) encryption which will help us encrypt the entire disk image. You can later mount and burn the encrypted disk image to a CD or DVD.

Getting Started

Let's first install the Loop-AES command line tools with these commands:

sudo apt-get install loop-aes-utils aespipe 
sudo modprobe cryptoloop

1. Creating An Encrypted Disk Image

The command for creating an encrypted disk image is the following:

genisoimage -quiet -r ~/Desktop | aespipe -T -e aes256 > image.iso

~/Desktop >>> Replace it with the path of the folder containing the data to be added to the iso file

image.iso >>> this is the name of the iso file to be generated. You can set any name of your choice.

You will be prompted to enter a passphrase two times of at least 20 characters. Your iso image is now encrypted and can't be mounted unless the user provides the correct passphrase.

2. Mounting An Encrypted Disk Image

Via the terminal, create a mount point with this command:

sudo mkdir /media/iso

Mount now your iso file with this command:

sudo mount -o loop,encryption=aes256 image.iso /media/iso

After entering your user password, you will be prompted to submit the passphrase associated with the iso file.

3. Burning An Encrypted Disk Image

You can burn your encrypted iso image with any software of your choice. For burning iso files from the terminal, you can use wodim. To list your burning device with wodim, run this command:

wodim --devices

For my system, the burning device is mounted as /dev/sg1

$ wodim --devices
wodim: Overview of accessible drives (1 found) :
 0  dev='/dev/sg1'      rwrw-- :  'Slimtype' 'DVD A DS8A5SH'

So, to burn the iso file, run this command:

wodim dev=/dev/sg1 image.iso

Post a Comment