Ask Your Question

Convolution Polynomial Ring

asked 2013-08-23 12:46:15 +0200

anonymous user


updated 2013-08-23 12:46:52 +0200

How to define polynomial ring like Z[x]/(x^10-1) & Z_5[x]/(x^10-1) in Sage?

Following does not give gcd. I want to implement NTRU public key cryptosystem in Sage. Hence I need this.



R2. = PolynomialRing(GF(p))

S.<x> = R2.quotient(b^N - 1)



print gcd(f,g),xgcd(f,g)

Traceback (click to the left of this block for traceback)


TypeError: unable to find gcdemphasized text

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted

answered 2013-08-23 20:56:22 +0200

Luca gravatar image

Your ring S is not an Euclidean domain, hence sage does not know what you mean by gcd. R2 is an Euclidean domain. You can lift elements of S to elements of R2 using the lift() method, e.g.:

sage: xgcd(f.lift(), g.lift())
(1, b^5 + 2*b^3 + 2*b^2 + 2, 2*b^5)
edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools


Asked: 2013-08-23 12:46:15 +0200

Seen: 705 times

Last updated: Aug 23 '13