Skip to content

dhagrow/secs

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

26 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

SECS

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.

Related

Releases

No releases published

Packages

No packages published