From f3718e73fd3127740cdda448f4683a1ecac547a8 Mon Sep 17 00:00:00 2001 From: Tony Arcieri Date: Tue, 13 Feb 2024 09:00:54 -0700 Subject: [PATCH] aes: add v0.8.4 CHANGELOG entry (#410) This was backported in #409. Also includes a small comment fixup. --- aes/CHANGELOG.md | 7 +++++++ aes/src/armv8/expand.rs | 3 +-- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/aes/CHANGELOG.md b/aes/CHANGELOG.md index 37970b24..92e1c441 100644 --- a/aes/CHANGELOG.md +++ b/aes/CHANGELOG.md @@ -5,6 +5,13 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). +## 0.8.4 (2024-02-13) +### Changed +- Assert soundness preconditions for ARMv8 key expansion ([#407], [#408]) + +[#407]: https://github.com/RustCrypto/block-ciphers/pull/407 +[#408]: https://github.com/RustCrypto/block-ciphers/pull/408 + ## 0.8.3 (2023-06-17) ### Added - Support `aes_armv8` on Rust 1.61+ using `asm!` ([#365]) diff --git a/aes/src/armv8/expand.rs b/aes/src/armv8/expand.rs index 4d5b74c7..e932c7ca 100644 --- a/aes/src/armv8/expand.rs +++ b/aes/src/armv8/expand.rs @@ -18,8 +18,7 @@ pub unsafe fn expand_key(key: &[u8; L]) -> [uint let mut expanded_keys: [uint8x16_t; N] = mem::zeroed(); - // Sanity check, as this is required in order for the following line to be sound. - // We'd rather panic than exhibit undefined behavior. + // Sanity check, as this is required in order for the subsequent conversion to be sound. const _: () = assert!(mem::align_of::() >= mem::align_of::()); let keys_ptr: *mut u32 = expanded_keys.as_mut_ptr().cast(); let columns = slice::from_raw_parts_mut(keys_ptr, N * BLOCK_WORDS);