Get the latest tech news

Password protect a static HTML page, decrypted in-browser in JavaScript


Password protect a static HTML page, decrypted in-browser in JS with no dependency. No server logic needed. - robinmoisson/staticrypt

Because your full encrypted file is accessible client side, brute-force/dictionary attacks would be easy to do at a fast pace: use a long, unusual password. If the user checks it, the (salted + hashed) password will be stored in their browser's localStorage and the page will attempt to auto-decrypt when they come back. If you have general ideas or feedback around the implementation or StatiCrypt security model they are very welcome, if it's not extra sensitive feel free to open an issue.

Get the Android app

Or read this on Hacker News

Read more on:

Photo of Password

Password

Photo of browser

browser

Photo of javascript

javascript

Related news:

News photo

Show HN: Convert Mp4 to Wav in Browser

News photo

WelsonJS: Build a Windows app on the Windows built-in JavaScript engine

News photo

JavaScript weakmaps should be iterable