Skip to content
This repository was archived by the owner on Dec 18, 2023. It is now read-only.

Commit 32b487e

Browse files
autquismmakerweikengchenPratyush
authored
Adding AdditiveGroup and PrimeGroup (#159)
Co-authored-by: Michele Orrù <michele.orru@berkeley.edu> Co-authored-by: Weikeng Chen <w.k@berkeley.edu> Co-authored-by: Pratyush Mishra <pratyushmishra@berkeley.edu>
1 parent 5a41d7f commit 32b487e

File tree

42 files changed

+49
-44
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

42 files changed

+49
-44
lines changed

.github/workflows/ci.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -164,11 +164,11 @@ jobs:
164164
- name: Checkout
165165
uses: actions/checkout@v3
166166

167-
- name: Install Rust (${{ matrix.rust }})
167+
- name: Install Rust
168168
uses: actions-rs/toolchain@v1
169169
with:
170170
toolchain: stable
171-
target: aarch64-unknown-none
171+
target: thumbv6m-none-eabi
172172
override: true
173173

174174
- uses: actions/cache@v2
@@ -183,10 +183,10 @@ jobs:
183183
uses: actions-rs/cargo@v1
184184
with:
185185
command: check
186-
args: --examples --workspace --exclude ark-curve-constraint-tests --target aarch64-unknown-none
186+
args: --examples --workspace --exclude ark-curve-constraint-tests --target thumbv6m-none-eabi
187187

188188
- name: build
189189
uses: actions-rs/cargo@v1
190190
with:
191191
command: build
192-
args: --workspace --exclude ark-curve-constraint-tests --target aarch64-unknown-none
192+
args: --workspace --exclude ark-curve-constraint-tests --target thumbv6m-none-eabi

Cargo.toml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,4 +71,5 @@ ark-ec = { git = "https://github.com/arkworks-rs/algebra/" }
7171
ark-poly = { git = "https://github.com/arkworks-rs/algebra/" }
7272
ark-serialize = { git = "https://github.com/arkworks-rs/algebra/" }
7373
ark-algebra-test-templates = { git = "https://github.com/arkworks-rs/algebra/" }
74-
ark-r1cs-std = { git = "https://github.com/arkworks-rs/r1cs-std/" }
74+
ark-algebra-bench-templates = { git = "https://github.com/arkworks-rs/algebra/" }
75+
ark-r1cs-std = { git = "https://github.com/mmaker/ark-r1cs-std/", branch = "feature/additive-groups" }

bls12_377/src/curves/g1.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ use ark_ec::{
1010
},
1111
CurveConfig,
1212
};
13-
use ark_ff::{Field, MontFp, PrimeField, Zero};
13+
use ark_ff::{AdditiveGroup, Field, MontFp, PrimeField, Zero};
1414
use ark_std::{ops::Neg, One};
1515

1616
use super::g1_swu_iso::{SwuIsoConfig, ISOGENY_MAP_TO_G1};

bls12_377/src/curves/g2.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,10 @@ use ark_ec::{
44
hashing::curve_maps::wb::{IsogenyMap, WBConfig},
55
models::CurveConfig,
66
short_weierstrass::{Affine, Projective, SWCurveConfig},
7-
AffineRepr, CurveGroup, Group,
7+
AffineRepr, CurveGroup, PrimeGroup,
88
};
99

10-
use ark_ff::{Field, MontFp, Zero};
10+
use ark_ff::{AdditiveGroup, Field, MontFp, Zero};
1111
use ark_std::ops::Neg;
1212

1313
use crate::*;

bls12_381/benches/bls12_381.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
use ark_algebra_bench_templates::*;
2-
32
use ark_bls12_381::{
43
fq::Fq, fq2::Fq2, fr::Fr, Bls12_381, Fq12, G1Projective as G1, G2Projective as G2,
54
};

bls12_381/src/curves/g1.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,9 @@ use ark_ec::{
44
hashing::curve_maps::wb::{IsogenyMap, WBConfig},
55
models::CurveConfig,
66
short_weierstrass::{Affine, SWCurveConfig},
7-
AffineRepr, Group,
7+
AffineRepr, PrimeGroup,
88
};
9-
use ark_ff::{Field, MontFp, PrimeField, Zero};
9+
use ark_ff::{AdditiveGroup, MontFp, PrimeField, Zero};
1010
use ark_serialize::{Compress, SerializationError};
1111
use ark_std::{ops::Neg, One};
1212

bls12_381/src/curves/g2.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,9 @@ use ark_ec::{
66
hashing::curve_maps::wb::{IsogenyMap, WBConfig},
77
models::CurveConfig,
88
short_weierstrass::{Affine, Projective, SWCurveConfig},
9-
AffineRepr, CurveGroup, Group,
9+
AffineRepr, CurveGroup, PrimeGroup,
1010
};
11-
use ark_ff::{Field, MontFp, Zero};
11+
use ark_ff::{AdditiveGroup, Field, MontFp, Zero};
1212
use ark_serialize::{Compress, SerializationError};
1313

1414
use super::{

bls12_381/src/curves/tests/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
use ark_algebra_test_templates::*;
2-
use ark_ec::{AffineRepr, CurveGroup, Group};
2+
use ark_ec::{AffineRepr, CurveGroup, PrimeGroup};
33
use ark_ff::{fields::Field, One, UniformRand, Zero};
44
use ark_serialize::{CanonicalDeserialize, CanonicalSerialize, Compress, Validate};
55
use ark_std::{rand::Rng, test_rng, vec};

bls12_381/src/fields/tests.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
use ark_algebra_test_templates::*;
2+
use ark_ec::AdditiveGroup;
23
use ark_ff::{
34
biginteger::{BigInt, BigInteger, BigInteger384},
45
fields::{FftField, Field, Fp12Config, Fp2Config, Fp6Config, PrimeField},

bn254/src/curves/g1.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ use ark_ec::{
22
models::{short_weierstrass::SWCurveConfig, CurveConfig},
33
short_weierstrass::Affine,
44
};
5-
use ark_ff::{Field, MontFp, Zero};
5+
use ark_ff::{AdditiveGroup, Field, MontFp, Zero};
66

77
use crate::{Fq, Fr};
88

0 commit comments

Comments
 (0)