Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[TR3FIR-237] Fix AES CCM breaking authentication #18

Merged
merged 1 commit into from
Jul 9, 2024
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
3 changes: 3 additions & 0 deletions embassy-stm32/src/aes/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,9 @@ impl<'c, 'd, const KEY_SIZE: usize, const TAG_SIZE: usize, const IV_SIZE: usize,
payload_len: usize,
dir: Direction,
) -> Self {
// Reset the peripheral to ensure it's in a clean state
rcc::enable_and_reset::<T>();

let mut aad_header_buffer: [u8; 8] = [0; 8];
let aad_header_len = Self::setup_aad_header(&mut aad_header_buffer, aad_len);
let mut iv: [u8; 16] = [0; 16];
Expand Down