tag: encryption

AES encryption with Java

20 Mar, 2018 - 3 minutes

The following code is for encrypting short messages (it acts on byte arrays and not streams so the whole message needs to fit in memory). It creates a random Initialisation Vector (IV) for each message which is prepended to the start of the encrypted stream.

GPG With Multiple Recipients

22 Mar, 2015 - 3 minutes

This is how to store sensitive information (e.g. SSL key passphrases) in a GPG encrypted file with multiple recipients. If you’re using git to store the file (which you probably should be), always do a git pull before doing any changes. These files are binary and therefore merges are very difficult otherwise.