Giter VIP home page Giter VIP logo

cryptography-python's Introduction

cryptography-python

This is a tutorial project about cryptography in python. Follow the steps and you will fully understand the magic of elliptic curves from scratch.

  • Each file can be run independently!
  • There are detailed paper references in the comments of the code

Based on this project, I implemented the SDKs of three famous blockchain projects: BTC, ETH and CKB.

secp256k1

paper: https://www.cs.miami.edu/home/burt/learning/Csc609.142/ecdsa-cert.pdf

  • secp256k1.py: implement finite field and secp256k1 curve.
  • secp256k1_generate_public_key.py: calculate bitcoin public key from private key.
  • secp256k1_sign.py: signature messages and verify it.
  • secp256k1_extract_private_key.py: extract the private key by two signatures that use the same k.
  • secp256k1_jacobian: jacobian projective space.

polynomial arith

  • polynomial_numpy.py: polynomial operation by numpy.
  • polynomial.py: polynomial operation by hand writting python.

bn128

  • bn128.py: bn128 curve, implements eip-196, eip-197.
  • bn128_ethereum_api.py: bn128 pairing testsuite.

cryptography-python's People

Contributors

mohanson avatar

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.