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

Base58chk-encoded extended keys are always 111 characters long. Amend wording of BIP accordingly #727

Closed
wants to merge 7 commits into from

Conversation

mmgen
Copy link
Contributor

@mmgen mmgen commented Sep 27, 2018

Base58chk-encoded extended keys are always 111 characters long. Amend wording of BIP accordingly.

Diff:
-This results in a Base58-encoded string of up to 112 characters.
+This results in a Base58-encoded string of exactly 111 characters.

Proof:
Version bytes: 0x0488b21e (“xpub”), 0x0488ade4 (“xprv”), 0x043587cf (“tpub”), 0x04358394 (“tprv”)

Largest version byte is 0x0488b21e, smallest 0x04358394.

Largest “possible” key:

kL = 0x0488b21effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff (78 bytes)
b58chk(kL) = xpubEPi3iGSX9RiyuXPTijevUmMctBDQs2TWCMgUd3qKp6qCgUc8RUsPdPBrRC6whFeWTg37DcmnJJiKFL73DH4sjdApJkXBD3vFcBP4xHq3fPY
len(b58chk(kL)) = 111

Smallest “possible” key:

kS = 0x043583940000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 (78 bytes)
b58chk(kS) = tprv8ZgxMBicQKsPcsbCVeqqF1KVdH7gwDJbxbzpCxDUsoXHdb6SnTPYxdwSAKDC6KKJzv7khnNWRAJQsRA8BBQyiSfYnRt6zuu4vZQGKjeW4YF
len(b58chk(kS)) = 111

vikmeup and others added 2 commits September 13, 2018 16:43
… wording of BIP accordingly.

-This results in a Base58-encoded string of up to 112 characters.
+This results in a Base58-encoded string of exactly 111 characters.

Version bytes: 0x0488b21e (“xpub”), 0x0488ade4 (“xprv”), 0x043587cf (“tpub”), 0x04358394 (“tprv”)

Largest “possible” key:
   kL = 0x0488b21effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff (78 bytes)
   b58chk(kL) = xpubEPi3iGSX9RiyuXPTijevUmMctBDQs2TWCMgUd3qKp6qCgUc8RUsPdPBrRC6whFeWTg37DcmnJJiKFL73DH4sjdApJkXBD3vFcBP4xHq3fPY (111 chars)

Smallest “possible” key:
   kS = 0x043583940000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 (78 bytes)
   b58chk(kS) = tprv8ZgxMBicQKsPcsbCVeqqF1KVdH7gwDJbxbzpCxDUsoXHdb6SnTPYxdwSAKDC6KKJzv7khnNWRAJQsRA8BBQyiSfYnRt6zuu4vZQGKjeW4YF (111 chars)
@luke-jr
Copy link
Member

luke-jr commented Sep 27, 2018

@sipa

mmgen added 2 commits October 19, 2018 13:07
… wording of BIP accordingly.

-This results in a Base58-encoded string of up to 112 characters.
+This results in a Base58-encoded string of exactly 111 characters.

Version bytes: 0x0488b21e (“xpub”), 0x0488ade4 (“xprv”), 0x043587cf (“tpub”), 0x04358394 (“tprv”)

Largest “possible” key:
   kL = 0x0488b21effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff (78 bytes)
   b58chk(kL) = xpubEPi3iGSX9RiyuXPTijevUmMctBDQs2TWCMgUd3qKp6qCgUc8RUsPdPBrRC6whFeWTg37DcmnJJiKFL73DH4sjdApJkXBD3vFcBP4xHq3fPY (111 chars)

Smallest “possible” key:
   kS = 0x043583940000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 (78 bytes)
   b58chk(kS) = tprv8ZgxMBicQKsPcsbCVeqqF1KVdH7gwDJbxbzpCxDUsoXHdb6SnTPYxdwSAKDC6KKJzv7khnNWRAJQsRA8BBQyiSfYnRt6zuu4vZQGKjeW4YF (111 chars)
Copy link
Contributor

@murchandamus murchandamus left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I’m not sure how exactly this PR came together, but the change to BIP44 is no longer compatible with BIP44 after the "Compatible wallets" section got removed via #770.

If you would still like to pursue the changes to BIP16 and BIP32, it might be best if those changes were opened as separate PRs, given that they need sign-off from different authors.

@jonatack
Copy link
Member

Agree, closing. As the author was last active six years ago, I'll open separate BIP-specific pulls with a cherry-picked commit by the original author.

@jonatack jonatack closed this Apr 30, 2024
@@ -1,4 +1,4 @@
This page is a Quality Assurance test plan for [[BIP 16]]. If you see a test missing, please add it.
This page is a Quality Assurance test plan for [[../bip-0016.mediawiki|BIP 16]]. If you see a test missing, please add it.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This has been fixed in 433283d.

@jonatack
Copy link
Member

Superseded by #1584 that cherry-picks 81644dd.

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

Successfully merging this pull request may close these issues.

7 participants