Code Monkey home page Code Monkey logo

secp256k1evm's Introduction

secp256k1evm

Partial Reimplementation of libsecp256k1 in EVM

Designed to Work with ETHASM (mine, not the pyton one)

  1. Group Double takes 4 uint256 parameters: x, y, z and infinity and output 4 parameters x, y, z, and infinity of the double (X coordinate = x/z^2, Y coordinate = y/z^3).
  2. Group Add takes 8 parameters: x1, y1, z1, infinity1, x2, y2, z2, infinity2 and output 4 parameters x, y, z, and infinity of the addition result
  3. Scalarmult currently just use double and add method to do scalar multiplication. Inputs are 5 parameters. x, y, z, infinity, and k.
  4. Wrapper shows how to interface scalarmult with Solidity source code
  5. Field invert takes 1 parameter and output its inverse mod p
  6. All calldataload are offset by 4 to be compatible with Solidity ABI

secp256k1evm's People

Contributors

sontol avatar

Stargazers

₴Ⱡ33₱ avatar Piper Merriam avatar

Watchers

Piper Merriam avatar  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.