ethereumjs/keythereum

Incorrect scrypt kdf defaults?

Closed this issue · 2 comments

Should the defaults for scrypt kdf be

p = 1
r = 8

instead of

p = 8
r = 1

Just looking at my own keystore, these defaults looked flipped.

@tinybike do you know who could verify this?

@wjmelements Good question... I have keystore files with examples of both. It does look like the current version of geth defaults to p=1, r=8 for geth account new. However, I see examples with p=8, r=1 in the docs, for example https://github.com/ethereum/wiki/wiki/Web3-Secret-Storage-Definition#scrypt. My guess is that p=1, r=8 is preferable (since the point of scrypt is to be memory hard) but I'm not sure.

Since keythereum is supposed to be congruent with geth, it's probably sensible to change this. Might be worth also pinging https://gitter.im/ethereum/go-ethereum to ask about this though.