LUKS-OPs - Automate the usage of LUKS volumes in Linux

Monday, January 5, 2015


A bash script to automate the most basic usage of LUKS volumes 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.
Basic Usage

There is an option for a menu:
./luks-ops.sh menu or simply ./luks-ops.sh

Other options include:
./luks-ops.sh new disk_Name Size_in_numbers
./luks-ops.sh mount /path/to/device (mountpoint) 
./luks-ops.sh unmount-all
./luks-ops.sh clean
./luks-ops.sh usage

Default Options:
  • 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 :D)
  • Mounting point = /media/luks_* where * is random-string.
  • Others.. NB. You can change /dev/urandom to /dev/zero (speed?)
Dependencies (Install applications:)
  1. dmsetup --- low level logical volume management
  2. cryptsetup --- manage plain dm-crypt and LUKS encrypted volumes



Subscribe via e-mail for updates!