Could someone please tell me where I can find the source code of the Coppersmith method univariate written in C with the GMP library?

to be fair I will explain how I will use it for factoring

reference https://www.academia.edu/48848013/Lepore_Factorization_nr_88

Let's take the example N=1763 of Factorization nr 88 Part I

$P=27*b+1$ ; $p=65-8*b$

$Q=25*a+11$ ; $q=67-8*a$


We find the integer delta $D$ of $x*p+p^2$




A partial factorization of $451328$ that is $8$ is the biggest problem with my approach

we replace $D$




$55344+729*x=64*y$ $->$ $x=16$

$11964681+729*x=64*y$ $->$ $x=15$

$[64/64*a^2+(((55344+16*729)/64) mod (729))*a+(((11964681+15*729)/64) mod (729))] mod (729) = 0$

$(a^2+318*a+495) mod (729) = 0$

Applying the Coppersmith univariate method

$->$ $a=3$ $->$ $q=43$

  • $\begingroup$ @kelalaka not RSA attack $\endgroup$ Jan 26, 2022 at 14:28
  • 1
    $\begingroup$ Ah, I see. github.com/defund/coppersmith, no easy to convert to C/GNU/GMP. May be you can benefit from NTL on your progress. $\endgroup$
    – kelalaka
    Jan 26, 2022 at 14:54
  • $\begingroup$ @kelalaka thank you! I will try to learn over the years $\endgroup$ Jan 26, 2022 at 15:46


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Browse other questions tagged or ask your own question.