Compare commits

...

2 Commits

Author SHA1 Message Date
str4d a9e987918d
Merge 2474bdb4f6 into 81729eca91 2024-02-10 11:26:29 -07:00
Jack Grigg 2474bdb4f6 Migrate to `group::CurveAffine` 2023-07-30 14:27:22 +00:00
8 changed files with 12 additions and 8 deletions

View File

@ -4,3 +4,7 @@ members = [
"halo2_gadgets",
"halo2_proofs",
]
[patch.crates-io]
group = { git = "https://github.com/zkcrypto/group.git", rev = "696c2128529b5a9e18eed46d1da531753695db04" }
pasta_curves = { git = "https://github.com/zcash/pasta_curves.git", rev = "fb643a4e5ea25e035af758595f903b4002b0b7a3" }

View File

@ -578,7 +578,7 @@ impl<C: CurveAffine, EccChip: EccInstructions<C>> FixedPointShort<C, EccChip> {
#[cfg(test)]
pub(crate) mod tests {
use ff::PrimeField;
use group::{prime::PrimeCurveAffine, Curve, Group};
use group::{Curve, CurveAffine, Group};
use halo2_proofs::{
circuit::{Layouter, SimpleFloorPlanner, Value},

View File

@ -8,7 +8,7 @@ use crate::{
use arrayvec::ArrayVec;
use ff::PrimeField;
use group::prime::PrimeCurveAffine;
use group::CurveAffine as _;
use halo2_proofs::{
circuit::{AssignedCell, Chip, Layouter, Value},
plonk::{Advice, Assigned, Column, ConstraintSystem, Error, Fixed},

View File

@ -325,7 +325,7 @@ impl Config {
#[cfg(test)]
pub mod tests {
use group::{prime::PrimeCurveAffine, Curve};
use group::{Curve, CurveAffine};
use halo2_proofs::{
circuit::{Layouter, Value},
plonk::Error,

View File

@ -1,6 +1,6 @@
use super::{EccPoint, NonIdentityEccPoint};
use group::prime::PrimeCurveAffine;
use group::CurveAffine as _;
use halo2_proofs::{
circuit::{AssignedCell, Region, Value},

View File

@ -127,7 +127,7 @@ where
{
use crate::sinsemilla::primitives::{K, S_PERSONALIZATION};
use group::{prime::PrimeCurveAffine, Curve};
use group::{Curve, CurveAffine};
use pasta_curves::arithmetic::CurveExt;
let field_elems: Value<Vec<_>> = message

View File

@ -1,6 +1,6 @@
use std::ops::Add;
use group::{cofactor::CofactorCurveAffine, Group};
use group::{CurveAffine, Group};
use pasta_curves::pallas;
use subtle::{ConstantTimeEq, CtOption};

View File

@ -8,7 +8,7 @@ use crate::arithmetic::{best_fft, best_multiexp, parallelize, CurveAffine, Curve
use crate::helpers::CurveRead;
use ff::{Field, PrimeField};
use group::{prime::PrimeCurveAffine, Curve, Group};
use group::{Curve, Group};
use std::ops::{Add, AddAssign, Mul, MulAssign};
mod msm;
@ -74,7 +74,7 @@ impl<C: CurveAffine> Params<C> {
// Let's evaluate all of the Lagrange basis polynomials
// using an inverse FFT.
let mut alpha_inv = <<C as PrimeCurveAffine>::Curve as Group>::Scalar::ROOT_OF_UNITY_INV;
let mut alpha_inv = <C::Curve as Group>::Scalar::ROOT_OF_UNITY_INV;
for _ in k..C::Scalar::S {
alpha_inv = alpha_inv.square();
}