BIP85: Fix wrong test vector #932

pull azuchi wants to merge 1 commits into bitcoin:master from azuchi:fix-bip85-testvector changing 1 files +4 −4
  1. azuchi commented at 7:52 AM on June 15, 2020: contributor

    There seems to be an error in the entropy of the Test Vector in BIP85.

    • In test case1, DERIVED KEY is correct, but DERIVED ENTROPY is wrong. efecfbccffea313214232d29e71563d941229afb4338c21f9517c41aaa0d16f00b83d2a09ef747e7a64e8e2bd5a14869e693da66ce94ac2da570ab7ee48618f7 is correct.
    • In test case2, DERIVED KEY is correct, but DERIVED ENTROPY is wrong. 70c6e3e8ebee8dc4c0dbba66076819bb8c09672527c4277ca8729532ad711872218f826919f6b67218adde99018a6df9095ab2b58d803b5b93ec9802085a690e is correct.

    The entropy derivation for the other applications has been derived correctly except for the following path mistake.

    • In XPRV test vector, app_no in the path is 39' but 32' is correct, in which case the DERIVED ENTROPY is 52405cd0dd21c5be78314a7c1a3c65ffd8d896536cc7dee3157db5824f0c92e2ead0b33988a616cf6a497f1c169d9e92562604e38305ccd3fc96f2252c177682. If DERIVED ENTROPY does not include chaincode, need to change it to ead0b33988a616cf6a497f1c169d9e92562604e38305ccd3fc96f2252c177682.

    python-bipentropy also outputs the above entropies.

  2. BIP85: Fix wrong test vector 6130f17ded
  3. scgbckbone commented at 9:06 AM on June 24, 2020: contributor

    was about to write the same PR - thanks

    In test case 2 (which you have named 'test case 1') derived entropy is wrong also in your description here (commit is fine) --> you have 'h' at the end that should not be there

  4. scgbckbone cross-referenced this on Jun 24, 2020 from issue bip vs. reference implementation mismatch by scgbckbone
  5. junderw commented at 10:41 AM on June 24, 2020: contributor

    I mentioned it in the original PR.

    Not sure why it wasn't fixed.

  6. scgbckbone commented at 10:58 AM on June 24, 2020: contributor

    I also found bug in reference implementation and created fix PR

  7. azuchi commented at 11:45 AM on June 24, 2020: contributor

    In test case 2 (which you have named 'test case 1') derived entropy is wrong also in your description here (commit is fine) --> you have 'h' at the end that should not be there

    oh, thanks. I fixed.

  8. luke-jr commented at 5:20 AM on June 25, 2020: member
  9. luke-jr added the label Proposed BIP modification on Jun 25, 2020
  10. scgbckbone commented at 10:37 AM on June 30, 2020: contributor

    found another issues with this BIP - created new PR

  11. ethankosakovsky commented at 1:04 PM on July 6, 2020: contributor

    ACK

  12. luke-jr merged this on Aug 1, 2020
  13. luke-jr closed this on Aug 1, 2020


github-metadata-mirror

This is a metadata mirror of the GitHub repository bitcoin/bips. This site is not affiliated with GitHub. Content is generated from a GitHub metadata backup.
generated: 2026-04-14 11:10 UTC

This site is hosted by @0xB10C
More mirrored repositories can be found on mirror.b10c.me