3 ms·
Hey look it’s a “static” HTML file that decrypts itself using AES 256 CBC. Sure, that sounds static and simple and good for the web. What could go wrong. Some
by eduction 4y ago
Hey look it’s a “static” HTML file that decrypts itself using AES 256 CBC. Sure, that sounds static and simple and good for the web. What could go wrong.
Some obvious limitations:
-requires users to re-authenticate for every protected file on your site
-assets loaded by the page not password protected
-uses a single password globally shared by everyone who wants to read the doc
-archiving the page itself is useless unless you also archive the password, which must be done out of band
-this doesn’t compose or integrate with the web: none of the common tools you would use to download, spider, archive, spindle, mutilate web pages know how to deal with this
It’s certainly one solution. The http basic auth built into every popular webserver is another, with none of the above limitations. But I guess that would require spending 5 minutes learning and implementing some server config, and why do that when you can further ruin the web by shoving yet more user hostile complexity into client side JavaScript.
Sorry to sound bitter I just feel this is a really bad idea if you think about it for any length of time.
- dakiol 4y ago> The http basic auth built into every popular webserver is another, with none of the above limitations. The obvious advantage of OP's approach is that one doesn't need to control the server that serves the HTML (e.g., static site served via GitHub pages would be enough)
- lalopalota 4y agoOn the web, all pages on a domain can be encrypted with the same password. If the user selects the "remember me" checkbox, they won't have to authenticate on each page. This also works without a webserver. It can be a local file that is opened in a browser.