mirror of https://github.com/zcash/halo2.git
Rename curves to Pallas/Vesta (Pasta).
This commit is contained in:
parent
7536af8b69
commit
95e41fcfcf
|
@ -5,7 +5,7 @@ extern crate halo2;
|
|||
use crate::arithmetic::{small_multiexp, FieldExt};
|
||||
use crate::poly::commitment::Params;
|
||||
use crate::transcript::DummyHash;
|
||||
use crate::tweedle::{EqAffine, Fp, Fq};
|
||||
use crate::pasta::{EqAffine, Fp, Fq};
|
||||
use halo2::*;
|
||||
|
||||
use criterion::{black_box, Criterion};
|
||||
|
|
|
@ -6,7 +6,7 @@ use halo2::arithmetic::FieldExt;
|
|||
use halo2::plonk::*;
|
||||
use halo2::poly::commitment::Params;
|
||||
use halo2::transcript::DummyHash;
|
||||
use halo2::tweedle::{EqAffine, Fp, Fq};
|
||||
use halo2::pasta::{EqAffine, Fp, Fq};
|
||||
|
||||
use std::marker::PhantomData;
|
||||
|
||||
|
|
|
@ -4,7 +4,7 @@ use halo2::{
|
|||
plonk::*,
|
||||
poly::commitment::{Blind, Params},
|
||||
transcript::DummyHash,
|
||||
tweedle::{EqAffine, Fp, Fq},
|
||||
pasta::{EqAffine, Fp, Fq},
|
||||
};
|
||||
|
||||
use std::marker::PhantomData;
|
||||
|
|
|
@ -468,7 +468,7 @@ pub fn lagrange_interpolate<F: FieldExt>(points: &[F], evals: &[F]) -> Vec<F> {
|
|||
}
|
||||
|
||||
#[cfg(test)]
|
||||
use crate::tweedle::Fp;
|
||||
use crate::pasta::Fp;
|
||||
|
||||
#[test]
|
||||
fn test_lagrange_interpolate() {
|
||||
|
|
|
@ -14,9 +14,9 @@
|
|||
#![deny(unsafe_code)]
|
||||
|
||||
pub mod arithmetic;
|
||||
pub mod pasta;
|
||||
pub mod plonk;
|
||||
pub mod poly;
|
||||
pub mod transcript;
|
||||
pub mod tweedle;
|
||||
|
||||
pub mod model;
|
||||
|
|
|
@ -0,0 +1,13 @@
|
|||
//! This module contains implementations for the Pallas and Vesta elliptic curve
|
||||
//! groups.
|
||||
|
||||
#[macro_use]
|
||||
mod macros;
|
||||
mod curves;
|
||||
mod fields;
|
||||
|
||||
pub mod pallas;
|
||||
pub mod vesta;
|
||||
|
||||
pub use curves::*;
|
||||
pub use fields::*;
|
|
@ -1,5 +1,5 @@
|
|||
//! This module contains implementations for the Tweedledum and Tweedledee
|
||||
//! elliptic curve groups.
|
||||
//! This module contains implementations for the Pallas and Vesta elliptic curve
|
||||
//! groups.
|
||||
|
||||
use core::cmp;
|
||||
use core::fmt::Debug;
|
|
@ -1,5 +1,5 @@
|
|||
//! This module contains implementations for the two finite fields of the
|
||||
//! Tweedledum and Tweedledee curves.
|
||||
//! This module contains implementations for the two finite fields of the Pallas
|
||||
//! and Vesta curves.
|
||||
|
||||
mod fp;
|
||||
mod fq;
|
|
@ -0,0 +1,13 @@
|
|||
//! The Pallas elliptic curve group.
|
||||
|
||||
/// A Pallas point in the projective coordinate space.
|
||||
pub type Point = super::Ep;
|
||||
|
||||
/// A Pallas point in the affine coordinate space (or the point at infinity).
|
||||
pub type Affine = super::EpAffine;
|
||||
|
||||
/// The base field of the Pallas group.
|
||||
pub type Base = super::Fp;
|
||||
|
||||
/// The scalar field of the Pallas group.
|
||||
pub type Scalar = super::Fq;
|
|
@ -0,0 +1,13 @@
|
|||
//! The Vesta elliptic curve group.
|
||||
|
||||
/// A Vesta point in the projective coordinate space.
|
||||
pub type Point = super::Eq;
|
||||
|
||||
/// A Vesta point in the affine coordinate space (or the point at infinity).
|
||||
pub type Affine = super::EqAffine;
|
||||
|
||||
/// The base field of the Vesta group.
|
||||
pub type Base = super::Fq;
|
||||
|
||||
/// The scalar field of the Vesta group.
|
||||
pub type Scalar = super::Fp;
|
|
@ -111,7 +111,7 @@ fn test_proving() {
|
|||
use crate::arithmetic::{Curve, FieldExt};
|
||||
use crate::poly::commitment::{Blind, Params};
|
||||
use crate::transcript::DummyHash;
|
||||
use crate::tweedle::{EqAffine, Fp, Fq};
|
||||
use crate::pasta::{EqAffine, Fp, Fq};
|
||||
use circuit::{Advice, Column, Fixed};
|
||||
use std::marker::PhantomData;
|
||||
const K: u32 = 5;
|
||||
|
|
|
@ -103,7 +103,6 @@ impl<C: CurveAffine> Params<C> {
|
|||
|
||||
let h = {
|
||||
let mut hasher = H::init(C::Base::zero());
|
||||
hasher.absorb(-C::Base::one());
|
||||
let x = hasher.squeeze().to_bytes();
|
||||
let p = C::from_bytes(&x);
|
||||
p.unwrap()
|
||||
|
@ -227,7 +226,7 @@ fn test_commit_lagrange() {
|
|||
const K: u32 = 6;
|
||||
|
||||
use crate::transcript::DummyHash;
|
||||
use crate::tweedle::{EpAffine, Fp, Fq};
|
||||
use crate::pasta::{EpAffine, Fp, Fq};
|
||||
let params = Params::<EpAffine>::new::<DummyHash<Fp>>(K);
|
||||
let domain = super::EvaluationDomain::new(1, K);
|
||||
|
||||
|
@ -256,7 +255,7 @@ fn test_opening_proof() {
|
|||
};
|
||||
use crate::arithmetic::{eval_polynomial, Curve, FieldExt};
|
||||
use crate::transcript::{ChallengeScalar, DummyHash, Transcript};
|
||||
use crate::tweedle::{EpAffine, Fp, Fq};
|
||||
use crate::pasta::{EpAffine, Fp, Fq};
|
||||
|
||||
let params = Params::<EpAffine>::new::<DummyHash<Fp>>(K);
|
||||
let domain = EvaluationDomain::new(1, K);
|
||||
|
|
|
@ -217,7 +217,7 @@ where
|
|||
mod tests {
|
||||
use super::{construct_intermediate_sets, Query};
|
||||
use crate::arithmetic::FieldExt;
|
||||
use crate::tweedle::Fp;
|
||||
use crate::pasta::Fp;
|
||||
|
||||
#[derive(Clone)]
|
||||
struct MyQuery<F> {
|
||||
|
|
|
@ -1,13 +0,0 @@
|
|||
//! This module contains implementations for the Tweedledum and Tweedledee
|
||||
//! elliptic curve groups.
|
||||
|
||||
#[macro_use]
|
||||
mod macros;
|
||||
mod curves;
|
||||
mod fields;
|
||||
|
||||
pub mod dee;
|
||||
pub mod dum;
|
||||
|
||||
pub use curves::*;
|
||||
pub use fields::*;
|
|
@ -1,13 +0,0 @@
|
|||
//! The Tweedledee elliptic curve group.
|
||||
|
||||
/// A Tweedledee point in the projective coordinate space.
|
||||
pub type Point = super::Eq;
|
||||
|
||||
/// A Tweedledee point in the affine coordinate space (or the point at infinity).
|
||||
pub type Affine = super::EqAffine;
|
||||
|
||||
/// The base field of the Tweedledee group.
|
||||
pub type Base = super::Fq;
|
||||
|
||||
/// The scalar field of the Tweedledee group.
|
||||
pub type Scalar = super::Fp;
|
|
@ -1,13 +0,0 @@
|
|||
//! The Tweedledum elliptic curve group.
|
||||
|
||||
/// A Tweedledum point in the projective coordinate space.
|
||||
pub type Point = super::Ep;
|
||||
|
||||
/// A Tweedledum point in the affine coordinate space (or the point at infinity).
|
||||
pub type Affine = super::EpAffine;
|
||||
|
||||
/// The base field of the Tweedledum group.
|
||||
pub type Base = super::Fp;
|
||||
|
||||
/// The scalar field of the Tweedledum group.
|
||||
pub type Scalar = super::Fq;
|
Loading…
Reference in New Issue