Skip to main content

AES Pipe

This application/library is for encrypting piped data and was mainly developed to be used with limittar for space efficient data encryption using pipes to remove the need for temporarily storing the potentially large archives and encrypted data.

Requirements

  • Python 3.4+
  • PyCrypto

Installation

From the Python Package Index:

pip install aes-pipe

Or download and run:

python3 setup.py install

Usage

Use the -h argument for help:

aes-pipe -h

Encrypting data

If no key command is specified, the user is prompted for a passphrase.

cat something.tar | aes-pipe > encrypted_tar

Encrypting files spanned across multiple Blu-Ray discs

find /path/photos/ -print0 > files

limittar -0 -i files -l remaining1 -s 25025314784 | aes-pipe | cdrskin -v driveropts=burnfree -tao dev=/dev/sr0 -
limittar -0 -i remaining1 -l remaining2 -s 25025314784 | aes-pipe | cdrskin -v driveropts=burnfree -tao dev=/dev/sr0 -
...

As the remaining file list is output before the encryption ends, multiple discs can be written to at once.

Note that aes-pipe.py prepends a 32 byte nonce to the encrypted output data in this case which needs to be calculated into the size limit of the tar.

Decrypting files from discs

Using the Blu-Ray discs created in the example above, the following line can be run for each disc.

cat /dev/sr0 | aes-pipe -d | tar -xf -

Files will be output with their original paths.

Decrypt only specific files and directories

This is useful for recovering deleted items from a backup. Until the items are found, this will need to be run on each storage area across which the encrypted data was spanned.

cat /dev/sdX | aes-pipe -d | tar -C path/to/output/dir/ -xf - "path/of/dir in archive/" path/of/a_file.png

Encryption with a GPG public key

Output encrypted key file

cat something.tar | aes-pipe -c "gpg --output encrypted_key.gpg --encrypt --recipient email@example.com" > encrypted_tar

This pipes the encryption key and nonce to the gpg application. This also means that the nonce is not prepended to the encrypted output which means the output data size is the same as the input data size.

Use encrypted key file

cat encrypted_tar | aes-pipe -d -c "gpg --decrypt encrypted_key.gpg" > something.tar

Metadata

Release files for aes-pipe 1.0.3

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for aes-pipe 1.0.3
File Size Uploaded
aes-pipe-1.0.3.tar.gz 4.5 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for aes-pipe 1.0.3
File Interpreter ABI Platform
aes_pipe-1.0.3-py3-none-any.whl Python 3 none any Details

Total release size: 9.8 kB

Release files / aes-pipe-1.0.3.tar.gz

Download URL aes-pipe-1.0.3.tar.gz
Size 4.5 kB
Tags Source
SHA-256 checksum
How to use checksums
20a0b8948ac0b250a9efa87e90272e0c6790b0f46b109f46f52148e0bc76adfa
BLAKE2b-256 checksum
How to use checksums
bfdfc38cb269718f7c70b5d94d949d8129f3f229fb96e38f8e27da2529266fa9
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/1.11.0 pkginfo/1.4.2 requests/2.19.1 setuptools/39.2.0 requests-toolbelt/0.8.0 tqdm/4.24.0 CPython/3.6.6

Release files / aes_pipe-1.0.3-py3-none-any.whl

Download URL aes_pipe-1.0.3-py3-none-any.whl
Size 5.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
735f2c60c6f2f2b974da5ea7f2941cafd1fa37513f1f85c5573500931e08def5
BLAKE2b-256 checksum
How to use checksums
d9d406c9577d0216e43bdba8a71d27553a0f4d312adc5426620079ec15dbd5c8
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/1.11.0 pkginfo/1.4.2 requests/2.19.1 setuptools/39.2.0 requests-toolbelt/0.8.0 tqdm/4.24.0 CPython/3.6.6

Release history Release notifications | RSS feed

This release

1.0.3 This release

2 release files

1.0.2

2 release files

1.0.1

2 release files

1.0.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page