-
Notifications
You must be signed in to change notification settings - Fork 37.7k
test: add python implementation of Elligator swift #24005
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
Conversation
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.
Cool! Nice to see this works.
I've left a number of comments to simplify the code.
8cdf579
to
e755867
Compare
Thanks for your really nice review @sipa! I’ve addressed your comments. Ready for further review. |
Thanks again @sipa! I’ve addressed your comments. Ready for further review. |
The following sections might be updated with supplementary metadata relevant to reviewers and maintainers. ReviewsSee the guideline for information on the review process.
If your review is incorrectly listed, please react with 👎 to this comment and the bot will ignore it on the next update. ConflictsReviewers, this pull request conflicts with the following ones:
If you consider this pull request important, please also help to review the conflicting pull requests. Ideally, start with the one that should be merged first. |
Thanks again @sipa! I’ve addressed your comments. Ready for further review. |
Made some changes to simplify the Elligator squared interface
|
Updated the elligator squared encoding function signature from |
Concept ACK |
|
@stratospher Want to rebase? It'd be good to get rid of the merge commit in this PR's history. |
Rebased on master, updated to address review comment and to just use commits from 26222 which this depends on. |
Are you sure you rebased on current master? |
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.
Code review ACK afd762a
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.
Code-review ACK afd762a
Regarding #24005 (comment), I've prepared at least adding the BIP324 decoding test vectors today (theStack@06c9424). Feel free to pick it up either in this PR or a follow-up.
Co-authored-by: Pieter Wuille <pieter.wuille@gmail.com>
remove util also since unit tests there were removed in bitcoin#27538 Co-authored-by: theStack <sebastian.falbesoner@gmail.com>
The test vector input file is taken from: 1. https://github.com/bitcoin/bips/blob/master/bip-0324/xswiftec_inv_test_vectors.csv 2. https://github.com/bitcoin/bips/blob/master/bip-0324/ellswift_decode_test_vectors.csv Co-authored-by: theStack <sebastian.falbesoner@gmail.com>
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.
ACK 4f4d039 🐊
Checked that since my previous ACK, review suggestions were tackled and the ellswift encoding/decoding test vectors were added (nice, wasn't aware of csv.DictReader)! Also verified that the added .csv files are identical to the ones from the BIP repository.
ACK 4f4d039 |
4f4d039 test: add ellswift test vectors from BIP324 (stratospher) a312877 test: Add ellswift unit tests (stratospher) 714fb2c test: Add python ellswift implementation to test framework (stratospher) Pull request description: Built on top of bitcoin#26222. This PR introduces Elligator swift encoding and decoding in the functional test framework. It's used in bitcoin#24748 for writing p2p encryption tests. ACKs for top commit: sipa: ACK 4f4d039 theStack: ACK 4f4d039 🐊 Tree-SHA512: 32bc8e88f715f2cd67dc04cd38db92680872072cb3775478e2c30da89aa2da2742992779ea14da2f1faca09228942cfbd86d6957402b24bf560244b389e03540
backport: merge bitcoin#22029, bitcoin#27538, bitcoin#21100, bitcoin#27542, bitcoin#24005, partial bitcoin#19953, bitcoin#23394, bitcoin#20292, bitcoin#20161, bitcoin#20842, bitcoin#26222 (secp256k1 tests)
Built on top of #26222.
This PR introduces Elligator swift encoding and decoding in the functional test framework. It's used in #24748 for writing p2p encryption tests.