Skip to content

Commit 25962c8

Browse files
committed
formatting and renaming
1 parent 3286475 commit 25962c8

File tree

6 files changed

+10
-10
lines changed

6 files changed

+10
-10
lines changed

libcrux-sha3/Cargo.toml

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -18,10 +18,6 @@ libcrux-platform = { version = "0.0.2", path = "../sys/platform" }
1818
libcrux-intrinsics = { version = "0.0.3", path = "../libcrux-intrinsics" }
1919
hax-lib.workspace = true
2020

21-
# This is only required for verification.
22-
# The hax config is set by the hax toolchain.
23-
[target.'cfg(hax)'.dependencies]
24-
2521
[features]
2622
simd128 = ["libcrux-intrinsics/simd128"]
2723
simd256 = ["libcrux-intrinsics/simd256"]

libcrux-sha3/hax.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ def __call__(self, parser, args, values, option_string=None) -> None:
5757
cargo_args = []
5858
else:
5959
cargo_args = ["-C", "--features", "simd128,simd256", ";"]
60-
60+
6161
cargo_hax_into = [
6262
"cargo",
6363
"hax",

libcrux-sha3/src/generic_keccak.rs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -104,21 +104,25 @@ impl<const N: usize, T: KeccakItem<N>> KeccakState<N, T> {
104104
self.set(2, 0, T::xor_and_rotate::<3, 61>(self[(2, 0)], t[0]));
105105
self.set(3, 0, T::xor_and_rotate::<41, 23>(self[(3, 0)], t[0]));
106106
self.set(4, 0, T::xor_and_rotate::<18, 46>(self[(4, 0)], t[0]));
107+
107108
self.set(0, 1, T::xor_and_rotate::<1, 63>(self[(0, 1)], t[1]));
108109
self.set(1, 1, T::xor_and_rotate::<44, 20>(self[(1, 1)], t[1]));
109110
self.set(2, 1, T::xor_and_rotate::<10, 54>(self[(2, 1)], t[1]));
110111
self.set(3, 1, T::xor_and_rotate::<45, 19>(self[(3, 1)], t[1]));
111112
self.set(4, 1, T::xor_and_rotate::<2, 62>(self[(4, 1)], t[1]));
113+
112114
self.set(0, 2, T::xor_and_rotate::<62, 2>(self[(0, 2)], t[2]));
113115
self.set(1, 2, T::xor_and_rotate::<6, 58>(self[(1, 2)], t[2]));
114116
self.set(2, 2, T::xor_and_rotate::<43, 21>(self[(2, 2)], t[2]));
115117
self.set(3, 2, T::xor_and_rotate::<15, 49>(self[(3, 2)], t[2]));
116118
self.set(4, 2, T::xor_and_rotate::<61, 3>(self[(4, 2)], t[2]));
119+
117120
self.set(0, 3, T::xor_and_rotate::<28, 36>(self[(0, 3)], t[3]));
118121
self.set(1, 3, T::xor_and_rotate::<55, 9>(self[(1, 3)], t[3]));
119122
self.set(2, 3, T::xor_and_rotate::<25, 39>(self[(2, 3)], t[3]));
120123
self.set(3, 3, T::xor_and_rotate::<21, 43>(self[(3, 3)], t[3]));
121124
self.set(4, 3, T::xor_and_rotate::<56, 8>(self[(4, 3)], t[3]));
125+
122126
self.set(0, 4, T::xor_and_rotate::<27, 37>(self[(0, 4)], t[4]));
123127
self.set(1, 4, T::xor_and_rotate::<20, 44>(self[(1, 4)], t[4]));
124128
self.set(2, 4, T::xor_and_rotate::<39, 25>(self[(2, 4)], t[4]));

libcrux-sha3/src/generic_keccak/xof.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
use crate::{
22
generic_keccak::KeccakState,
3-
traits::{Absorb, KeccakItem, Squeeze},
3+
traits::{Absorb, KeccakItem, Squeeze1},
44
};
55

66
/// The internal keccak state that can also buffer inputs to absorb.
@@ -183,7 +183,7 @@ impl<const RATE: usize, STATE: KeccakItem<1>> KeccakXofState<1, RATE, STATE> {
183183
#[inline(always)]
184184
pub(crate) fn squeeze(&mut self, out: &mut [u8])
185185
where
186-
KeccakState<1, STATE>: Squeeze<STATE>,
186+
KeccakState<1, STATE>: Squeeze1<STATE>,
187187
{
188188
if self.sponge {
189189
// If we called `squeeze` before, call f1600 first.

libcrux-sha3/src/simd/portable.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -142,7 +142,7 @@ impl Absorb<1> for KeccakState<1, u64> {
142142
}
143143
}
144144

145-
impl Squeeze<u64> for KeccakState<1, u64> {
145+
impl Squeeze1<u64> for KeccakState<1, u64> {
146146
fn squeeze<const RATE: usize>(&self, out: &mut [u8], start: usize, len: usize) {
147147
store_block::<RATE>(&self.st, out, start, len);
148148
}

libcrux-sha3/src/traits.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ pub(crate) trait Absorb<const N: usize> {
7474
#[hax_lib::fstar::replace(
7575
interface,
7676
"
77-
class t_Squeeze (v_Self: Type0) (v_T: Type0) = {
77+
class t_Squeeze1 (v_Self: Type0) (v_T: Type0) = {
7878
f_squeeze_pre:v_RATE: usize -> v_Self -> t_Slice u8 -> usize -> usize -> Type0;
7979
f_squeeze_post:v_RATE: usize -> v_Self -> t_Slice u8 -> usize -> usize -> t_Slice u8 -> Type0;
8080
f_squeeze:v_RATE: usize -> x0: v_Self -> x1: t_Slice u8 -> x2: usize -> x3: usize
@@ -84,7 +84,7 @@ class t_Squeeze (v_Self: Type0) (v_T: Type0) = {
8484
}
8585
"
8686
)]
87-
pub(crate) trait Squeeze<T: KeccakItem<1>> {
87+
pub(crate) trait Squeeze1<T: KeccakItem<1>> {
8888
fn squeeze<const RATE: usize>(&self, out: &mut [u8], start: usize, len: usize);
8989
}
9090

0 commit comments

Comments
 (0)