by foobarqux · 13y ago · 0 comments
In fact this is a pretty insidious mistake since you think you are doing the right thing by using a high-quality library.
http://trypepperjs.appspot.com/
https://github.com/google/pepper.js
(note the `google` in the link).
I completely agree that further analysis is needed on js-nacl, but I hadn't considered that compiler optimizations might lead to vulnerabilities.
Of course, the notion that the compiler is a threat here is getting a bit ahead of ourselves, because you don't even know what side channels are in the runtime.
Even on the LLVM side certain optimizations may be dangerous in crypto code. I wouldn't play with optimization settings unless I was sure I knew what I was doing. And I'd still think twice.