Emscripten and ClojureScript: Transpiling to Avoid Rolling Your Own Crypto
blog.balboa.io
blog.balboa.io
The post says they've taken a cursory look at emscripten to make sure it doesn't have "timing attacks" in one short sentence. This is exactly the kind of verification that requires an experienced and professional cryptanalyst to audit, examine, and finally confirm that emscripten -> js indeed doesn't expose the cryptographic algorithms to side channel attacks, or add additional weaknesses to the cryptography.
If the authors of the original post are not cryptographically confident enough to "roll their own crypto" how can they verify that their tool chain is secure?
Don't roll your own crypto, especially in using tools that haven't been verified to be used in crypto by cryptanalysis.
"Skein-1024-CTR, with Skein-1024 as an HMAC in an encrypt-then-mac scheme"
I guess Skein-CTR is based on "Skein as a Stream Cipher" section from the spec.
https://github.com/pkcsecurity/trabant/blob/master/pkc_skein...
From homepage: "We use 1024-bit symmetric key encryption, a stronger level of encryption than most industry standards."
I guess the reason for using Skein is so that they can use this bullshit marketing :)
https://github.com/pkcsecurity/trabant/blob/master/pkc_skein...
The biggest reason was familiarity with the Skein NIST implementation--I've dug through it in the past in research and the like, so I wanted to leverage some experience there. We decided against just using crypto_secretbox from NaCl because it doesn't have a way for us to simply pause and resume to keep from blocking our UI thread on big files. We thought about trying to bolt ways into seeking into the stream output of crypto_stream, but that wasn't performing well. We went as far as trying to use crypto_secretbox in an Asm.js-ified WebWorker, but the performance hit was just too big, so we knew we had to find a way to "schedule" our encryption, otherwise our React.js app would crawl. The reason I passed on AES is far less justifiable, but important to me for aesthetic reasons: Using Skein just seemed like way more fun. Programming without whimsy is drudgery.
My next blog post will cover some of these decisions and performance tradeoffs in more detail with some code. Since you mentioned it, I will add an AES-CTR implementation into the metrics so people can see. I'm curious myself to see how we stack up!
You seem like you know what you're talking about but that last sentence is approximately the scariest thing any software developer working with crypto has ever said.
https://developer.mozilla.org/en-US/docs/Web/API/Web_Crypto_...
Looks like the asmcrypto's speed boosts are pretty high relative to SJCL and CryptoJS. Granted, this article's approach is transpiles C->JS, not sure what the implications are there in terms of performance.
This is my project where I do it too : https://github.com/zubairq/coils
I would certainly write my own crypto (but not design my own encryption scheme!) before using such a heavyweight solution. Implementing crypto might be hard, but common, not harder than building a compiler.