Comments (6)
You can already implement non-pairing based curves from their parameters atm. (You can define curves in short weierstrass form or edwards form atm. Here is an example for an edwards curves: https://github.com/arkworks-rs/curves/tree/master/ed_on_bls12_381)
Theres no implementation at the moment for Curve25519, though you could add one by specifying the parameters. For curve25519 in particular though, I think it'd be best to add a wrapper of dalek's curve25519 implementation with the Arkworks group interface in https://github.com/arkworks-rs/curves . (Dalek's library should yield much better performance for Curve25519)
from curves.
After Curve25519 there might be Ristretto. https://ristretto.group/
from curves.
What method/software do you use to calculate the static BigNumbers? A bit unfamiliar with how to calculate R and others.
So far for Curve25519 I have:
/// MODULUS = 57896044618658097711785492504343953926634992332820282019728792003956564819949
#[rustfmt::skip]
const MODULUS: BigInteger = BigInteger([
0xffffffffffffffed,
0xffffffffffffffff,
0xffffffffffffffff,
0x7fffffffffffffff,
]);
const MODULUS_BITS: u32 = 255;
const CAPACITY: u32 = Self::MODULUS_BITS - 1;
#[rustfmt::skip]
const MODULUS_MINUS_ONE_DIV_TWO: BigInteger = BigInteger([
0xfffffffffffffff6,
0xffffffffffffffff,
0xffffffffffffffff,
0x3fffffffffffffff,
]);
// GENERATOR = 9
from curves.
Some description of these parameters and how to calculate them are here: https://github.com/arkworks-rs/algebra/blob/master/ff/src/fields/mod.rs#L202
Warning: some of them need to be in the Montgomery form. The documentation of this is still in progress.
(arkworks-rs/algebra#69)
This is why generator 7 does not look like 7.
These files may contain some discussion on what needs to be in the Montgomery form and what not.
https://github.com/arkworks-rs/curves/blob/master/ed_on_mnt4_298/src/fields/fr.rs
https://github.com/arkworks-rs/curves/blob/master/ed_on_mnt4_298/src/curves/mod.rs
from curves.
I would hold off a little on implementing this until this PR is merged: arkworks-rs/algebra#96
This PR should make implementing this much easier
from curves.
Yes. That PR would simplify the matter a lot.
By the way, previously I used Python to calculate. To chop a big number into u64 u64, I use % pow(2, 64)
and / pow(2, 64)
.
from curves.
Related Issues (20)
- Plan to handle curve25519 and ed25519
- Prepared G2 for CP6-782 HOT 3
- Use workspace inheritance to reduce duplication in crate `Cargo.toml`s
- Add Sonny Curve to Library HOT 5
- Publish & tag 0.4.0-alpha
- Curve master should always be patched to depend on Algebra master
- Benchmarks for pairings are not executed HOT 2
- Slow affine multiplication for ed_on_bls12_377 HOT 4
- MSMs slower than doing individual scalar multiplications HOT 5
- In version 0.3, `multi_scalar_mul` output is incorrect if scalar exceeds curve order. HOT 1
- Hash to G1 point setting different domain string HOT 1
- cargo build fails HOT 5
- How to run `bls12_isogeny_computer.sage` script? HOT 2
- Define curve parameters with the `BigInt` macro
- Implement Grumpking curve to enable the bn254 cycle for folding & split accumulation(BCLMS)
- Make CI conditional on which curves are changed
- Run cp6_782 conditionally like MNT{4,6}-753 HOT 1
- Curves CI optimization look-up cache only instead of download
- Implement GLV for the Bandersnatch curve
- Unable to build when importing crate through git HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from curves.