Skip to content

fix overflow issue for large primes #19

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 5 commits into from
Feb 17, 2025

Conversation

jacksonwalters
Copy link
Collaborator

when q=12289, n=512, we get overflow issues for omega(q^2,n). the issue appears to be in the line

if g_lifted.pow((p - 1) as u32) % p.pow(e) == 1

in primitive_root. if e = 1, then this line is not called. if it's called, we are computing huge powers of g_lifted. this could perhaps be fixed by using mod_exp

@jacksonwalters jacksonwalters self-assigned this Feb 16, 2025
@jacksonwalters jacksonwalters linked an issue Feb 17, 2025 that may be closed by this pull request
@jacksonwalters jacksonwalters merged commit 06f11ae into main Feb 17, 2025
1 check passed
@jacksonwalters jacksonwalters deleted the fix_overflow_issue_for_q_squared branch February 17, 2025 01:20
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.

overflow issue for large primes
1 participant