PeculiarVentures / webcrypto-liner

webcrypto-liner is a polyfill that let's down-level User Agents (like IE/Edge) use libraries that depend on WebCrypto. (Keywords: Javascript, WebCrypto, Shim, Polyfill)
MIT License
149 stars 26 forks source link

ECC does not work on IE #15

Closed rmhrisk closed 7 years ago

rmhrisk commented 7 years ago

We have been unable to get ECC to work in IE, Elliptic js goes into an infinite loop. Need to find out why and fix.

rmhrisk commented 7 years ago

More specifically it seems everything works except for export key and signing which both loop for some reason. More testing is needed though.

yuhong commented 7 years ago

See if you can use Process Explorer or WinDbg to get a call stack.

rmhrisk commented 7 years ago

@yuhong so you think it's a big in the js runtime vs elliptic or our use of it?

indutny commented 7 years ago

If anyone has access to IE and is willing to test it - we can try to bisect the problem.

First suggestion would be to add throw 1 at the top of:

https://github.com/indutny/elliptic/blob/master/lib/elliptic/curve/short.js#L423

And see if it crashes. (If it is not - the problem happens earlier).


Alternatively, it may be looping in https://github.com/indutny/elliptic/blob/master/lib/elliptic/ec/index.js#L116-L148 , but it sounds unlikely.

rmhrisk commented 7 years ago

Fixed

indutny commented 7 years ago

@rmhrisk mind sharing some details? 😉