RuslanZavacky/srp-6a-demo — pull request #1 by simbo1905 (2014-05-16 21:12:54+00:00)
Title: improved randInt implementation

I noticed the "XXX XXX need a better implementation!" comment in the randInt so did a little research and enhanced it. I replaced the uuid.js which tries window.crypto or falls back to Math.random with a random generator which (a) tries window.crypto, (b) tries window.msCrypto on IE, (c) fallsback to the isaac random number generator.

With the isaac fallback it skips values forward for 100ms (~2k values on my deskop clearly a lot less on an old android phone). The amount of randoms which are skipped will depend on hardware and browser versions. Finally I added to the onkeyup of the password field to further skip randoms based on the characters being typed. That should harden it up a bit.