Giter Site home page Giter Site logo

simple-py-crypto's People

Contributors

onedgelee avatar

Watchers

 avatar  avatar

simple-py-crypto's Issues

Pytest fails because of import path

Path on import statements are written with package path,
But current Pytest workflow does not have package installing process.
This makes test workflow always fails.
Package installing on workflow is needed.

Signature generation method is needed

For now, generation code for private key(d) and public key(Q) exists (Though public key generation is imperfect), Implementation for signature(r, s) generation is needed.

Tonelli-Shanks Algorithm have to be implemented

There may be situations where you have to compute y coordinate with given elliptic curve with finite field modulus and x coordinate.
For example, when if elliptic curve domain parameter G starts with 02 or 03, y coordinate of its generator point is missing.
This can be done by Tonelli-Shanks algorithm, but I didn't implemented it for now.
It's not so crucial for now since we can easily get y coordinate information of secp256k1 from internet, parsing elliptic curve domain parameter G starts with 04, but for future, it have to be implemented.

SHA-256 algorithm have to be implemented

SHA-256 is needed for hashing messages on ECDSA
Also, It's commonly used hashing algorithm,(for Bitcoin, double SHA-256 is standard) so it need to be implemented.

Elliptic curve point multiplication takes too long time

Current method for elliptic curve multiplication is done by iteration with elliptic curve point adding.
Since modulo p = 115792089237316195423570985008687907853269984665640564039457584007908834671663, private key d can be up to almost 10^77 (since 1 <= d <= p-1)
Multiplier is same as k on ECDSA, so it means iteration number can be up to almost 10^77.

There can be two kind of approach to resolve it.

  1. Understanding on elliptic curve would be help : May be, elliptic curve multiplication can form some cyclic behavior or converge to some point after some numbers of iterations. If so, total iteration to applied will be dramatically decreased.
  2. There are some algorithms to decrease the total number of iterations, dividing some operations : I've found some algorithms on wiki, and it would be help.

Black workflow works with --check option

Black workflow works with --check option.
That's because default black_args are . --check --diff.
Black is powerful tool for automatic code fixing though, for linting, Pylint is better I think.
So, I decided to use Black as automatic code fixing tool, and use Pylint as a final checker.
--check option is not needed, and have to be removed.

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.