Skip to content

secp256k1: Add field mulbyx methods.#3716

Merged
davecgh merged 4 commits into
decred:masterfrom
davecgh:secp256k1_field_mulby
Jul 15, 2026
Merged

secp256k1: Add field mulbyx methods.#3716
davecgh merged 4 commits into
decred:masterfrom
davecgh:secp256k1_field_mulby

Conversation

@davecgh

@davecgh davecgh commented Jul 1, 2026

Copy link
Copy Markdown
Member

This requires #3710.

This adds new MulBy2, MulBy3, MulBy4, and MulBy8 methods to FieldVal so the API is more consistent with the new FieldVal64 type and pave the way for eventually being able to select the backend field.

Unlike the FieldVal64 implementations where the specialized methods provide a speed advantage, the FieldVal implementations simply defer to MulInt since it is faster due to the fact it doesn't immediately reduce or do carry propagation.

It also includes benchmarks and tests for the new methods as well as a new benchmark for MulInt for comparison.

@davecgh davecgh added this to the 2.2.0 milestone Jul 1, 2026
Comment thread dcrec/secp256k1/field.go Outdated
@davecgh
davecgh force-pushed the secp256k1_field_mulby branch 2 times, most recently from 9c2b8cc to c6dedf1 Compare July 8, 2026 04:46
davecgh added 4 commits July 15, 2026 16:06
This adds new MulBy2, MulBy3, MulBy4, and MulBy8 methods to FieldVal so
the API is more consistent with the new FieldVal64 type and pave the way
for eventually being able select the backend field.

Unlike the FieldVal64 implementations where the specialized methods
provide a speed advantage, the FieldVal implementations simply defer to
MulInt since it is faster due to the fact it doesn't immediately reduce
or do carry propagation.
This adds a test for the new MulBy2, MulBy3, MulBy4, and MulBy8 methods
added to FieldVal.
@davecgh
davecgh force-pushed the secp256k1_field_mulby branch from c6dedf1 to 696f667 Compare July 15, 2026 21:07
@davecgh
davecgh merged commit 696f667 into decred:master Jul 15, 2026
32 checks passed
@davecgh
davecgh deleted the secp256k1_field_mulby branch July 15, 2026 21:09
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