Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 0 additions & 12 deletions src/aead/poly1305/arm_neon.rs
Original file line number Diff line number Diff line change
Expand Up @@ -188,19 +188,12 @@ impl fe1305x2 {
}
}

// TODO: Does this really need to be `#[repr(C)]` or `#[repr(align(16))`]? We
// need to read the assembly code and see what assumptions it makes on the
// layout of its inputs. We've already made `fe1305x2` 16-byte aligned and that
// might be all we need.
//
// XXX/TODO(MSRV): change to `pub(super)`.
#[repr(C, align(16))]
pub(in super::super) struct State {
r: fe1305x2,
h: fe1305x2,
c: fe1305x2,
precomp: [fe1305x2; 2],
data: [u8; data_len()], // TODO: Does the assembly code use this?

buf: [u8; 2 * BLOCK_LEN],
buf_used: c::size_t,
Expand Down Expand Up @@ -231,7 +224,6 @@ impl State {
h: fe1305x2 { v: [ZERO; 12] },
c: fe1305x2 { v: [ZERO; 12] },
precomp: [fe1305x2 { v: [ZERO; 12] }; 2],
data: [0u8; data_len()],

buf: Default::default(),
buf_used: 0,
Expand Down Expand Up @@ -336,10 +328,6 @@ impl State {
}
}

const fn data_len() -> usize {
128
}

fn store32<'o>(output: &'o mut [u8; BLOCK_LEN], i: usize, value: W32) {
let output: &'o mut [u8; 4] = (&mut output[i..][..4]).try_into().unwrap();
*output = u32::to_le_bytes(value.0);
Expand Down
Loading