Skip to content

Commit

Permalink
fixed nits
Browse files Browse the repository at this point in the history
  • Loading branch information
karthikbhargavan committed Jul 10, 2024
1 parent 91da4f9 commit 86a5cba
Show file tree
Hide file tree
Showing 5 changed files with 3 additions and 5 deletions.
1 change: 1 addition & 0 deletions libcrux-ml-kem/src/ind_cca.rs
Original file line number Diff line number Diff line change
Expand Up @@ -279,6 +279,7 @@ pub(crate) fn generate_keypair_unpacked<
// core::array::from_fn(|j| A_transpose[j][i])
// });

#[allow(non_snake_case)]
let mut A = core::array::from_fn(|_i| {
core::array::from_fn(|_j| PolynomialRingElement::<Vector>::ZERO())
});
Expand Down
1 change: 0 additions & 1 deletion libcrux-ml-kem/src/mlkem1024.rs
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,6 @@ pub type MlKem1024KeyPairUnpacked<Vector: VectorType> = MlKemKeyPairUnpacked<RAN
// Instantiate the different functions.
macro_rules! instantiate {
($modp:ident, $p:path, $vec:path, $doc:expr) => {
/// Provides $modp implementations of ML-KEM 1024
#[doc = $doc]
pub mod $modp {
use super::*;
Expand Down
1 change: 0 additions & 1 deletion libcrux-ml-kem/src/mlkem512.rs
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,6 @@ pub type MlKem512KeyPairUnpacked<Vector: VectorType> = MlKemKeyPairUnpacked<RANK
// Instantiate the different functions.
macro_rules! instantiate {
($modp:ident, $p:path, $vec:path, $doc:expr) => {
/// Provides $modp implementations of ML-KEM 512
#[doc = $doc]
pub mod $modp {
use super::*;
Expand Down
1 change: 0 additions & 1 deletion libcrux-ml-kem/src/mlkem768.rs
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,6 @@ pub type MlKem768KeyPairUnpacked<Vector: VectorType> = MlKemKeyPairUnpacked<RANK
// Instantiate the different functions.
macro_rules! instantiate {
($modp:ident, $p:path, $vec:path, $doc:expr) => {
/// Provides $modp implementations of ML-KEM 768
#[doc = $doc]
pub mod $modp {
use super::*;
Expand Down
4 changes: 2 additions & 2 deletions libcrux-ml-kem/src/types.rs
Original file line number Diff line number Diff line change
Expand Up @@ -196,7 +196,7 @@ pub mod unpacked {
use crate::{polynomial::PolynomialRingElement, vector::traits::Operations};

/// An unpacked ML-KEM IND-CPA Private Key
pub struct IndCpaPrivateKeyUnpacked<const K: usize, Vector: Operations> {
pub(crate) struct IndCpaPrivateKeyUnpacked<const K: usize, Vector: Operations> {
pub(crate) secret_as_ntt: [PolynomialRingElement<Vector>; K],
}

Expand All @@ -207,7 +207,7 @@ pub mod unpacked {
}

/// An unpacked ML-KEM IND-CPA Private Key
pub struct IndCpaPublicKeyUnpacked<const K: usize, Vector: Operations> {
pub(crate) struct IndCpaPublicKeyUnpacked<const K: usize, Vector: Operations> {
pub(crate) t_as_ntt: [PolynomialRingElement<Vector>; K],
pub(crate) seed_for_A: [u8; 32],
pub(crate) A: [[PolynomialRingElement<Vector>; K]; K],
Expand Down

0 comments on commit 86a5cba

Please sign in to comment.