Skip to content

Preliminary commit for min const generics #182

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 12 commits into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions ec/Cargo.toml
Original file line number Diff line number Diff line change
@@ -21,6 +21,7 @@ num-traits = { version = "0.2", default-features = false }
rand = { version = "0.7", default-features = false }
rayon = { version = "1", optional = true }
zeroize = { version = "1", default-features = false, features = ["zeroize_derive"] }
paste = "1.0.4"

[dev-dependencies]
rand_xorshift = "0.2"
6 changes: 5 additions & 1 deletion ec/src/models/short_weierstrass_jacobian.rs
Original file line number Diff line number Diff line change
@@ -11,6 +11,7 @@ use ark_std::{
};

use ark_ff::{
impl_ops_from_ref,
bytes::{FromBytes, ToBytes},
fields::{BitIteratorBE, Field, PrimeField, SquareRootField},
ToConstraintField, UniformRand,
@@ -571,7 +572,10 @@ impl<P: Parameters> Neg for GroupProjective<P> {
}
}

ark_ff::impl_additive_ops_from_ref!(GroupProjective, Parameters);
impl_ops_from_ref!(
{<add, sub>, [sum, zero, add]}
GroupProjective, [P, Parameters]
);

impl<'a, P: Parameters> Add<&'a Self> for GroupProjective<P> {
type Output = Self;
12 changes: 10 additions & 2 deletions ec/src/models/twisted_edwards_extended.rs
Original file line number Diff line number Diff line change
@@ -21,6 +21,7 @@ use rand::{
use zeroize::Zeroize;

use ark_ff::{
impl_ops_from_ref,
bytes::{FromBytes, ToBytes},
fields::{BitIteratorBE, Field, PrimeField, SquareRootField},
ToConstraintField, UniformRand,
@@ -180,7 +181,11 @@ impl<P: Parameters> Neg for GroupAffine<P> {
}
}

ark_ff::impl_additive_ops_from_ref!(GroupAffine, Parameters);
impl_ops_from_ref!(
group_affine,
{<add, sub>, [sum, zero, add]}
GroupAffine, [P, Parameters]
);

impl<'a, P: Parameters> Add<&'a Self> for GroupAffine<P> {
type Output = Self;
@@ -540,7 +545,10 @@ impl<P: Parameters> Neg for GroupProjective<P> {
}
}

ark_ff::impl_additive_ops_from_ref!(GroupProjective, Parameters);
impl_ops_from_ref!(
{<add, sub>, [sum, zero, add]}
GroupProjective, [P, Parameters]
);

impl<'a, P: Parameters> Add<&'a Self> for GroupProjective<P> {
type Output = Self;
1 change: 1 addition & 0 deletions ff/Cargo.toml
Original file line number Diff line number Diff line change
@@ -23,6 +23,7 @@ num-traits = { version = "0.2", default-features = false }
rand = { version = "0.7", default-features = false }
rayon = { version = "1", optional = true }
zeroize = { version = "1", default-features = false, features = ["zeroize_derive"] }
paste = "1.0.4"

[build-dependencies]
rustc_version = "0.3"
322 changes: 0 additions & 322 deletions ff/src/biginteger/macros.rs

This file was deleted.

Loading