mirror of
https://github.com/serai-dex/serai.git
synced 2025-12-08 12:19:24 +00:00
Add msrv definitions to common and crypto
This will effectively add msrv protections to the entire project as almost everything grabs from these. Doesn't add msrv to coins as coins/bitcoin is still frozen. Doesn't add msrv to services since cargo msrv doesn't play nice with anything importing the runtime.
This commit is contained in:
@@ -7,6 +7,7 @@ repository = "https://github.com/serai-dex/serai/tree/develop/crypto/ed448"
|
||||
authors = ["Luke Parker <lukeparker5132@gmail.com>"]
|
||||
keywords = ["ed448", "ff", "group"]
|
||||
edition = "2021"
|
||||
rust-version = "1.65"
|
||||
|
||||
[package.metadata.docs.rs]
|
||||
all-features = true
|
||||
|
||||
@@ -54,7 +54,9 @@ field!(
|
||||
impl Scalar {
|
||||
/// Perform a wide reduction to obtain a non-biased Scalar.
|
||||
pub fn wide_reduce(bytes: [u8; 114]) -> Scalar {
|
||||
let wide = U1024::from_le_slice(&[bytes.as_ref(), &[0; 14]].concat());
|
||||
let mut bytes_128 = [0; 128];
|
||||
bytes_128[.. 114].copy_from_slice(&bytes);
|
||||
let wide = U1024::from_le_slice(&bytes_128);
|
||||
Scalar(Residue::new(&U448::from_le_slice(
|
||||
&wide.rem(&WIDE_REDUCTION_MODULUS).to_le_bytes()[.. 56],
|
||||
)))
|
||||
|
||||
Reference in New Issue
Block a user