mirror of
https://github.com/saymrwulf/curve25519-dalek-source.git
synced 2026-09-10 21:21:13 +00:00
Whitespace formatting fixes on the [rustfmt::skip] functions
This commit is contained in:
parent
6d906bb70c
commit
95b368a431
5 changed files with 283 additions and 268 deletions
|
|
@ -126,10 +126,13 @@ impl<'a, 'b> Mul<&'b FieldElement2625> for &'a FieldElement2625 {
|
|||
/// Helper function to multiply two 32-bit integers with 64 bits
|
||||
/// of output.
|
||||
#[inline(always)]
|
||||
fn m(x: u32, y: u32) -> u64 { (x as u64) * (y as u64) }
|
||||
fn m(x: u32, y: u32) -> u64 {
|
||||
(x as u64) * (y as u64)
|
||||
}
|
||||
|
||||
// Alias self, _rhs for more readable formulas
|
||||
let x: &[u32;10] = &self.0; let y: &[u32;10] = &_rhs.0;
|
||||
let x: &[u32; 10] = &self.0;
|
||||
let y: &[u32; 10] = &_rhs.0;
|
||||
|
||||
// We assume that the input limbs x[i], y[i] are bounded by:
|
||||
//
|
||||
|
|
@ -374,8 +377,16 @@ impl FieldElement2625 {
|
|||
// and we're done.
|
||||
|
||||
FieldElement2625([
|
||||
z[0] as u32, z[1] as u32, z[2] as u32, z[3] as u32, z[4] as u32,
|
||||
z[5] as u32, z[6] as u32, z[7] as u32, z[8] as u32, z[9] as u32,
|
||||
z[0] as u32,
|
||||
z[1] as u32,
|
||||
z[2] as u32,
|
||||
z[3] as u32,
|
||||
z[4] as u32,
|
||||
z[5] as u32,
|
||||
z[6] as u32,
|
||||
z[7] as u32,
|
||||
z[8] as u32,
|
||||
z[9] as u32,
|
||||
])
|
||||
}
|
||||
|
||||
|
|
@ -390,7 +401,7 @@ impl FieldElement2625 {
|
|||
/// encoding of every field element should decode, re-encode to
|
||||
/// the canonical encoding, and check that the input was
|
||||
/// canonical.
|
||||
pub fn from_bytes(data: &[u8; 32]) -> FieldElement2625 { //FeFromBytes
|
||||
pub fn from_bytes(data: &[u8; 32]) -> FieldElement2625 {
|
||||
#[inline]
|
||||
fn load3(b: &[u8]) -> u64 {
|
||||
(b[0] as u64) | ((b[1] as u64) << 8) | ((b[2] as u64) << 16)
|
||||
|
|
@ -546,7 +557,9 @@ impl FieldElement2625 {
|
|||
/// Helper function to multiply two 32-bit integers with 64 bits
|
||||
/// of output.
|
||||
#[inline(always)]
|
||||
fn m(x: u32, y: u32) -> u64 { (x as u64) * (y as u64) }
|
||||
fn m(x: u32, y: u32) -> u64 {
|
||||
(x as u64) * (y as u64)
|
||||
}
|
||||
|
||||
// This block is rearranged so that instead of doing a 32-bit multiplication by 38, we do a
|
||||
// 64-bit multiplication by 2 on the results. This is because lg(38) is too big: we would
|
||||
|
|
|
|||
|
|
@ -453,7 +453,9 @@ impl FieldElement51 {
|
|||
|
||||
/// Multiply two 64-bit integers with 128 bits of output.
|
||||
#[inline(always)]
|
||||
fn m(x: u64, y: u64) -> u128 { (x as u128) * (y as u128) }
|
||||
fn m(x: u64, y: u64) -> u128 {
|
||||
(x as u128) * (y as u128)
|
||||
}
|
||||
|
||||
let mut a: [u64; 5] = self.0;
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue