Skip to main content

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.

SECS requires root access to run. Note that if you use the second install option, you will likely have to use sudo -E so that Python can find the package.

You may find it convenient to use a simple script like the bash script included in the repo to call sudo for you.

Examples

Root access (e.g. via sudo) is required for all commands.

Create a container. The number is the size in megabytes.

$ sudo 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.

$ sudo 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.

$ sudo 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.

$ sudo 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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

secs-0.2.0.tar.gz (5.2 kB view hashes)

Uploaded Source

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page