From bd14f8dbaaaa410644e261a4bb6317edaf90c973 Mon Sep 17 00:00:00 2001 From: Jonas Schneider-Bensch Date: Thu, 27 Jun 2024 14:08:20 +0200 Subject: [PATCH] Formatting --- libcrux-ml-kem/tests/self.rs | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/libcrux-ml-kem/tests/self.rs b/libcrux-ml-kem/tests/self.rs index 98a27f441..4c8b41cdf 100644 --- a/libcrux-ml-kem/tests/self.rs +++ b/libcrux-ml-kem/tests/self.rs @@ -96,8 +96,7 @@ pub mod default { random_u32 >>= 8; let position = if modify_implicit_rejection_value { - (MlKemPrivateKey::::len() - SHARED_SECRET_SIZE) - + (random_u32 % SHARED_SECRET_SIZE) + (MlKemPrivateKey::::len() - SHARED_SECRET_SIZE) + (random_u32 % SHARED_SECRET_SIZE) } else { random_u32 % (MlKemPrivateKey::::len() - SHARED_SECRET_SIZE) }; @@ -115,8 +114,7 @@ pub mod default { ciphertext: MlKemCiphertext, secret_key: MlKemPrivateKey, ) -> [u8; SHARED_SECRET_SIZE] { - let mut to_hash = - secret_key[MlKemPrivateKey::::len() - SHARED_SECRET_SIZE..].to_vec(); + let mut to_hash = secret_key[MlKemPrivateKey::::len() - SHARED_SECRET_SIZE..].to_vec(); to_hash.extend_from_slice(ciphertext.as_ref()); shake256(&to_hash) @@ -345,8 +343,7 @@ pub mod pre_verification { random_u32 >>= 8; let position = if modify_implicit_rejection_value { - (MlKemPrivateKey::::len() - SHARED_SECRET_SIZE) - + (random_u32 % SHARED_SECRET_SIZE) + (MlKemPrivateKey::::len() - SHARED_SECRET_SIZE) + (random_u32 % SHARED_SECRET_SIZE) } else { random_u32 % (MlKemPrivateKey::::len() - SHARED_SECRET_SIZE) }; @@ -360,8 +357,7 @@ pub mod pre_verification { ciphertext: MlKemCiphertext, secret_key: MlKemPrivateKey, ) -> [u8; SHARED_SECRET_SIZE] { - let mut to_hash = - secret_key[MlKemPrivateKey::::len() - SHARED_SECRET_SIZE..].to_vec(); + let mut to_hash = secret_key[MlKemPrivateKey::::len() - SHARED_SECRET_SIZE..].to_vec(); to_hash.extend_from_slice(ciphertext.as_ref()); shake256(&to_hash)