-
Notifications
You must be signed in to change notification settings - Fork 5.8k
BIP85: revert XPRV breaking changes for application 32' #1673
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
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
|
|
@@ -239,9 +239,10 @@ OUTPUT | |||||
| ===XPRV=== | ||||||
| Application number: 32' | ||||||
|
|
||||||
| Consistent with BIP32, use the first (leftmost) 32 bytes of the derived entropy as the | ||||||
| private key<ref name="curve-order" />. Prepend an empty byte (<code>0x00</code>) | ||||||
| per BIP32 on master key serialization. Use the last (rightmost) 32 bytes as the chain code. | ||||||
| Taking 64 bytes of the HMAC digest, the first 32 bytes are the chain code, | ||||||
| and second 32 bytes are the private key for BIP32 XPRV value. | ||||||
|
|
||||||
| WARNING: This is not consistent with BIP-032 | ||||||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. a3ff1ea nit, may as well use the same convention as the rest of this BIP, not a blocker
Suggested change
|
||||||
|
|
||||||
| Child number, depth, and parent fingerprint are forced to zero, as with any root | ||||||
| private key. | ||||||
|
|
@@ -258,7 +259,7 @@ INPUT: | |||||
|
|
||||||
| OUTPUT | ||||||
| * DERIVED ENTROPY=ead0b33988a616cf6a497f1c169d9e92562604e38305ccd3fc96f2252c177682 | ||||||
| * DERIVED XPRV=xprv9s21ZrQH143K4Px85utdpu6DFvY2NpHkJajPoupAznfiacH2MC9LasyW4uvqKXNxLWcjqGTbHKAhoZoMAbmRe5g9tAPA7cUUX4UVA1vFKFm | ||||||
| * DERIVED XPRV=xprv9s21ZrQH143K2srSbCSg4m4kLvPMzcWydgmKEnMmoZUurYuBuYG46c6P71UGXMzmriLzCCBvKQWBUv3vPB3m1SATMhp3uEjXHJ42jFg7myX | ||||||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Verified this change indeed reverts to the previous xprv in https://github.com/bitcoin/bips/pull/1600/files#diff-eae7a61b6d2a0b6091c1ce04618f216cbb871d987b985ba712de89e04014654cL235. |
||||||
|
|
||||||
| ===HEX=== | ||||||
| Application number: 128169' | ||||||
|
|
@@ -438,8 +439,7 @@ BIP32, BIP39 | |||||
|
|
||||||
| * 1.0 (2020-07) | ||||||
| * 2.0.0 (2024-09-22) | ||||||
| * Swap chain code and private key bytes in application 32' for consistentcy with BIP-32 (major change) | ||||||
| * Correct derived entropy for application 128169' test vector (major change) | ||||||
| * Correct derived entropy for application 707764' test vector (bugfix) | ||||||
|
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The only vector that needs correction as of my simplified PR #1679 is Hex (128169'). If somehow an extant implementation got the old test vector to work this correction would be a breaking change but I agree that if the correct BIP 85 algo is used then this is non-breaking :) |
||||||
| * Clarify big endian serialization | ||||||
| * Add the Portuguese language (9') to application 39' | ||||||
| * Add dice application 89101' | ||||||
|
|
||||||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In a3ff1ea, is there a reason not to keep the previous footnote at https://github.com/bitcoin/bips/pull/1600/files#diff-eae7a61b6d2a0b6091c1ce04618f216cbb871d987b985ba712de89e04014654cL379?