mirror of
https://github.com/serai-dex/serai.git
synced 2025-12-08 04:09:23 +00:00
Remove FieldElement::from_square
The new `FieldElement::from_u256` is sufficient to load an unreduced value. The caller can perform the square themselves, without us explicitly supporting this special case. Updates the monero-oxide version used to one which no longer uses `FieldElement::from_square` (as their use is why it was added).
This commit is contained in:
@@ -230,12 +230,6 @@ impl FieldElement {
|
||||
FieldElement(reduce(U512::from_le_bytes(value)))
|
||||
}
|
||||
|
||||
/// Interpret the value as a little-endian integer, square it, and reduce it into a FieldElement.
|
||||
pub fn from_square(value: [u8; 32]) -> FieldElement {
|
||||
let value = U256::from_le_bytes(value);
|
||||
FieldElement(reduce(U512::from(value.mul_wide(&value))))
|
||||
}
|
||||
|
||||
/// Perform an exponentiation.
|
||||
pub fn pow(&self, other: FieldElement) -> FieldElement {
|
||||
let mut table = [FieldElement::ONE; 16];
|
||||
|
||||
Reference in New Issue
Block a user