News for hackers. Stuff that matters.
Re:Show HN: Password-protect a static HTML page by tspike on Wednesday June 14, 2017 @01:22PM (#14554266)
Interesting. What is the use case for this versus HTTP basic auth?
Re:Show HN: Password-protect a static HTML page by jewbacca on Wednesday June 14, 2017 @02:39PM (#14554930)
You don't need to control the server

But you can still control access to the content, distributing the password by other channels.

A plausible use case for this (... like basically any crypto thing) would be clandestine organizing. Significantly less sophistication required, and much less of a trail left, to put a static site online.

Shit, you wouldn't even need to host it as a site: you could drop it somewhere as text, eg on a pastebin or in a forum comment, with "save as .html and open" instructions. And you could distribute the encryptor itself the same way.

The really great thing about this is that you could do practical human crypto, without Alice or Bob needing any special knowledge or equipment besides a web browser, using arbitrary uncontrolled public infrastructure.

... though if someone knows the password + controls the infrastructure you've used, they could substitute their own content.

... also short password + direct access to ciphertext -> easy brute force.

... also everything here: https://news.ycombinator.com/item?id=14554187

Wouldn't use it for anything state-level or life-or death. There are mitigations, but that would increase the difficulty and necessary sophistication for using it. Actually, this probably falls into the uncanny valley where it seems just accessibly cyberpunk enough to be extremely dangerous to anyone relying on it. But still, really cool IMO.

Re:Show HN: Password-protect a static HTML page by apetresc on Wednesday June 14, 2017 @01:24PM (#14554303)
A lot of static hosting methods don't make it easy to implement HTTP basic auth. The beauty of this approach is it's completely transparent to the network/application layer. You can use this with just some files on S3 or GitHub Pages, for example.
Re:Show HN: Password-protect a static HTML page by merkaloid on Wednesday June 14, 2017 @01:24PM (#14554305)
Re:Show HN: Password-protect a static HTML page by artursapek on Wednesday June 14, 2017 @01:23PM (#14554290)
It's self-contained so you can serve/share it statically. HTTP basic auth requires a server backend configured with the credentials.
Re:Show HN: Password-protect a static HTML page by snakeanus on Wednesday June 14, 2017 @04:46PM (#14555994)
HTTP basic auth does not provide encryption.
Re:Show HN: Password-protect a static HTML page by simlevesque on Wednesday June 14, 2017 @01:46PM (#14554496)
A static website on S3.