bit-c / bitc

MIT License
103 stars 23 forks source link

KDF iteration count far to low to be meaningful. #3

Closed gmaxwell closed 10 years ago

gmaxwell commented 10 years ago

Picked a file at random to look at.. got crypt.h

Your KDF iteration count is far too low to meaningfully slow attacks. A typical bitcoin-qt wallet uses over 100,000 iterations of SHA512, you're using about 1000. This should really be stored in your wallet and adapted to the users system to get the highest amount you can take with acceptable performance. (Bitcoin-qt uses 100ms worth, subject to a minimum of 25,000 iterations. Reasonable minds might differ on the timings, but I think 1337 iterations is way too little, it's even less than linux distros are using for login passwords)

mx4 commented 10 years ago

Fair enough. Now fixed with ac7001883da9fd4a7dc199a08cc22eab1dff2614.