ENIGMA(1)

πŸ“¦ version 15.1, in freebsd 14.5, freebsd 15.1

πŸ’… ENIGMA(1) β€” like, the whole manual, bestie πŸ’…

okay so this is from your General Commands Manual section, and it's literally the page for enigma and its twin crypt. buckle up πŸŽ€


✨ NAME ✨

enigma, crypt β€” very simple file encryption. that's it. that's the whole vibe. very simple. emphasis on very. πŸ™ˆ


πŸ¦‹ SYNOPSIS πŸ¦‹

enigma [-s] [-k] [password]
crypt [-s] [-k] [password]

like yes, they're the same thing, they're two names for one icon πŸ’…


🌸 DESCRIPTION 🌸

so the enigma utility β€” also known as crypt β€” is a very simple encryption program that works on a "secret-key" basis. it's a filter, meaning it takes a stream of data from standard input, encrypts or decrypts it, and writes the result to standard output. main character energy tbh, it just flows right through πŸ’–

and because its operation is fully symmetrical, if you feed the encrypted data stream back through the engine using the same secret key, it will decrypt it. same key in, plaintext out. slay ✨


πŸ”‘ how do you even give it the key tho

there are several ways to hand the secret key to the program:

  • default behaviour β€” the program prompts you on the controlling terminal for the key, using getpass(3). and this is the only safe way of providing it. no cap. πŸ‘‘
  • as a command-line argument β€” the key can be provided as the sole command-line argument password when you start the program. but obviously, this way the key can easily be spotted by other users running ps(1). 😭
  • via -k and an environment variable β€” enigma can be given the option -k, and it will take the key from the environment variable CrYpTkEy. and while at first glance that seems like it'd be more secure than the previous option... it actually is not, because environment variables can also be examined with ps(1). so this option is mainly provided for compatibility with other implementations of enigma. it's giving "we did it for the lore" tbh πŸ’€

when you specify the option -s, enigma modifies the encryption engine in a way that is supposed to make it a little more secure, but it's incompatible with other implementations. so like, cute, but off-brand πŸ¦‹


⚠️ Warning ⚠️

the cryptographic value of enigma is rather small. like, tiny. this program is only provided here for compatibility with other operating systems that also provide an implementation (usually called crypt(1) there). 🫢

for real encryption, go refer to openssl(1), or gpg(1) (ports/security/gnupg1). please. for me. for us. πŸ™


🧚 ENVIRONMENT 🧚

  • CrYpTkEy β€” used to obtain the secret key when option -k has been given. yes the capitalisation is Like That. type it exactly, bestie, i'm begging πŸŽ€

πŸ“ EXAMPLES πŸ“

okay here's the cute little demo:

man enigma | enigma > encrypted
Enter key: (XXX β€” key not echoed)

this will create an encrypted form of this man page, and store it in the file encrypted. iconic ✨

and then to get it back:

enigma XXX < encrypted

this displays the previously created file on the terminal. round trip complete, no notes πŸ’…


🌈 SEE ALSO 🌈

gpg(1) (ports/security/gnupg1), openssl(1), ps(1), getpass(3) β€” go read those, they're the real ones πŸ”₯


πŸ‘‘ HISTORY πŸ‘‘

implementations of crypt are very common among Unix operating systems. this implementation has been taken from the Cryptbreakers Workbench, which is in the public domain. so it's basically vintage and free, iykyk πŸ¦‹


and that's the whole page!! mwah πŸ’–

this one shipped with Debian and is dated May 8, 2018 β€” so yeah, she's been around, she's iconic, she's seen things. take care of her, and please use gpg for anything that actually matters πŸ«ΆπŸŽ€

πŸ“¦ where this page comes from