mirror of
https://github.com/saymrwulf/pasta_curves-source.git
synced 2026-09-04 20:03:39 +00:00
Reverse endianness of delta constants
This commit is contained in:
parent
dc5df10832
commit
c427795bf5
2 changed files with 16 additions and 6 deletions
|
|
@ -181,10 +181,10 @@ const ROOT_OF_UNITY: Fp = Fp::from_raw([
|
|||
/// of the p - 1 order multiplicative
|
||||
/// subgroup.
|
||||
const DELTA: Fp = Fp::from_raw([
|
||||
0x1e9372724e80300d,
|
||||
0x671383de08b5fe3c,
|
||||
0xa99d8b67e918805e,
|
||||
0x48796f6fde98a425,
|
||||
0xa99d8b67e918805e,
|
||||
0x671383de08b5fe3c,
|
||||
0x1e9372724e80300d,
|
||||
]);
|
||||
|
||||
impl Default for Fp {
|
||||
|
|
@ -655,3 +655,8 @@ fn test_inv_root_of_unity() {
|
|||
fn test_inv_2() {
|
||||
assert_eq!(Fp::TWO_INV, Fp::from(2).invert().unwrap());
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn test_delta() {
|
||||
assert_eq!(Fp::DELTA, Fp::from(5).pow(&[1u64 << Fp::S, 0, 0, 0]));
|
||||
}
|
||||
|
|
|
|||
|
|
@ -181,10 +181,10 @@ const ROOT_OF_UNITY: Fq = Fq::from_raw([
|
|||
/// of the q - 1 order multiplicative
|
||||
/// subgroup.
|
||||
const DELTA: Fq = Fq::from_raw([
|
||||
0x20daec44973be920,
|
||||
0x4243423589e0a9b5,
|
||||
0x5127e2ce24a8e69c,
|
||||
0x83d2833d15f2bbf9,
|
||||
0x5127e2ce24a8e69c,
|
||||
0x4243423589e0a9b5,
|
||||
0x20daec44973be920,
|
||||
]);
|
||||
|
||||
impl Default for Fq {
|
||||
|
|
@ -669,3 +669,8 @@ fn test_inv_root_of_unity() {
|
|||
fn test_inv_2() {
|
||||
assert_eq!(Fq::TWO_INV, Fq::from(2).invert().unwrap());
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn test_delta() {
|
||||
assert_eq!(Fq::DELTA, Fq::from(5).pow(&[1u64 << Fq::S, 0, 0, 0]));
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue