Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Edit spec #7

Merged
merged 2 commits into from
Nov 20, 2018
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions proposals/posts/~2018.11.8..19.31.59..ba77~.md
Original file line number Diff line number Diff line change
Expand Up @@ -117,22 +117,22 @@ Optional string, used when turning generated BIP39 mnemonics into BIP32 seeds.
<li>Convert the seed (mnemonic phrase) plus the optional passphrase into a BIP32 seed, as specified in BIP39</li>
<li>Generate a BIP32 master node from the BIP32 seed (as per BIP32)</li>
<li>Derive the wallet at the path m/44'/60'/0'/0/0.</li>
<li>To derive an Ethereum address from the private key, use secp256k1 to get the uncompressed public key from the private key, then hash its last 64 bytes with keccak-256 and take the last 20 bytes from the result.</li>
<li>To derive an Ethereum address from the private key, use secp256k1 to get the uncompressed public key from the private key, then hash its last 64 bytes with keccak-256 and take the last 20 bytes from the result. If outputting addresses as strings rather than hex valules, the strings should be checksummed as per [EIP-55 (https://github.com/ethereum/EIPs/blob/master/EIPS/eip-55.md).</li>
</ul>
</li>
<li>For the type "network", derive a seed as follows:
<ul>
<li>Convert the "management" seed (mnemonic phrase) plus the optional passphrase into a BIP32 seed, as specified in BIP39</li>
<li>Append the revision number to the string "network" (ie "network0")</li>
<li>Append the revision number to the string "network" (ie "network0"); the revision number defaults to 0</li>
<li>Append that whole string to the BIP32 seed</li>
<li>Hash the "salted" BIP32 seed using SHA2-256</li>
</ul>
</li>
<li>Optionally, for the type "network", derive encryption and authentication keys as follows (identical to `++pit:nu:crub:crypto` in Urbit's standard library, [zuse](https://github.com/urbit/arvo/blob/master/sys/zuse.hoon)):
<ul>
<li>Hash the "network" seed using SHA2-512</li>
<li>Take the first 256 bits of the result as the encryption private key</li>
<li>Take last 256 bits of the result as the authentication private key</li>
<li>Take the first 256 bits of the result as the authentication private key</li>
<li>Take last 256 bits of the result as the encryption private key</li>
<li>Derive public keys for those using ed25519</li>
</ul>
</li>
Expand Down