Skip to content
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

Merged
merged 20 commits into from
May 28, 2024
Merged

Conversation

chokobole
Copy link
Contributor

@chokobole chokobole commented May 20, 2024

Description

This PR addresses two key areas:

  • Fixes the building of prime fields on GPU.
  • Refactors prime fields for better consistency and usability.

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.

@chokobole chokobole force-pushed the refac/refactor-prime-fields branch 8 times, most recently from ffc4a31 to 3e076c2 Compare May 22, 2024 02:27
@chokobole chokobole force-pushed the refac/refactor-prime-fields branch from 3e076c2 to 8012561 Compare May 22, 2024 04:31
@chokobole chokobole force-pushed the refac/refactor-prime-fields branch from 8012561 to 3ca4413 Compare May 22, 2024 14:45
Copy link
Contributor

@TomTaehoonKim TomTaehoonKim left a comment

Choose a reason for hiding this comment

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

LGTM

Copy link
Contributor

@ashjeong ashjeong left a 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,…”

Copy link
Contributor

@dongchangYoo dongchangYoo left a comment

Choose a reason for hiding this comment

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

Else, LGTM

@chokobole chokobole force-pushed the refac/refactor-prime-fields branch from 3ca4413 to c089417 Compare May 25, 2024 11:47
@chokobole chokobole force-pushed the refac/refactor-prime-fields branch from 1703405 to e7c9ce6 Compare May 27, 2024 01:59
Copy link
Contributor

@dongchangYoo dongchangYoo left a comment

Choose a reason for hiding this comment

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

LGTM

Copy link
Contributor

@Insun35 Insun35 left a comment

Choose a reason for hiding this comment

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

LGTM

Copy link
Contributor

@ashjeong ashjeong left a comment

Choose a reason for hiding this comment

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

LGTM

@chokobole chokobole merged commit 76fc05e into main May 28, 2024
3 checks passed
@chokobole chokobole deleted the refac/refactor-prime-fields branch May 28, 2024 01:35
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.

None yet

5 participants