ethankosakovsky / bip85

BIP Entropy
MIT License
22 stars 15 forks source link

Various changes #1

Closed doc-hex closed 4 years ago

doc-hex commented 4 years ago

Now all in sync with latest on Coldcard PR#39

Hopefully a source of ideas & test vectors. I'll understand if this never gets merged.

ethankosakovsky commented 4 years ago

I have incorporated my suggestions here https://github.com/ethankosakovsky/bipentropy/commit/5dd0317f5da02210b941303c7ec4e9e748311a69 as I was unable to push to your pull request branch.

The changeset introduces a clear API, without having to dig into internals, as well as maintaining the base layer.

I didnt correct the param order in the hmac function in this commit to make it readable.

ethankosakovsky commented 4 years ago

Fixed parameter order and reverted tests in https://github.com/ethankosakovsky/bipentropy/commit/4a7735cc96cff06911cf47340cd615142c3373bf

I can go ahead and merge your PR and pull the other two commits.

ethankosakovsky commented 4 years ago

add xprv=>xprv case, that does not use HMAC step

We previously discussed this case - if it's necessary. I'm agnostic. But maybe in the context of this BIP, since the purpose of the BIP is to use a root key to derive entropy to then create something else, maybe your original proposal of using the 512bit HMAC entropy to create the XPRV is the more consistent and logical approach.

doc-hex commented 4 years ago

Closing since key stuff already in master now.