Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

The problem is that the function CT does not accept elements from Zmod(N) as inputs, but integers from ZZ. So you need to convert elements from Zmod(N) to ZZ after taking the square root. The following works:

sage: D = 1444451111007492249157225145240924628689936300289032719520989176681391983750\
....: 5026233531541656521516385113467258658058158757413856041226225263754438069945819\
....: 321862869928499936414339298248291015625
sage: N2tfac = [ 389017, 704969, 912673, 1030301, 1295029, 1442897, 2571353, 3307949,
....: 3869893, 29929, 32761, 37249, 38809, 52441, 54289, 58081, 66049, 72361 ]
sage: signs = [ 1, 0, 0, 1, 1, 0, 1, 0, 1, 1, 0, 1, 1, 0, 1, 0, 1, 1 ]
sage: vecTau = [ZZ(Zmod(fac)(-D).square_root()) for fac in N2tfac]
sage: lst = [(-1)^signs[ind] * vecTau[ind] for ind in range(len(vecTau))]
sage: tau = CRT(lst, N2tfac)
sage: tau
13858224800908315507294199691824697464548122256842223727609336351240341959268664361050839245186599

Remark: It would certainly be sensible for CRT to accept modular elements...