mirror of https://github.com/zcash/halo2.git
Rename poseidon::PoseidonSpec trait to poseidon::Spec
This commit is contained in:
parent
3fb5bf8344
commit
8408f4690c
|
@ -11,7 +11,7 @@ mod test_vectors;
|
||||||
use grain::SboxType;
|
use grain::SboxType;
|
||||||
|
|
||||||
/// A specification for a Poseidon permutation.
|
/// A specification for a Poseidon permutation.
|
||||||
pub trait PoseidonSpec<F: FieldExt> {
|
pub trait Spec<F: FieldExt> {
|
||||||
/// The arity of this specification.
|
/// The arity of this specification.
|
||||||
fn arity(&self) -> usize;
|
fn arity(&self) -> usize;
|
||||||
|
|
||||||
|
@ -60,7 +60,7 @@ impl<F: FieldExt> Generic<F> {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
impl<F: FieldExt> PoseidonSpec<F> for Generic<F> {
|
impl<F: FieldExt> Spec<F> for Generic<F> {
|
||||||
fn arity(&self) -> usize {
|
fn arity(&self) -> usize {
|
||||||
self.t as usize
|
self.t as usize
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
use halo2::arithmetic::FieldExt;
|
use halo2::arithmetic::FieldExt;
|
||||||
use pasta_curves::pallas;
|
use pasta_curves::pallas;
|
||||||
|
|
||||||
use super::{Generic, PoseidonSpec};
|
use super::{Generic, Spec};
|
||||||
|
|
||||||
// $ sage generate_parameters_grain.sage 1 0 255 3 8 120 0x40000000000000000000000000000000224698fc094cf91b992d30ed00000001
|
// $ sage generate_parameters_grain.sage 1 0 255 3 8 120 0x40000000000000000000000000000000224698fc094cf91b992d30ed00000001
|
||||||
// Number of round constants: 384
|
// Number of round constants: 384
|
||||||
|
|
Loading…
Reference in New Issue