Skip to content

Assert field magnitude at control-flow join #1673

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

Merged
merged 1 commit into from
May 24, 2025

Conversation

peterdettman
Copy link
Contributor

As I was re-reading the xonly method I noticed that the author had taken some care about the magnitude of g in each branch. It's probably worth documenting magnitude assumptions when control flows join like this.

Actually I would even prefer a new field method (perhaps _fe_join) that calls SECP256K1_FE_VERIFY_MAGNITUDE, and then sets the magnitude to that value. That would be more in line with the static analysis view of magnitudes that I recall being discussed, though I have not been following closely lately.

Copy link
Contributor

@sipa sipa left a comment

Choose a reason for hiding this comment

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

ACK 3a4f448

Copy link
Contributor

@jonasnick jonasnick left a comment

Choose a reason for hiding this comment

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

ACK 3a4f448

@jonasnick jonasnick merged commit 9239447 into bitcoin-core:master May 24, 2025
117 checks passed
@peterdettman peterdettman deleted the join branch May 24, 2025 06:57
hebasto added a commit to hebasto/bitcoin that referenced this pull request Jun 5, 2025
51d2ecd6e9 cmake: add a helper for linking into static libs
201b2b8f06 Merge bitcoin-core/secp256k1#1675: cmake: Bump minimum required CMake version to 3.22
3af71987a8 cmake: Bump minimum required CMake version to 3.22
92394476e9 Merge bitcoin-core/secp256k1#1673: Assert field magnitude at control-flow join
3a4f448cb4 Assert field magnitude at control-flow join
9fab425256 Merge bitcoin-core/secp256k1#1668: bench_ecmult: add benchmark for ecmult_const_xonly
05445377f4 bench_ecmult: add benchmark for ecmult_const_xonly
bb597b3d39 Merge bitcoin-core/secp256k1#1670: tests: update wycheproof files
d73ed99479 tests: update wycheproof files

git-subtree-dir: src/secp256k1
git-subtree-split: 51d2ecd6e9f8ec1048d04fae34c2430c749d3bff
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.

3 participants