Added more #[rusfmt::skip]

This commit is contained in:
Michael Rosenberg 2022-10-28 16:58:40 -04:00
parent 95b368a431
commit a959787c2e
No known key found for this signature in database
6 changed files with 6 additions and 0 deletions

View file

@ -7,6 +7,7 @@ use crate::backend::serial::curve_models::ProjectiveNielsPoint;
use crate::window::LookupTable;
/// Perform constant-time, variable-base scalar multiplication.
#[rustfmt::skip] // keep alignment of explanatory comments
pub(crate) fn mul(point: &EdwardsPoint, scalar: &Scalar) -> EdwardsPoint {
// Construct a lookup table of [P,2P,3P,4P,5P,6P,7P,8P]
let lookup_table = LookupTable::<ProjectiveNielsPoint>::from(point);

View file

@ -401,6 +401,7 @@ impl FieldElement2625 {
/// encoding of every field element should decode, re-encode to
/// the canonical encoding, and check that the input was
/// canonical.
#[rustfmt::skip] // keep alignment of h[*] values
pub fn from_bytes(data: &[u8; 32]) -> FieldElement2625 {
#[inline]
fn load3(b: &[u8]) -> u64 {

View file

@ -302,6 +302,7 @@ impl Scalar29 {
/// Compute `limbs/R` (mod l), where R is the Montgomery modulus 2^261
#[inline(always)]
#[rustfmt::skip] // keep alignment of part1() and part2() computations
pub (crate) fn montgomery_reduce(limbs: &[u64; 17]) -> Scalar29 {
#[inline(always)]

View file

@ -189,6 +189,7 @@ impl CompressedEdwardsY {
///
/// Returns `None` if the input is not the \\(y\\)-coordinate of a
/// curve point.
#[rustfmt::skip] // keep alignment of explanatory comments
pub fn decompress(&self) -> Option<EdwardsPoint> {
let Y = FieldElement::from_bytes(self.as_bytes());
let Z = FieldElement::one();

View file

@ -525,6 +525,7 @@ impl RistrettoPoint {
}
impl<'a> From<&'a RistrettoPoint> for BatchCompressState {
#[rustfmt::skip] // keep alignment of explanatory comments
fn from(P: &'a RistrettoPoint) -> BatchCompressState {
let XX = P.0.X.square();
let YY = P.0.Y.square();

View file

@ -1122,6 +1122,7 @@ impl UnpackedScalar {
}
/// Inverts an UnpackedScalar in Montgomery form.
#[rustfmt::skip] // keep alignment of addition chain and squarings
pub fn montgomery_invert(&self) -> UnpackedScalar {
// Uses the addition chain from
// https://briansmith.org/ecc-inversion-addition-chains-01#curve25519_scalar_inversion