-
Notifications
You must be signed in to change notification settings - Fork 216
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
refac(math): refactor prime fields #422
Conversation
ffc4a31
to
3e076c2
Compare
3e076c2
to
8012561
Compare
tachyon/math/finite_fields/generator/prime_field_generator/prime_field_config.h.tpl
Outdated
Show resolved
Hide resolved
8012561
to
3ca4413
Compare
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.
LGTM
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.
Please change the following commits' titles/messages :
180b749
fix(math): instantiate XXXGpu
with the same PrimeField
class for sm…
c5d1e6f
refac(math): separate cpu.h.tpl
into (small_)prime_field_cpu.h.tpl
a767713
build: enable avx512 extension when the flag is enabled
0188f04
perf(crypto): add round key to the first element only for the partial…
469be68
refac(math): separate config.h.tpl
into (small_)prime_field_config.h… ….tpl
...
Additionally, BigInt<N>
value types have been changed to uint32_t
for small prime fields
31e2b08
Please change “As the range has been extended,...” to “As the prime field scope has increased,…”
tachyon/math/finite_fields/generator/prime_field_generator/build_defs.bzl
Show resolved
Hide resolved
tachyon/math/finite_fields/generator/prime_field_generator/prime_field_generator.cc
Show resolved
Hide resolved
tachyon/math/finite_fields/generator/prime_field_generator/prime_field_generator.cc
Show resolved
Hide resolved
tachyon/math/finite_fields/goldilocks/goldilocks_prime_field_x86_special.h
Show resolved
Hide resolved
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.
Else, LGTM
…small prime fields
…ocks special version
3ca4413
to
c089417
Compare
….h.tpl` Additionally, `BigInt<N>` value types have been changed to `uint32_t` for small prime fields.
Remove the use of `FromMontgomery()` and `ToMontgomery()` for passing values. These conversions were initially meaningful when supporting only EC-based prime fields. As the prime field scope has increased, this commit replaces these conversions with type casting instead.
1703405
to
e7c9ce6
Compare
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.
LGTM
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.
LGTM
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.
LGTM
Description
This PR addresses two key areas:
Initially, our prime fields were constructed based on EC-based prime fields, leading some interfaces (e.g., operator) to not be suitable for other types of prime fields. After internal discussion, we have decided on standardized interfaces for prime fields.