Fork me on GitHub
#planck
<
2016-09-06
>
xcthulhu14:09:09

@mfikes : I've been deep-diving into the crypto.subtle APIs lately, and I couldn't help but notice that planck doesn't seem to have crypto available.

xcthulhu14:09:46

Is this because the JS VM under the hood is just jsc?

mfikes14:09:08

@xcthulhu No reason. Never been any interest in it I suppose.

xcthulhu14:09:28

Yeah, I sort of spend all my time writing polyfills around it TBH.

xcthulhu15:09:19

Down the road, as people want to do more and more with Planck, I think it would be a good idea to expose crypto.getRandomValues

mfikes15:09:05

Yeah, if there’s interest, we could add some native support to Planck and surface it via some namespace. (It would have to be portable native code.)

xcthulhu15:09:05

It's a niche thing - it only comes up when you are trying to make a random private key or non-RFC 6979 compliant legacy signature schemes.

xcthulhu15:09:01

But I would recommend simply implementing js/window.crypto according to the spec - https://www.w3.org/TR/WebCryptoAPI/

xcthulhu15:09:56

One of the frustrating things about trying to do crypto with JS is that only FireFox and Chrome seem to follow this - IE, Safari, and Node.js all have other ideas.