Okay, umm… this might seem off-topic, but hear me out on this one.
Imagine that you have text in your map that you want to encrypt, to make it into an interesting puzzle. But you don’t want to use a weak cipher and need strong cryptography.
This is where GnuPG comes in. GnuPG, often shortened to GPG, is an implementation of PGP created by the Free Software Foundation. It makes complex cryptography very easy-to-use.
First of all, you obviously need to install it.
On Debian, Ubuntu, and other Debian-based linux distributions, you can just use a single command to install it (take that, windows users!): sudo apt install gnupg
If you are on Windows, gpg4win is probably what you want (it’s linked to on the official GnuPG website), although I haven’t personally used it before.
Passphrase-based Encryption
This is the easiest-to-understand thing you can do with GnuPG, and for encrypted text in maps this is probably what you want.
Here’s an example:
gpg --output output.gpg --symmetric --quiet --armor --cipher-algo AES256 --compress-algo none message.txt
Here’s a breakdown of the command-line flags:
--output output.gpg
sets the output file path tooutput.gpg
- This is where the encrypted version will be stored.--symmetric
tells GnuPG that we want to encrypt a file with symmetric encryption--quiet
prevents GnuPG from showing other information (warnings, etc.) that we don’t care about. Feel free to remove this if you want to have some extra fun!--armor
switches the output encoding from a binary encoding format to a text-based one which uses Base64.--cipher-algo AES256
sets the encryption algorithm to AES-256. As of writing this AES-256 is most likely what you want to use.--compress-algo none
turns off compression. If you are encrypting large files, changenone
tozlib
, as it will reduce the output size in many cases.message.txt
is the name of the input file to encrypt.
For more information I would actually recommend reading the guide by NASA on using GnuPG for symmetric encryption.
Examples
Hello, World!
, encrypted with the passphrase password
using AES-256 and no compression:
-----BEGIN PGP MESSAGE-----
jA0ECQMC/hR8RLQScIb/0k4BJh+u63kCDVjxQEMWA/Y8TNc1IyxWKbdN4ZPooKIY
V7tmA58EkQQObELHKwVPGTV3cv71KIylR3fQ1XdoEQtgQN9Ick+dNx+P3AorjYI=
=97vM
-----END PGP MESSAGE-----