alexandregz / twofactor_gauthenticator

This RoundCube plugin adds the 2-step verification(OTP) to the login proccess
MIT License
220 stars 77 forks source link

Use crypto.getRandomValues instead of Math.random to generate secrets #116

Closed bartnv closed 4 years ago

bartnv commented 4 years ago

Math.random is not cryptographically secure and thus should not be used to generate secrets. The Web Cryptography API used here is supported from IE 11, Firefox 34, Chrome 37 and Safari 11 onwards. That is a bit less than what Roundcube itself supports, but still very reasonable considering that this feature will be used by security conscious people who will most likely not be running massively out-of-date browsers.

alexandregz commented 4 years ago

thx!