ejrnl26 Dec 2016
About a year ago, I was a heavy user of Day One. I think that journaling is very beneficial. I stopped because I didn’t feel comfortable with having my private thoughts so readily available to employees or hackers. Initially, I needed to trust Dropbox but, I definitely don’t anymore. More recently, Day One set up their own sync solution and they’ve been working on adding encryption but, it still hasn’t been released. I also no longer utilize MacOS, so I needed something else. I couldn’t find something that worked exactly how I wanted it, so I built it myself. I called it ejrnl, for encrypted journal.
ejrnl is a command line utility for creating encrypted journals. It is written in Go and it utilizes Go’s standard library’s implementation of cryptography. It utilizes scrypt for generating the encryption key and it utilizes authenticated encryption with aes-128 being the algorithm. It should work on any un*xy system.
I put a lot of thought into designing the file format. It is designed to be synced between machines using some sort external process, i.e. Dropbox. I happen to use Nextcloud but any sync service should work fine. Due to this, I tried to design the storage system around problems that I’ve experienced in the past. Typically, what I’ve seen is file syncing being delayed or conflicting edits. Therefore, the format is designed to reduce the chance of conflicts. As such, each journal entry is stored as its own file. Since entries aren’t modified on multiple devices often, this should prevent most conflicts from happening. As lots of entries are added, rereading every entry to sort them by date would be extremely expensive. To speed this up, there is an index file that indexes every entry by its date. As this file is encrypted, everytime it changes, its contents are completely changed. This makes it very likely to encounter conflicts. As this is a probable outcome, this file can be regenerated as needed.
ejrnl is currently very light on features. It currently has the minimum features for me to be able to use it. I have many plans for features that I would like to add in the future. If you’ve been looking for an app to make an encrypted journal, please take a look at ejrnl.