GithubHelp home page GithubHelp logo

ff-cairo's Introduction

ff-cairo

An Cairo implementation of finite field operations.

GOAL

Our goal is to use Hints as little as possible. Actually, we only used Hints in two functions.

Design

We use BigInt3 as a unique representation of a big number, but unreduceBigInt3 to represent a big number with limbs in [-k\*BASE, k\*BASE] and unreduceBigInt5 with limbs in [-k\*BASE^2, k\*BASE^2].

Function bigint_div_mod is the one of the functions which use hints, it computes x/y^2 mod p. x is unreduceBigInt5 and y is unreduceBigInt3, return a BigInt3.

Other field computions can be done by calling this function.

For example, bigint_div_mul can be x\*y/1 mod p, with x, y are unreduceBigInt3.

Use examples

See common-ec-cairo for how to use this library.

License

MIT License © EulerSmile

ff-cairo's People

Contributors

spartucus avatar songgeng87 avatar

Stargazers

code46ash avatar Etch avatar refcell avatar onurinanc avatar  avatar John Johnson avatar sudo rm -rf --no-preserve-root / avatar Milan Cermak avatar

Watchers

 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.