Created
March 20, 2022 22:11
-
-
Save vhxs/9e6aeacf351ac65c3cbba61333aebdba to your computer and use it in GitHub Desktop.
Find an RLWE ring that's not a field
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| for i, p in enumerate(Primes()): | |
| for n in range(1, i+1): | |
| S = PolynomialRing(GF(p), 'x') | |
| f = cyclotomic_polynomial(n) | |
| R = QuotientRing(S, f) | |
| if not R.is_field(): | |
| print(f"GF({p}) / ({f}) is not a field!!") | |
| quit() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment