mirror of
https://github.com/serai-dex/serai.git
synced 2025-12-08 20:29:23 +00:00
dkg-evrf crate
monero-oxide relies on ciphersuite, which is in-tree, yet we've made breaking changes since. This commit adds a patch so monero-oxide -> patches/ciphersuite -> crypto/ciphersuite, with patches/ciphersuite resolving the breaking changes.
This commit is contained in:
@@ -91,7 +91,7 @@ macro_rules! field {
|
||||
use crypto_bigint::{Integer, NonZero, Encoding, impl_modulus};
|
||||
|
||||
use ciphersuite::group::ff::{
|
||||
Field, PrimeField, FieldBits, PrimeFieldBits, helpers::sqrt_ratio_generic,
|
||||
Field, PrimeField, FieldBits, PrimeFieldBits, FromUniformBytes, helpers::sqrt_ratio_generic,
|
||||
};
|
||||
|
||||
use $crate::backend::u8_from_bool;
|
||||
@@ -258,6 +258,12 @@ macro_rules! field {
|
||||
}
|
||||
}
|
||||
|
||||
impl FromUniformBytes<64> for $FieldName {
|
||||
fn from_uniform_bytes(bytes: &[u8; 64]) -> Self {
|
||||
$FieldName(Residue::new(&reduce(U512::from_le_slice(bytes))))
|
||||
}
|
||||
}
|
||||
|
||||
impl Sum<$FieldName> for $FieldName {
|
||||
fn sum<I: Iterator<Item = $FieldName>>(iter: I) -> $FieldName {
|
||||
let mut res = $FieldName::ZERO;
|
||||
|
||||
Reference in New Issue
Block a user