Simple encrypted containers
Project description
Simple Encrypted Container Setup (SECS) is based on Linux Unified Key Setup (LUKS). Because good Linux Unified Key Setups mean great Simple Encrypted Container Setups.
Purpose
If you are unfamiliar with LUKS encryption, it is most commonly used to encrypt entire disk partitions on Linux. However, it is also capable of encrypting files which can be mounted as a loop device, allowing you to create portable encrypted containers to keep different types of sensitive data isolated.
This script is a wrapper to simplify the steps required to create and use these containers.
Installation
SECS can be installed using pip.
$ sudo pip install secs
# or
$ pip install --user secs
Either command will install a script called secs which provides all the functionality.
Examples
Root access (via sudo) is required for all commands. The script that is installed will call sudo for you.
Create a container. The number is the size in megabytes.
$ secs create work_stuff 100
...
$ ls -Ap
work_stuff
Open a container. The default moves the container to .<container> and mounts to the container path. Use -m to set an explicit mount path.
$ secs open work_stuff
...
$ ls -Ap
work_stuff/ .work_stuff
Close a container. The default unmounts from the container path and moves the container back to it’s original path. -m to set the mount path is required if it was used when the container was opened.
$ secs close work_stuff
...
$ ls -Ap
work_stuff
Expand a container. The number is the amount in megabytes to increase the size of the container by.
$ secs expand work_stuff 10
Implementation
secs is written in Python and is based on the LUKS specification. It requires that cryptsetup be available. It is currently written to use ext4 as the container filesystem. As such, this script will likely only work on Linux systems.
There are no external Python dependencies. The script may be freely copied anywhere, as long as Python 2 or 3 is available.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.