Giter VIP home page Giter VIP logo

jubjub's People

Contributors

daira avatar dconnolly avatar ebfull avatar eirik0 avatar hdevalence avatar kevaundray avatar nuttycom avatar rex4539 avatar str4d 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  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  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

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

jubjub's Issues

Point arithmetic (addition/doubling)

This is all of the point arithmetic we could possibly need; though we have to consider what is and isn't necessary downstream, and expose a simpler interface. This is mostly based on what curve25519-dalek does. I've modified my proposed API based on Mike Hamburg's paper.

  • AffinePoint represents a (u, v) coordinate in memory.
    • ::identity() -> Self (forward from Default::default())
    • ::compress(&self) -> [u8; 32]
    • ::decompress_vartime([u8; 32]) -> Self
    • ::get_u(&self) -> Fq
    • ::get_v(&self) -> Fq
    • ::to_affine_niels(&self) -> AffineNielsPoint
    • ::double(&self) -> ExtendedPoint
    • (private) ::is_on_curve_var(&self) -> bool
  • ExtendedPoint represents a (U, V, T1, T2, Z) coordinate in memory. (u:Z, v:Z with T1*T2 = uv/Z)
    • ::to_affine(&self) -> AffinePoint
    • ::double(&self) -> CompletedPoint
  • AffineNielsPoint represents an affine point in Niels coordinates (v+u, v-u, uv2d)
  • ProjectiveNielsPoint represents a projective point in Niels coordinates (V+U, V-U, Z, 2dUV)

Traits

  • impl Add<&ExtendedNielsPoint> for &ExtendedPoint
  • impl Add<&AffineNielsPoint> for &ExtendedPoint
  • impl Sub<&ExtendedNielsPoint> for &AffinePoint
  • impl Sub<&AffineNielsPoint> for &AffinePoint
  • impl Neg for &AffineNielsPoint
  • impl Neg for &ProjectiveNielsPoint
  • impl Neg for &AffinePoint
  • impl Neg for &ExtendedPoint

Why is the Jubjub base field exposed?

Is there a use-case for exposing the base field of Jubjub? From the perspective of a user of the elliptic curve library, the base field of the curve is an implementation detail. From looking through the API it seemed like the only place that it's used in the public API is in functions like from_raw_unchecked for unsafely constructing points, but it's not clear why someone would need to do that.

Serde support

We'd like to have Serde support for use implementing FROST for redjubjub (tracking issue: ZcashFoundation/redjubjub#21). I'd be happy to implement this (probably feature-gated behind a serde feature?) if it would fit with the library.

Upgrade subtle and use new CtOption

The new 2.1.0 version of subtle contains a CtOption<T> type which mirrors the functionality presented in the jubjub crate currently. Let's upgrade subtle and use their implementation instead.

Add `jubjub::Base` type

We currently re-export bls12_381::Scalar as jubjub::Fq, but it would be nice to refer to jubjub::Base instead.

Request for Addition Chains

Jubjub needs you!

... to make efficient addition chains.

  • 0x73eda753299d7d483339d80809a1d80553bda402fffe5bfefffffffeffffffff (for inversion in Fq)
  • 0x39f6d3a994cebea4199cec0404d0ec02a9ded2017fff2dff7fffffff80000000 (for Legendre symbol in Fq)
  • 0x39f6d3a994cebea4199cec0404d0ec02a9ded2017fff2dff80000000 (for sqrt in Fq)
  • 0x73eda753299d7d483339d80809a1d80553bda402fffe5bfeffffffff (also for sqrt in Fq)

  • 0x0e7db4ea6533afa906673b0101343b00a6682093ccc81082d0970e5ed6f72cb5 (for inversion in Fr)

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.