Skip to content

Commit

Permalink
Fix pallas name (#182)
Browse files Browse the repository at this point in the history
fix pallas name + add pasta field tests
  • Loading branch information
davidnevadoc authored Dec 20, 2024
1 parent 94e3692 commit 3a70c12
Show file tree
Hide file tree
Showing 3 changed files with 32 additions and 1 deletion.
16 changes: 16 additions & 0 deletions src/pasta/fp.rs
Original file line number Diff line number Diff line change
Expand Up @@ -28,3 +28,19 @@ impl_from_u64!(Fp);
impl_from_bool!(Fp);
field_bits!(Fp);
serialize_deserialize_primefield!(Fp);

#[cfg(test)]
mod test {

use super::Fp;
use crate::{
arith_test, constants_test, from_uniform_bytes_test, legendre_test, serde_test, test,
};

constants_test!(Fp);
arith_test!(Fp);
legendre_test!(Fp);
test!(arith, Fp, sqrt_test, 1000);
serde_test!(Fp PrimeFieldBits);
from_uniform_bytes_test!(Fp, 1000, L 64, L 48);
}
15 changes: 15 additions & 0 deletions src/pasta/fq.rs
Original file line number Diff line number Diff line change
Expand Up @@ -28,3 +28,18 @@ impl_from_u64!(Fq);
impl_from_bool!(Fq);
field_bits!(Fq);
serialize_deserialize_primefield!(Fq);

#[cfg(test)]
mod test {
use super::Fq;
use crate::{
arith_test, constants_test, from_uniform_bytes_test, legendre_test, serde_test, test,
};

constants_test!(Fq);
arith_test!(Fq);
legendre_test!(Fq);
test!(arith, Fq, sqrt_test, 1000);
serde_test!(Fq PrimeFieldBits);
from_uniform_bytes_test!(Fq, 1000, L 64, L 48);
}
2 changes: 1 addition & 1 deletion src/pasta/pallas.rs
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ use crate::{
new_curve_impl!(
(pub),
Pallas,
PastaAffine,
PallasAffine,
Fp,
Fq,
(- Fp::ONE, Fp::from_raw([2,0,0,0])),
Expand Down

0 comments on commit 3a70c12

Please sign in to comment.