PeerAssets / pypeerassets

Reference implementation of the PeerAssets protocol.
BSD 3-Clause "New" or "Revised" License
12 stars 16 forks source link

Use HMAC-SHA512 #123

Open saeveritt opened 6 years ago

saeveritt commented 6 years ago

For Kutil when generating from string seed. https://gist.github.com/sipa/1799467#file-gistfile1-txt-L97-L104 https://tools.ietf.org/rfc/rfc4231.txt

Right now Kutil uses a single sha256 hash. https://github.com/PeerAssets/pypeerassets/blob/master/pypeerassets/kutil.py#L34-L35

Resources: https://en.wikipedia.org/wiki/PBKDF2

saeveritt commented 6 years ago

The proposal states to use the string "Bitcoin seed" when calculating I ( the value containing the master secret key and master chain code, where the 256 bits on the left of the 512 hash is the private key and the 256 bits on the right is the chain code.). I = HMAC-SHA512(key="Bitcoin seed", msg=S)

Perhaps we can standardize all PeerAssets HD wallets to use the seed "PeerAssets seed" regardless of what network is being used.

peerchemist commented 6 years ago

Perhaps we can standardize all PeerAssets HD wallets to use the seed "PeerAssets seed" regardless of what network is being used.

That sounds like a good idea.