Code Monkey home page Code Monkey logo

Comments (5)

jvdsn avatar jvdsn commented on June 8, 2024

Which tests are you referring to specifically? Those functions are heavily overloaded, and do different things depending on the type of the input parameters (finite field element, integer, real number...)

from crypto-attacks.

ScH01ar avatar ScH01ar commented on June 8, 2024

such as this script

p=193387944202565886198256260591909756041
P. = GF(p)[]
f = x^3 + 2*x^2 + x
P = (4, 10)
Q = (65639504587209705872811542111125696405, 125330437930804525313353306745824609665)
print(f)
f_ = f.subs(x=x-1)
print(f_)
print (f_.factor())
P_ = (P[0] +1, P[1])
Q_ = (Q[0] +1, Q[1])

t = GF(p)(193387944202565886198256260591909756040).square_root()
u = (P_[1] + tP_[0])/(P_[1] - tP_[0]) % p
v = (Q_[1] + tQ_[0])/(Q_[1] - tQ_[0]) % p
print (v.log(u))

from crypto-attacks.

jvdsn avatar jvdsn commented on June 8, 2024

@ScH01ar could you link where this is used in the repository, I can't find it.

from crypto-attacks.

ScH01ar avatar ScH01ar commented on June 8, 2024

attacks/ecc/singular_curve.py : line 43

from crypto-attacks.

jvdsn avatar jvdsn commented on June 8, 2024

I didn't see too much of a performance difference, but I replaced it anyway for consistency: 9af6ac2 Thanks.

from crypto-attacks.

Related Issues (16)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.