On Apr 5, 2015, at 11:39 , absinthe wrote:

> Dear all, thanks for your replies. In general I don't want others to do the 
> dirty work for me, so I ask the actual problem. Anyway, since I have to 
> give more details to get the actual help... The case is that I want to 
> implement NTRU (see here for details 
> <http://en.wikipedia.org/wiki/NTRUEncrypt>) 
> As you see, I have to construct polynomials, similar to the ones I was 
> refering to and compute their inverse... So it is definite that I'm going 
> to have zero-divisors and the like...

Thanks for your clarifications.  I think the issue at the root of your problem 
is that Sage's algorithm implementing "foo.inverse_mod(bar)" uses the Euclidean 
algorithm (use the "?" or "??" operators as follows to see details:
sage: foo.inverse_mod? or foo.inverse_mod??)

I believe that the Euclidean algorithm assumes the underlying ring is Euclidean 
(which in turns requires no zero divisors).  In the Hoffstein-et al article, 
they mention using an "easy modification" of said algorithm to compute 
inverses, an exercise, I suppose, for the really-interested reader.

HTH

Justin

--
Justin C. Walker
Curmudgeon-at-large
Director
Institute for the Absorption of Federal Funds
----
186,000 Miles per Second
Not just a good idea:
  it's the law!
----

-- 
You received this message because you are subscribed to the Google Groups 
"sage-support" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/sage-support.
For more options, visit https://groups.google.com/d/optout.

Reply via email to