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

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:

./ menu or simply ./

Other options include:

./ new disk_Name Size_in_numbers
./ mount /path/to/device (mountpoint)
./ unmount-all
./ clean
./ 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

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s