Browse Source

Re-export `edwards_on_cp6_782` as `edwards_on_bw6_761`

master
Pratyush Mishra 4 years ago
parent
commit
7a0177e8c7
7 changed files with 36 additions and 3 deletions
  1. +6
    -2
      r1cs-std/Cargo.toml
  2. +11
    -0
      r1cs-std/src/instantiated/edwards_on_bw6_761/curves.rs
  3. +9
    -0
      r1cs-std/src/instantiated/edwards_on_bw6_761/fields.rs
  4. +1
    -0
      r1cs-std/src/instantiated/edwards_on_bw6_761/mod.rs
  5. +1
    -1
      r1cs-std/src/instantiated/edwards_on_cp6_782/curves.rs
  6. +2
    -0
      r1cs-std/src/instantiated/edwards_on_cp6_782/mod.rs
  7. +6
    -0
      r1cs-std/src/instantiated/mod.rs

+ 6
- 2
r1cs-std/Cargo.toml

@ -30,17 +30,21 @@ derivative = { version = "2", features = ["use_core"] }
rand = { version = "0.7", default-features = false }
rand_xorshift = { version = "0.2" }
# Currently this means that all downstream users of `r1cs-std` will be using
# `algebra` with the `bls12_381` feature.
# `algebra` with the `bls12_381` feature. This is because of a cargo bug.
algebra = { path = "../algebra", default-features = false, features = [ "bls12_381" ] }
[features]
default = ["std"]
full = [ "bls12_377", "edwards_on_bls12_381", "edwards_on_bls12_377", "edwards_on_cp6_782", "mnt4_298", "mnt4_753", "mnt6_298", "mnt6_753" ]
full = [
"bls12_377", "edwards_on_bls12_381", "edwards_on_bls12_377", "edwards_on_cp6_782",
"edwards_on_bw6_761", "mnt4_298", "mnt4_753", "mnt6_298", "mnt6_753"
]
bls12_377 = [ "algebra/bls12_377" ]
edwards_on_bls12_381 = [ "algebra/edwards_on_bls12_381" ]
edwards_on_bls12_377 = [ "algebra/edwards_on_bls12_377" ]
edwards_on_cp6_782 = [ "algebra/edwards_on_cp6_782" ]
edwards_on_bw6_761 = [ "algebra/edwards_on_bw6_761", "algebra/edwards_on_cp6_782" ]
mnt4_298 = [ "algebra/mnt4_298" ]
mnt4_753 = [ "algebra/mnt4_753" ]
mnt6_298 = [ "algebra/mnt6_298" ]

+ 11
- 0
r1cs-std/src/instantiated/edwards_on_bw6_761/curves.rs

@ -0,0 +1,11 @@
use crate::groups::curves::twisted_edwards::AffineGadget;
use algebra::edwards_on_cp6_782::*;
use crate::edwards_on_cp6_782::FqGadget;
pub type EdwardsGadget = AffineGadget<EdwardsParameters, Fq, FqGadget>;
#[test]
fn test() {
crate::groups::curves::twisted_edwards::test::<_, EdwardsParameters, EdwardsGadget>();
}

+ 9
- 0
r1cs-std/src/instantiated/edwards_on_bw6_761/fields.rs

@ -0,0 +1,9 @@
use crate::fields::fp::FpGadget;
use algebra::edwards_on_cp6_782::fq::Fq;
pub type FqGadget = FpGadget<Fq>;
#[test]
fn test() {
crate::fields::tests::field_test::<_, Fq, FqGadget>();
}

+ 1
- 0
r1cs-std/src/instantiated/edwards_on_bw6_761/mod.rs

@ -0,0 +1 @@
pub use crate::instantiated::edwards_on_cp6_782::*;

+ 1
- 1
r1cs-std/src/instantiated/edwards_on_cp6_782/curves.rs

@ -1,7 +1,7 @@
use crate::groups::curves::twisted_edwards::AffineGadget;
use algebra::edwards_on_cp6_782::*;
use crate::edwards_on_cp6_782::FqGadget;
use crate::instantiated::edwards_on_cp6_782::FqGadget;
pub type EdwardsGadget = AffineGadget<EdwardsParameters, Fq, FqGadget>;

+ 2
- 0
r1cs-std/src/instantiated/edwards_on_cp6_782/mod.rs

@ -1,3 +1,5 @@
#![allow(unreachable_pub)]
mod curves;
mod fields;

+ 6
- 0
r1cs-std/src/instantiated/mod.rs

@ -7,6 +7,12 @@ pub mod edwards_on_bls12_377;
#[cfg(feature = "edwards_on_cp6_782")]
pub mod edwards_on_cp6_782;
#[cfg(all(not(feature = "edwards_on_cp6_782"), feature = "edwards_on_bw6_761"))]
pub(crate) mod edwards_on_cp6_782;
#[cfg(feature = "edwards_on_bw6_761")]
pub mod edwards_on_bw6_761;
#[cfg(feature = "edwards_on_bls12_381")]
pub mod edwards_on_bls12_381;

Loading…
Cancel
Save