webcrypto-local icon indicating copy to clipboard operation
webcrypto-local copied to clipboard

Improve pin generation algorithms

Open rmhrisk opened this issue 9 years ago • 0 comments

Currently, the project combines two public keys together, hashes them, HEX's that hash, and takes the numbers.

It is better to take the last n bits or first n bits, and convert them into decimal.

parseInt(binary, 2);

This is because HEX will have a bias in its output, this change will make the pins far more random.

We will need to update SECURITY.md.

rmhrisk avatar Mar 09 '17 01:03 rmhrisk