Re:Password protect a static HTML page
by paulpauper on Saturday February 18, 2023 @01:24PM
(#34849504)
What is the major difference? Isn't crypto-js still secure?
[ Parent
| on HN ]
Re:Password protect a static HTML page
by irrational on Saturday February 18, 2023 @01:42PM
(#34849702)
Why use a library (thus incurring the need for the user to download more JS) instead of using what is already in their browser?
Re:Password protect a static HTML page
by Xeoncross on Saturday February 18, 2023 @01:29PM
(#34849569)
One is a Javascript package, the other is a browser library following a spec that is implemented by all the major browser companies.
Web Crypto is faster and has many more devs working in the different implementations between all the companies and doesn't require any includes.
Re:Password protect a static HTML page
by lucideer on Saturday February 18, 2023 @01:40PM
(#34849677)
It might be. Whereas the native lib should be.
Just levels of trust. I'd happily use the former if the latter didn't exist.
Re:Password protect a static HTML page
by tptacek on Saturday February 18, 2023 @02:10PM
(#34850011)
I don't know what "secure" means. Is their implementation of OFB correct? Probably. But using OFB mode is itself a problem. From what I can see, crypto-js implements no authenticated modes, and exposes all sorts of crufty old things nobody should be using. The parent comment suggesting WebCrypto is correct in this case. Avoid crypto-js.