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

Support non-primepower modulus for the polynomial factorization calculator #26

Open
xayahrainie4793 opened this issue Apr 19, 2024 · 5 comments

Comments

@xayahrainie4793
Copy link

xayahrainie4793 commented Apr 19, 2024

Currently the modulus of the polynomial factorization calculator must be a prime number or a power of a prime, but I think that a general composite number modulus should be possible, e.g. for a polynomial mod 391, you can solve this polynomial with mod 17 and mod 23, thus I think that the polynomial factorization calculator can also support non-primepower modulus.

@alpertron
Copy link
Owner

Yes, you are right. I could use the Chinese Remainder Theorem to get the results you request. I will try to work on that when I have time.

@alpertron
Copy link
Owner

This could be more difficult when the polynomial mod pq has a factor with degree A, but that polynomial can be decomposed in 3 polynomials of degrees B, C and D mod p and 2 polynomials of degrees E and F mod q, where A = B + C + D = E + F.

@alpertron
Copy link
Owner

The most difficult issue when trying to factor polynomial modulo a composite number, is that there is no unique factorization.

So the idea will be not to find polynomial factorizations but only the roots.

@xayahrainie4793
Copy link
Author

xayahrainie4793 commented Apr 19, 2024

This also holds (i.e. there is no unique factorization) for the true prime power (i.e. prime powers with exponents > 1) modulus, e.g. factor the polynomial x^2-1 mod 8, it can be (x-1)*(x+1) or (x-3)*(x+3), but currently it already supports the true prime power (i.e. prime powers with exponents > 1) modulus (although I cannot calculate "factor the polynomial x^2-1 mod 8", it returns "Cannot lift because of duplicate factors modulo prime")

@xayahrainie4793
Copy link
Author

In the case that there is no unique factorization, you can try to let the calculator return all possible factorizations.

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

No branches or pull requests

2 participants