Skip to content

python-codex32 reference impl#74

Open
BenWestgate wants to merge 1 commit intoBlockstreamResearch:masterfrom
BenWestgate:python-codex32
Open

python-codex32 reference impl#74
BenWestgate wants to merge 1 commit intoBlockstreamResearch:masterfrom
BenWestgate:python-codex32

Conversation

@BenWestgate
Copy link
Copy Markdown
Contributor

apoelstra/rust-codex32#2 (comment):

@BenWestgate if you have a rewrite feel free to open a PR -- if it's not too hard to review I'm happy to take it in.

But I think the correct direction to rewrite in is one where we add a rust-bech32 dependency, use that for all the checksumming and encoding stuff, and then here we add (a) utility methods, and (b) constructors and accessors for the id/threshold/share index.

I have wrote this python implementation that covers more tests than the rust one does. It also does the approach above and relies on general checksum and bech32 modules. So it also passes Bech32/Bech32m tests.

It includes new test vectors for bitcoin/bips#2040 and bitcoin/bips#2077.

From: https://github.com/BenWestgate/python-codex32

Published on PyPI: https://pypi.org/project/codex32/

@apoelstra
Copy link
Copy Markdown
Contributor

I vote to merge this with a cursory review; later when I improve rust-codex32, I will steal all the test vectors from this implementation, and presumably if they pass on both implementations, they're both correct :P.

cursory review ACK 4857e18 -- checked that this is shaped like it does codex32 stuff, that there's nothing obviously malicious, no filesystem or network access, etc.

cc @roconnor-blockstream can you let me know if I should hold off on merging this? Fine to ping me out-of-band.

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.

2 participants