From 2bf2dc2f6d4a599e72a96d7a65ee950970de5791 Mon Sep 17 00:00:00 2001 From: Mitchell Berry Date: Tue, 22 Aug 2023 12:06:14 +0800 Subject: [PATCH] cargo fmt --- src/avx2/poly.rs | 3 +-- src/lib.rs | 4 +++- src/params.rs | 3 +-- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/avx2/poly.rs b/src/avx2/poly.rs index f3304e3..ceaab0b 100644 --- a/src/avx2/poly.rs +++ b/src/avx2/poly.rs @@ -2,8 +2,7 @@ use crate::{align::*, cbd::*, consts::*, fips202::*, fips202x4::*, params::*, symmetric::*}; use core::arch::x86_64::*; -pub const NOISE_NBLOCKS: usize = - (KYBER_ETA1 * KYBER_N / 4 + SHAKE256_RATE - 1) / SHAKE256_RATE; +pub const NOISE_NBLOCKS: usize = (KYBER_ETA1 * KYBER_N / 4 + SHAKE256_RATE - 1) / SHAKE256_RATE; #[derive(Clone)] #[repr(C)] diff --git a/src/lib.rs b/src/lib.rs index 8b89628..f7d2662 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -154,7 +154,9 @@ mod symmetric; pub use api::*; pub use error::KyberError; pub use kex::*; -pub use params::{KYBER_PUBLICKEYBYTES, KYBER_SECRETKEYBYTES, KYBER_SSBYTES, KYBER_CIPHERTEXTBYTES, KYBER_90S}; +pub use params::{ + KYBER_90S, KYBER_CIPHERTEXTBYTES, KYBER_PUBLICKEYBYTES, KYBER_SECRETKEYBYTES, KYBER_SSBYTES, +}; pub use rand_core::{CryptoRng, RngCore}; // Feature hack to expose private functions for the Known Answer Tests diff --git a/src/params.rs b/src/params.rs index 4c615cc..da8f749 100644 --- a/src/params.rs +++ b/src/params.rs @@ -49,8 +49,7 @@ pub const KYBER_POLYVECCOMPRESSEDBYTES: usize = KYBER_K * 352; pub const KYBER_INDCPA_PUBLICKEYBYTES: usize = KYBER_POLYVECBYTES + KYBER_SYMBYTES; pub const KYBER_INDCPA_SECRETKEYBYTES: usize = KYBER_POLYVECBYTES; -pub const KYBER_INDCPA_BYTES: usize = - KYBER_POLYVECCOMPRESSEDBYTES + KYBER_POLYCOMPRESSEDBYTES; +pub const KYBER_INDCPA_BYTES: usize = KYBER_POLYVECCOMPRESSEDBYTES + KYBER_POLYCOMPRESSEDBYTES; /// Size in bytes of the Kyber public key pub const KYBER_PUBLICKEYBYTES: usize = KYBER_INDCPA_PUBLICKEYBYTES;