jvdsn / crypto-attacks

Python implementations of cryptographic attacks and utilities.
MIT License
935 stars 121 forks source link

how to use #2

Closed hellboyboyhell closed 3 years ago

hellboyboyhell commented 3 years ago

hi i want to practice with your code , can u explain to me how can i use smart's attack on y^2=x^3+7 module P=61 while t=1 , for points Q=(30,44) and G=(9,2) ??

hellboyboyhell commented 3 years ago

how is sage.all configuration?

jvdsn commented 3 years ago

Hi, if you want to use this, you will need to make sure sage is on your python path. Alternatively, you can try running sage -python <file.py>.

hellboyboyhell commented 3 years ago

I tried several ways but felt in error every time can u explain more or give me a tutorial link please? its important to me

jvdsn commented 3 years ago

If you want to run Smart's attack, you can go to the ecc directory, and then do: sage -python smart_attack.py. Of course, you need to have some code in this file to call the attack method. If this does not work, please post the errors you get.

hellboyboyhell commented 3 years ago

I call smart_attack.py but nothing happens and no input requested for curve configuration! where must i apply this configs:

E = EllipticCurve(GF(61),[0,7]) P = E(9,2) Q = E(30,44) Q = n*P

theese are elements definition of my curve in sage language , but i dont know how i should to apply to work with your code

jvdsn commented 3 years ago

You need to program a method yourself to call the attack, it does not prompt for curve configuration. It shouldn't be too hard if you have sage experience.

hellboyboyhell commented 3 years ago

ok I got it , unfortunatly I am begginer in sage and I think I cant run code correctly until next months:)))