Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

This is solved: https://developer.mozilla.org/en-US/docs/Web/Security/Subres...

If you really care you can check the integrity hash on your scripts before using every time.

That gives you more security than the update in your OS or Browser so they are a weaker link.



From https://www.nccgroup.trust/us/about-us/newsroom-and-events/b...

"OK, THEN I'LL JUST SERVE A CRYPTOGRAPHIC DIGEST OF MY CODE FROM THE SAME SERVER SO THE CODE CAN VERIFY ITSELF."

"This won't work."

Your comment that "That gives you more security than the update in your OS or Browser" is patently false, I don't know why you'd suggest that.


> THEN I'LL JUST SERVE A CRYPTOGRAPHIC DIGEST OF MY CODE

1) Javascript is open source and you can audit the code you are running.

2) You can save the HTML of a page and run your local copy so that you know the JS can't change or check the hash every time

Can you audit the code of your OS or Browser? In theory, if you are on Linux, but in practice it is too complex and voluminous for one person to do.

A browser based app is usually in the thousands of lines of open source code running in a sandbox that is very easy to debug.

The browser environment is the most secure and most easily user auditable environment there is.

Unless you expect all of your users to build your app from source on linux that they built from source you can't really get better security.

"Javascript Cryptography Considered Harmful" is old FUD. It was barely coherent when first published and the only legitimate arguments it had have been fixed.


> Unless you expect all of your users to build your app from source on linux that they built from source

You forgot to tack on "using compilers, etc., that they also built from source".




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: