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

new BIP: codex32 #1425

Merged
merged 6 commits into from
Mar 17, 2023
Merged

new BIP: codex32 #1425

merged 6 commits into from
Mar 17, 2023

Conversation

apoelstra
Copy link
Contributor

This introduces "codex32", a wallet seed/share format that uses the bech32 alphabet, a bech32-like checksum, and supports Shamir Secret Sharing, all possible without the use of electronic computers (although you can, and for some steps probably should, use computers if you want).

Mailing list discussion: https://lists.linuxfoundation.org/pipermail/bitcoin-dev/2023-February/021469.html
Website with more docs about hand computation (which isn't really covered by the BIP): https://secretcodex32.com/index.html

@roconnor-blockstream
Copy link
Contributor

roconnor-blockstream commented Feb 21, 2023

Add a comment that notes that if you are resharing a secret by taking existing shares an recovering the secret, tossing out the old shares and making new ones, it is important to create a fresh unique ID. Without a fresh ID you run the risk of accidentally combining old shares with new shares (due to forgetting to destroy some old shares), which could lead to confusion and/or the apparent loss of funds.

@roconnor-blockstream
Copy link
Contributor

After discussion with Christopher Allen et. al., I've opened PR apoelstra#2 for adding a rationale section for not encoding BIP-0039 entropy.

I suppose comments on that proposed amendment should be directed to that PR, while this PR remains open for assigning a BIP number and other comments on this proposal.

@roconnor-blockstream
Copy link
Contributor

Recommend noting master xprvs in each test case.

<pre>
BIP: ????
Layer: Applications
Title: codex32
Copy link
Member

Choose a reason for hiding this comment

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

Would prefer a title that means something

Copy link
Contributor

Choose a reason for hiding this comment

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

Yes.

Maybe something like Codex32 format for Shamir Secret Shares of [BIP-0032] master seeds.

Copy link
Contributor Author

@apoelstra apoelstra Feb 22, 2023

Choose a reason for hiding this comment

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

Sure. How about "codex32: a bech32-based BIP32 seed encoding supporting Shamir Secret Sharing and hand computation"?

Copy link
Contributor

Choose a reason for hiding this comment

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

SGTM.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Pushed.

@michaelfolkson
Copy link
Contributor

It'd be nice to get SLIP39 BIPed as well as this at some point in the future (especially as this draft BIP references it) if that factors into the BIP number allocation and possible number grouping(s).

@vicariousdrama
Copy link

NACK - Not in keeping with the Bitcoin Philosophy

@luke-jr
Copy link
Member

luke-jr commented Mar 15, 2023

I stumbled across a memo from 93 BC that appears to say this has been assigned BIP number 93.

@apoelstra
Copy link
Contributor Author

apoelstra commented Mar 15, 2023

Thanks @luke-jr!

I have squashed all the existing commits and added a new one which sets the number (and sets the type to "Informational", which matches my intuition about this and also matches BIP 173, which is similar in spirit).

We are not quite ready to merge -- we have a new reference implementation we want to link to (with Postscript and Rust, for now) and we want to replace some test vectors with nicer ones done.

roconnor-blockstream and others added 2 commits March 16, 2023 02:15
Using the identifier "faux" for invalid test vectors.

Extending the set of example a little bit.
@kallewoof
Copy link
Member

Just a reminder to add the BIP entry to README.mediawiki as well.

Copy link
Contributor

@roconnor-blockstream roconnor-blockstream left a comment

Choose a reason for hiding this comment

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

LGTM

@apoelstra
Copy link
Contributor Author

@kallewoof I think we are ready to merge this

@kallewoof kallewoof merged commit e761066 into bitcoin:master Mar 17, 2023
@apoelstra apoelstra deleted the 2023-02--volvelles branch March 17, 2023 02:41
This pull request was closed.
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

Successfully merging this pull request may close these issues.

6 participants