I am considering implementing the Secure Remote Password protocol to conduct a zero-knowledge password proof between the browser and my web application. The SRP website provides an example, but it requires java to perform calculations. I am wondering whether it is possible to implement SRP using javascript without the use of Java, as I do not want to require my
Tag: cryptography
Javascript: Generate a random number within a range using crypto.getRandomValues
I understand you can generate a random number in JavaScript within a range using this function: Courtesy of IonuČ› G. Stan here. What I want to know is if you can generate a better random number in a range using crypto.getRandomValues() instead of Math.random(). I would like to be able to generate a number between 0 and 10 inclusive, or
How to encrypt data that needs to be decrypted in node.js?
We are using bcrypt for hashing passwords and data that never needs to be decrypted. What should we do to protect other user information that does need to be decrypted? For example, let’s say that we didn’t want a user’s real name to be in plain text in case someone was to obtain access to the database. This is somewhat
Secure random numbers in javascript?
How do I generate cryptographically secure random numbers in javascript? Answer You can for instance use mouse movement as seed for random numbers, read out time and mouse position whenever the onmousemove event happens, feed that data to a whitening function and you will have some first class random at hand. Though do make sure that user has moved the