A bash script to automate the most basic usage of LUKS and Cryptsetup in Linux.
Like:
- Creating a virtual disk volume with LUKS format.
- Mounting an existing LUKS volume
- Unmounting a Single LUKS volume or all LUKS volume in the system.
- Creating a LUKS encrypted filesystem on removable disks (like USBs)
- A replacement for LUKS or Cryptsetup.
- To encrypt my files on Dropbox
- To encrypt some files on my VPS
- To have fun..
There is an option for a menu:
luks-ops.sh menu
Other options include:
1) luks-ops.sh new DISKNAME 512
2) luks-ops.sh mount /path/to/device MOuntPoint
3) luks-ops.sh unmount-all
4) luks-ops.sh clean
5) luks-ops.sh usage
- Will create a virtual-disk named DISKNAME with size 512 MB
- Will mount device at MountPoint
- Will unmount all luks volume mounted
- Will clean all unfinished setups incase of errors (But I recommend using 4)
- Will print help message
- Virtual-disk size = 512 MB and it's created on /usr/ directory
- Default filesystem used = ext4
- Cipher options:
- Creating LUKS1: aes-xts-plain64, Key: 256 bits, LUKS header hashing: sha1, RNG: /dev/urandom
- plain: aes-cbc-essiv:sha256, Key: 256 bits, Password hashing: ripemd160 (about-time 😄)
- Mounting point = /media/luks_* where * is random-string.
- Others.. NB. You can change /dev/urandom to /dev/zero (speed?)
- dmsetup -- low level logical volume management
- cryptsetup -- manage plain dm-crypt and LUKS encrypted volumes
NB: Run as root.
- man cryptsetup (or cryptsetup --help)
- man dmsetup
- Support for multiple user keys
- Remote unlocking LUKS encrypted LVM
- ZSH completion
- [ Include other user requests here ]
The LUKS website at http://code.google.com/p/cryptsetup/
The cryptsetup FAQ, contained in the distribution package and online at http://code.google.com/p/cryptsetup/wiki/FrequentlyAskedQuestions
The cryptsetup mailing list and list archive, see FAQ entry 1.6.
The LUKS on-disk format specification available at http://code.google.com/p/cryptsetup/wiki/Specification