Discrete log problem over special primes

it flag

I am trying to find discrete log over $GF(P)$ using Cado-NFS ( It works well for random primes. But if I take primes that are divisor of numbers of the form $2^n-1$ for some positive integer $n$, it gives error. I use this in terminal:

./ -dlp -ell factor of P-1 target=a P

I am getting error as follows:

Traceback (most recent call last):
  File "", line 245, in <module>
    y =  DLP(a,b, PRIME_FACTORS[j]) #gp.znlog(a, gp.Mod(b, PRIME_FACTORS[j])) #DLP(a,b, PRIME_FACTORS[j])
  File "", line 90, in DLP
    w = NFS(y,x,z)
  File "", line 28, in NFS
    x1 = ZZ(x1)
  File "sage/structure/parent.pyx", line 898, in sage.structure.parent.Parent.__call__ (build/cythonized/sage/structure/parent.c:9339)
  File "sage/structure/coerce_maps.pyx", line 161, in sage.structure.coerce_maps.DefaultConvertMap_unique._call_ (build/cythonized/sage/structure/coerce_maps.c:4628)
  File "sage/structure/coerce_maps.pyx", line 156, in sage.structure.coerce_maps.DefaultConvertMap_unique._call_ (build/cythonized/sage/structure/coerce_maps.c:4520)
  File "sage/rings/integer.pyx", line 713, in sage.rings.integer.Integer.__init__ (build/cythonized/sage/rings/integer.c:6568)
  File "sage/rings/integer.pyx", line 7097, in sage.rings.integer.mpz_set_str_python (build/cythonized/sage/rings/integer.c:43422)
TypeError: unable to convert '' to an integer
Maarten Bodewes avatar
in flag
What gives you what error exactly? We don't allow programming questions here, but if you don't fully get the math then including the source code and error is basically a requirement.
poncho avatar
my flag
Actually, all primes (other than 2) is a divisor of $2^n-1$ for *some* $n$
Sanu avatar
it flag
I have included error. Yes, all primes (other than 2) is a divisor of $2^n -1$. But I am facing problem for prime factors of $2^{197}-1, 2^{223}-1$ etc. Let P be a prime factor of $2^{197}-1$. For P, I am getting error. But if I take any other prime near P, it is giving result.
I sit in a Tesla and translated this thread with Ai:


Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.