Coder Social home page Coder Social logo

babyjubjub-rs's People

Contributors

arnaucube avatar eightfilms avatar leonardoalt avatar nicolas-geniteau avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

babyjubjub-rs's Issues

Bug fixes and extra features?

I've been using this library for a couple projects and have added various features and bug fixes in a fork: https://github.com/nanaknihal/babyjubjub-rs
If you're interested, I will make a PR. First I'd have to refactor some code because I made some unnecessary breaking changes (e.g., using a different hash) that need to be changed back before I make the PR. Please let me know if that would be helpful and I will make the PR.

List of features I have added

  • Point.on_curve(&self) -> bool and Point.in_subgroup() -> bool methods to check that Points are safe to operate on for certain constructions, e.g. ElGamal decryption.
  • ElGamal encryption and decryption
  • DLEQ proofs
  • Method for taking negative of point,
  • Fl : same as Fr but uses the subgroup's order instead of r
  • Serialization and Deserialization of Fr and Fl into JSON or BigInts. These aren't the most elegant or efficient (using strings as intermediate representation) but they work

List of fixes I can make

  • Fixing bug in Point.mul_scar by only allowing a BigUInt. Currently, it takes BigInt, and actually gives the wrong answer when the inputs is <0. Cleanest way might be to force BigUInt as input which would require breaking changes. Easiest way without breaking would be just to panic if the input is negative.
  • Fixing bug in ORDER being stored as an Fr, when it is larger than r. It should probably rather be stored as a BigInt.

I'm happy to merge these features, and let me know if so which bug fixes I should add as well. The Point.mul_scalar can be fixed number of different ways; if we're fine with panicking that would be an easy fix!

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.