Code Monkey home page Code Monkey logo

ffacil.lean's Introduction

FFaCiL.lean

FFaCiL: Finite Fields and Curves in Lean, which is also "easy" in such languages as Portuguese and French ("fácil" and "facile" respectively).

ffacil.lean's People

Contributors

arthurpaulino avatar danielrrr avatar mpenciak avatar winston-h-zhang avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

ffacil.lean's Issues

MSM

We should implement a generic MSM algorithm for Weierstrass curves based off Pippenger/Bucket algorithm

Implement serialization and deserialization for fields and curve points

We should implement serialization and serialization for field elements, and curve points.

SerDe should target the built-in ByteArray data type, and we can just use the binary expension of field elements to as their serialization.

Curve points should be serialized by their constituent field elements, and also an additional UInt8 tag at the beginning containing data such as:

  • The form of this point (projective or affine)
  • Compressed or uncompressed (see below)

We should also have a "compressed" serialization where we serialize only the x-coordinate, and use one of the bits in the UInt8 tag to signal whether we take the positive or negative root of x^3 + ax + b.

As part of this issue we should take the time to re-structure our field typeclasses.

The image I have for this is that:

  • Field is the base class encoding all the arithmetic operations of fields
  • NewField (possibly rename to PrimeField?) is the class for efficient field implementations
  • GaloisField is the class for field extensions, and has all of the operations related to the Frobenius
  • PrimeField (rename to something else) is the class that adds additional serialization/deserialization methods on anything that implements Field (in particular, this should apply to both NewField and GaloisField

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.