HACKER Q&A
📣 dhruvkar

Encryption for blog posts on static sites?


Is there a simple way to add encryption to a static site (e.g. hugo, jekyll etc.) and it can be decrypted on the browser without a backend?

This would be for something like a personal journal or close-friends only blog posts while keep the rest of the site open.


  👤 jamieweb Accepted Answer ✓
Just a pointer, but something like Plainsight[1] may give you some ideas.

You could agree on a source text with your friends in an out-of-band way, then everyone just has to go and download whatever book/song/etc that you agree on in order to decode your articles.

Anybody who isn't 'in-the-know' will just see gibberish.

[1] https://github.com/rw/plainsight


👤 sdwedq

👤 gabrielsroka
Encryption can be broken offline. You may want to put a server in front of it to block access to the raw encrypted material.

That said, I'm using the Stanford JavaScript Crypto Library on https://github.com/gabrielsroka/gabrielsroka.github.io/blob/...

What about authentication? Maybe putting it on a Google doc and sharing it with certain people?


👤 newswasboring
Wouldn't adding a lets encrypt certificate to enable https do exactly that?