News for hackers. Stuff that matters.
Re:Show HN: Password-protect a static HTML page by ComputerGuru on Wednesday June 14, 2017 @01:01PM (#14554083)
WordPress has access to server-side scripting, why would you use js encryption there?
Re:Show HN: Password-protect a static HTML page by unknownid on Wednesday June 14, 2017 @01:14PM (#14554187)
- Allows transferring encrypted data over an insecure network - Page can be loaded online and decrypted/read offline later - Server cannot track who successfully decrypted the information - If server is compromised by a third party, they cannot retrieve the encryption key from users viewing the document - Among other things
Re:Show HN: Password-protect a static HTML page by ComputerGuru on Wednesday June 14, 2017 @01:30PM (#14554358)
We use JS encryption heavily in a number of our webapps, so I'm not unfamiliar with its advantages. But relying on JS encryption to provide "security" over unencrypted HTTP is just asking for trouble. It's the "secure on paper, broken in practice" kind of thing that ends up being a huge liability.
Re:Show HN: Password-protect a static HTML page by pdx on Wednesday June 14, 2017 @01:39PM (#14554429)
Why do you speak of unencrypted HTTP? Who cares? Only AES-256 encrypted data is sent and it's decoded locally. You could publish it on the front page of the New York Times (if anybody reads that anymore) and be secure, because you are publishing encrypted content.

It's really unclear what your point is here.

Re:Show HN: Password-protect a static HTML page by iancarroll on Wednesday June 14, 2017 @02:05PM (#14554661)
Your unencrypted (or just unauthenticated) HTML page might suddenly start sending the password you enter elsewhere...
Re:Show HN: Password-protect a static HTML page by pdx on Wednesday June 14, 2017 @02:40PM (#14554936)
Really, how? Because somebody compromised the server? So what? If they did that, all bets are off.
Re:Show HN: Password-protect a static HTML page by dpark on Wednesday June 14, 2017 @02:59PM (#14555125)
No, because someone MITMs your insecure channel and serves you a malicious page that steals your password and the unencrypted data.
Re:Show HN: Password-protect a static HTML page by gjjrfcbugxbhf on Wednesday June 14, 2017 @11:10PM (#14557655)
The OPs point is very clear. Js encryption has a lot to do to prove itself before it should be trusted with production secrets.

Furthermore weak encryption is worse than no encryption if it encourages dangerous behavior.

I would add that dropping ssl because you are using something like this would be dangerous behavior.

Re:Show HN: Password-protect a static HTML page by paulgb on Wednesday June 14, 2017 @01:27PM (#14554323)
Keep in mind that a third party who has compromised the server could change the JavaScript to report password entries back to it.
Re:Show HN: Password-protect a static HTML page by pdx on Wednesday June 14, 2017 @01:42PM (#14554456)
You are concerned with a compromised server? If I control your server, I can harvest whatever a user types in, even on an HTTPS page.
Re:Show HN: Password-protect a static HTML page by jodoherty on Wednesday June 14, 2017 @04:23PM (#14555811)
With plain HTTP, it'd be very easy for someone running an open WiFi station or a corrupt ISP to set up a DNS server that points the domain to their own reverse proxy that then can modify the page that the user receives to include some additional JavaScript to forward the user's password or the decrypted page results after the user inputs their password.

This doesn't require compromising any servers, and a lot of laptops will configure their DNS settings based on what the local network's DHCP server sends them.

To the end user, it will appear as though nothing is wrong.

Re:Show HN: Password-protect a static HTML page by paulgb on Wednesday June 14, 2017 @05:21PM (#14556222)
That's true, but I was responding to a specific claim in the parent post