arnaucube / babyjubjub-rs Goto Github PK
View Code? Open in Web Editor NEWBabyJubJub elliptic curve implementation in Rust
License: Apache License 2.0
BabyJubJub elliptic curve implementation in Rust
License: Apache License 2.0
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.Fl
: same as Fr
but uses the subgroup's order instead of r
Fr
and Fl
into JSON or BigInts. These aren't the most elegant or efficient (using strings as intermediate representation) but they workList of fixes I can make
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.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!
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.