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

Update Concepts with OB key handling overview #12

Open
placer14 opened this issue Jul 26, 2019 · 0 comments
Open

Update Concepts with OB key handling overview #12

placer14 opened this issue Jul 26, 2019 · 0 comments

Comments

@placer14
Copy link
Member

A discussion in chat has produced the following overview of key handling in OB. We should incorporate this into the Concepts section with some additional fleshing-out.

As it currently stands, we do this:

ipfsSeed := bip39.NewSeed(mnemonic, "Secret Passphrase")

identityKey := IdentityKeyFromSeed(ipfsSeed) // this does the hmac with "OpenBazaar Seed". This is the ipfs key.

//////////////////////////////

bitcoinSeed := bip39.NewSeed(mnemonic, "")

masterPrivKey := bip32.NewMaster(bitcoinSeed)

pubkey := masterPrivKey.ECPublicKey()

pubkeyBytes := pubkey.SerializedCompressed() // this is what is in the 'bitcoin' field in the contract. Base64 serialized.

@cpacia notes that this would (hopefully) change in a future iteration of the software to allow for more flexible key handling.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant