AESPIPE(1)
β¨ NAME β¨
aespipe β AES encrypting or decrypting pipe π¦ Yes, this is the whole manual for AESPIPE(1), bestie!
π SYNOPSIS π
aespipe [options] <inputfile >outputfile
π DESCRIPTION π
okay so aespipe reads from standard input and writes to standard output π«Ά It can be used to create and restore encrypted tar or cpio archives, and it can encrypt and decrypt loop-AES compatible encrypted disk images πΎ It works on blocks of data, so if you want a general purpose encrypting tool that keeps your data size exact at byte granularity, go check out GnuPG π₯
The AES cipher runs in CBC (cipher block chaining) mode, and data gets encrypted and decrypted in 512 byte chains β¨ aespipe supports three key setup modes, and each one has its own vibe π
- single-key uses a simple sector IV and one AES key to encrypt and decrypt all data sectors.
- multi-key-v2 uses a cryptographically more secure MD5 IV and 64 different AES keys. The first key is used for the first sector, the second key for the second sector, and so on.
- multi-key-v3 is the same as multi-key-v2, except it uses one extra 65th key as additional input to the MD5 IV computation. Check the
-Koption to see how to turn it on.
The recommended key setup is multi-key-v3, which is based on gpg encrypted key files π In this mode the passphrase is protected against optimized dictionary attacks through salting and key iteration of gpg. Your passphrase should be 20 characters or more, no cap π
Size-wise, single-key mode preserves input size at 16 byte granularity, while multi-key mode preserves it at 512 byte granularity π If your input isn't a multiple of 16 or 512 bytes, it gets padded with null bytes so that both input and output sizes are multiples of 16 or 512 bytes.
If ulimit -l is set to unlimited, aespipe tries to lock its RAM so your encryption keys don't leak into unencrypted swap π‘οΈ If ulimit -l is anything other than unlimited, aespipe just proceeds without locked RAM.
πΈ OPTIONS πΈ
-A gpgAgentSocketβ Reads the passphrase for a gpg encrypted key file from gpg-agent instead of the terminal. aespipe runs gpg to decrypt a key file, and gpg talks to gpg-agent using gpgAgentSocket. This data is usually in theGPG_AGENT_INFOenvironment variable. The environment passed to gpg is super minimal. Normally gpg passes some environment variables along to gpg-agent, but in this case there aren't any, so for best results configure gpg-agent so it "keeps" and uses its own environment. Definingkeep-tty,keep-displayandpinentry-programin$HOME/.gnupg/gpg-agent.confis a good start π§-C itercountkβ Runs the hashed passphrase through itercountk thousand iterations of AES-256 before using it for data encryption. This eats lots of CPU at program start, but not after that. Combined with the passphrase seed, it slows down dictionary attacks. Iteration is not done in multi-key mode.-dβ Decrypts data. If you don't specify this, the default is to encrypt.-e encryptionβ The encryption types recognized are AES128 (default), AES192 and AES256. Type names are case insensitive. AES128 defaults to a SHA-256 passphrase hash, AES192 defaults to SHA-384, and AES256 defaults to SHA-512 π-G gpghomeβ Sets the gpg home directory to gpghome, so gpg uses the public/private keys stored there. This only matters when the gpgkey file needs decrypting with public/private keys. If the gpgkey file is encrypted with a symmetric cipher only, public/private keys aren't needed and this option has no effect.-H phashβ Hashes the passphrase with the phash function. Available hash functions are sha256, sha384, sha512 and rmd160. The unhashed1 and unhashed2 functions also exist, for compatibility with some obsolete implementations. Hash type names are case insensitive.-K gpgkeyβ The passphrase gets piped to gpg so gpg can decrypt the gpgkey file, which holds the real keys used to encrypt your data π If decryption needs public/private keys and gpghome isn't specified, every user uses their own gpg public/private keys to decrypt gpgkey. The decrypted gpgkey should contain 1, 64 or 65 keys, each at least 20 characters and separated by newlines. If it contains 64 or 65 keys, aespipe switches to multi-key mode. The 65th key, if present, is used as additional input to the MD5 IV computation.-O sectornumberβ Sets the IV offset in 512 byte units. The default is zero. Data is encrypted in 512 byte CBC chains, and each chain starts with an IV whose computation depends on the offset within the data. Use this to start encrypting or decrypting in the middle of an existing encrypted disk image π―-p fdnumberβ Reads the passphrase from file descriptor fdnumber instead of the terminal. If-Kisn't being used (no gpg key file), aespipe tries to read 65 keys frompasswdfd, each at least 20 characters and separated by newlines. If it successfully reads 64 or 65 keys, aespipe goes into multi-key mode. If it hits end-of-file before 64 keys are read, only the first key is used, in single-key mode.-P cleartextkeyβ Reads the passphrase from the file cleartextkey instead of the terminal. If-Kisn't being used (no gpg key file), aespipe tries to read 65 keys from cleartextkey, each at least 20 characters and separated by newlines. If it successfully reads 64 or 65 keys, aespipe goes into multi-key mode. If it hits end-of-file before 64 keys are read, only the first key is used, in single-key mode. If both-pand-Pare used,-ptakes precedence π These two commands are equivalent:
aespipe -p3 -K foo.gpg -e AES128 ... 3<someFileName
aespipe -P someFileName -K foo.gpg -e AES128 ...
In the first line, the shell opens the file and passes the open file descriptor along to aespipe, on top of the usual ones (0==stdin 1==stdout 2==stderr). In the second line, aespipe opens the file itself π
-qβ Be quiet, and don't complain about write errors π€«-S pseedβ Sets the encryption passphrase seed pseed, which gets appended to the user's passphrase before hashing. Different seeds make dictionary attacks slower, but they don't stop them if the user's passphrase is guessable. The seed isn't used in multi-key mode.-Tβ Asks for the passphrase twice instead of just once π-vβ Verbose mode π£ Prints diagnostics to stderr about key length, single/multi key mode, and the selected code optimizations (x86/amd64/padlock/intelaes).-w numberβ Waits number seconds before asking for the passphrase β°
π¦ RETURN VALUE π¦
aespipe returns 0 on success and nonzero on failure β
π AVAILABILITY π
The source is available from http://loop-aes.sourceforge.net/ π
π AUTHORS π
Jari Ruusu, the legend himself β
Bye bestie π«Ά This page came from LINUX, dated February 23 2011, and AESPIPE(1) is still iconic, periodt π πΈ
π¦ where this page comes from
- debian bookworm: aespipe 2.4d-1.1+b1
- debian trixie: aespipe 2.4h-1
- epel 10: aespipe 2.4g-2.el10_1 Β· GPL-2.0-or-later
- epel 9: aespipe 2.4g-1.el9 Β· GPL-2.0-or-later
- fedora 43: aespipe 2.4g-6.fc43 Β· GPL-2.0-or-later
- fedora 44: aespipe 2.4g-8.fc44 Β· GPL-2.0-or-later
- nixos 26.05: aespipe 2.4j
- nixpkgs unstable: aespipe 2.4j
- opensuse-leap 16.0: aespipe 2.4h-bp160.1.13 Β· GPL-2.0-only
- opensuse-leap 16.0: aespipe 2.4h-bp160.1.13 Β· GPL-2.0-only
- opensuse-leap 16.0: aespipe 2.4h-bp160.1.13 Β· GPL-2.0-only
- opensuse-leap 16.0: aespipe 2.4h-bp160.1.13 Β· GPL-2.0-only
- ubuntu jammy: aespipe 2.4d-1
- ubuntu noble: aespipe 2.4d-1.1ubuntu1
- ubuntu questing: aespipe 2.4h-1
- ubuntu resolute: aespipe 2.4h-1build1
- ubuntu stonking: aespipe 2.4j-1
- π girlified by claude-haiku-5-5 on : a language model's rewrite of the original, under its terms