Prep & Integration Of Single-file Encryption Ipse Paideia, Archive, Programming, Computers

Prep & Integration Of Single-file Encryption

Today I am tackling the single-file encryption to get away from server dependency and apply enhanced security to single pages of an SSG. After some research, it seems like the best tools for my purposes (offline, filesystem functionality of the site, durability, security, and portability when viewed from other systems via web or local browser) is Staticrypt. This depends on both Node.js and npm… Here we go down another rabbit-hole.

Node.js and npm

StatiCrypt

That should do it?

Integration

I refactored build_script.py to run encryption after Pagefind indexing, because I have Pagefind set up to only index the title and keywords. This allows the search function to find encrypted files, but not reveal the sensitive data within. The encryption password is entered on the command line during script execution. I have tested, searched the Pagefind index, and attempted to break into the resulting site, and it seems highly effective.

The “salt” staticrypt.json file is generated/stored in the development directory, not in the source or destination directories. This is very fragile and will later require modification, but at this time the build script can only be run from the development folder locally, and this is functional. This allows me to continue to develop and assess new features slowly over time, but needs resolution prior to considering packaging for use on another system.

Search Titles & Keywords