Thanks. But in this ring, I can not find gcd.
N=7
p=3
R2. = PolynomialRing(GF(p))
S. = R2.quotient(b^N - 1)
f=x^6-x^4+x^3+x^2-1
g=x^6+x^4-x^2-x
print gcd(f,g),xgcd(f,g)
Traceback (click to the left of this block for traceback)
...
TypeError: unable to find gcd
On 23 August 2013 03:10, Ste
On Thursday, August 22, 2013 4:06:22 PM UTC-4, Santanu wrote:
> How to define polynomial ring like Z[x]/(x^10-1) & Z_5[x]/(x^10-1) in
> Sage?
>
>
sage: R1. = PolynomialRing(ZZ)
sage: R. = R1.quotient(a^10 - 1)
sage: R2. = PolynomialRing(GF(5))
sage: S. = R2.quotient(b^10 - 1)
Now you can do:
How to define polynomial ring like Z[x]/(x^10-1) & Z_5[x]/(x^10-1) in
Sage?
On 22 August 2013 12:37, Santanu Sarkar wrote:
> Dear all,
> Is convolution polynomial ring implemented in Sage?
> I want to implement NTRU public key cryptosystem. Hence I need
> modular inverse of a polynomial also