Fix custom entropy breakage

Only characters which are valid hexadecimal characters will properly
add entropy to the string.

Since we have to change this anyway, change the hashing to loop
through 10000 iterations of Keccak, as a kind of poor man's KDF,
to harden against brute force attacks.

The Keccak code is taken from https://github.com/emn178/js-sha3,
under MIT licence.

Thanks to luigi1111w for spotting the bug, suggesting the best
way to fix it, and pointing to the keccak library above.
This commit is contained in:
moneromooo-monero 2016-01-06 23:12:56 +00:00
parent f208ee38bc
commit 032df518f3
No known key found for this signature in database
GPG key ID: 686F07454D6CEFC3
2 changed files with 498 additions and 14 deletions

File diff suppressed because one or more lines are too long