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
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.
Source Distribution
File details
Details for the file secs-0.2.0.tar.gz
.
File metadata
- Download URL: secs-0.2.0.tar.gz
- Upload date:
- Size: 5.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 2ead3ad83af43768754f2d756cd25edbb1eb1db69fc6e53dd0575e22ca1aadf5 |
|
MD5 | 114838ff50d73c0953fbe0c96b7476eb |
|
BLAKE2b-256 | 30518aabf76d54170c3e535574ecfcf695da1edb4715abecd60a2ce922a6914b |