[sage-support] Working with polynomials (or at least trying to)

2015-04-04 Thread absinthe
Dear all, I'm trying to work with polynomials modulo x^N-1 whose coefficients belong to Z_p (If it helps p is a power of a prime). I know that I'm doing something wrong, but I cannot figure out what so any help is welcome. p=32 N=100 ZZp. = PolynomialRing(Integers(p)) #find an element that can b

Re: [sage-support] Working with polynomials (or at least trying to)

2015-04-04 Thread Justin C. Walker
On Apr 4, 2015, at 17:29 , absinthe wrote: > Dear all, > > I'm trying to work with polynomials modulo x^N-1 whose coefficients belong > to Z_p (If it helps p is a power of a prime). I know that I'm doing > something wrong, but I cannot figure out what so any help is welcome. Answered, possibl

Re: [sage-support] Working with polynomials (or at least trying to)

2015-04-05 Thread absinthe
Justin thanks for your reply. When I realised that I have posted to dev I deleted the message and I posted to support. It looks like that you had already answered there. Since it might help others which will look at support and not dev, I copy and paste your dev reply here. 2. Yes no problem :)

Re: [sage-support] Working with polynomials (or at least trying to)

2015-04-05 Thread Dima Pasechnik
On Sunday, 5 April 2015 13:20:49 UTC+1, absinthe wrote: > > Justin thanks for your reply. When I realised that I have posted to dev I > deleted the message and I posted to support. It looks like that you had > already answered there. Since it might help others which will look at > support and

Re: [sage-support] Working with polynomials (or at least trying to)

2015-04-05 Thread absinthe
Sorry for the leftovers I copied and pasted... With the following I manage to create polynomials whose coefficients are in Z_32 and they are modulo x^N-1. N=100 q=32 PR. = Zmod(q)[] Q. = PR.quotient(xx^N - 1) pp=Q.random_element() The problem is that pp.inverse_mod(x^N-1) does not work (NotImp

Re: [sage-support] Working with polynomials (or at least trying to)

2015-04-05 Thread Justin C. Walker
On Apr 5, 2015, at 10:58 , absinthe wrote: > Sorry for the leftovers I copied and pasted... > With the following I manage to create polynomials whose coefficients are in > Z_32 and they are modulo x^N-1. [snip] > My coefficients belong to a finite field of size 32 I can invert etc, but > the c

Re: [sage-support] Working with polynomials (or at least trying to)

2015-04-05 Thread David Joyner
On Sat, Apr 4, 2015 at 8:29 PM, absinthe wrote: > Dear all, > > I'm trying to work with polynomials modulo x^N-1 whose coefficients belong > to Z_p (If it helps p is a power of a prime). I know that I'm doing > something wrong, but I cannot figure out what so any help is welcome. > p=32 > N=100 >

Re: [sage-support] Working with polynomials (or at least trying to)

2015-04-05 Thread absinthe
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

Re: [sage-support] Working with polynomials (or at least trying to)

2015-04-05 Thread Justin C. Walker
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

Re: [sage-support] Working with polynomials (or at least trying to)

2015-04-07 Thread absinthe
Justin I believe that you are right so I will try to re-implement it. Thanks for your help. David, thank you as well. The answer I believe is somewhere close to both of you. Some sips of absinthe will help me get this through or at least provide the illusion that I did it ;) On Monday, April

Re: [sage-support] Working with polynomials (or at least trying to)

2015-04-07 Thread Justin C. Walker
On Apr 7, 2015, at 09:49 , absinthe wrote: > Justin I believe that you are right so I will try to re-implement it. > Thanks for your help. > David, thank you as well. The answer I believe is somewhere close to both > of you. > Some sips of absinthe will help me get this through or at least pro