mirror of
https://github.com/serai-dex/serai.git
synced 2025-12-08 12:19:24 +00:00
Use crypto-bigint's reduction in ed448
Achieves feasible performance in the ed448 which makes it potentially viable for real world usage. Accordingly prepares a new release, updating the README.
This commit is contained in:
@@ -6,6 +6,13 @@ use crypto_bigint::{U512, U1024};
|
||||
#[derive(Clone, Copy, PartialEq, Eq, Default, Debug, Zeroize)]
|
||||
pub struct FieldElement(pub(crate) U512);
|
||||
|
||||
const MODULUS_PADDED_STR: &str = concat!(
|
||||
"00000000000000",
|
||||
"00",
|
||||
"fffffffffffffffffffffffffffffffffffffffffffffffffffffffe",
|
||||
"ffffffffffffffffffffffffffffffffffffffffffffffffffffffff",
|
||||
);
|
||||
|
||||
const MODULUS_STR: &str = concat!(
|
||||
"fffffffffffffffffffffffffffffffffffffffffffffffffffffffe",
|
||||
"ffffffffffffffffffffffffffffffffffffffffffffffffffffffff",
|
||||
@@ -33,6 +40,7 @@ pub(crate) const Q_4: FieldElement =
|
||||
|
||||
field!(
|
||||
FieldElement,
|
||||
MODULUS_PADDED_STR,
|
||||
MODULUS_STR,
|
||||
MODULUS,
|
||||
WIDE_MODULUS,
|
||||
|
||||
Reference in New Issue
Block a user