From 2bef33afb473c15096757763ffea5800bfc26450 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 11 Aug 2026 07:18:02 +0000 Subject: [PATCH 1/3] chore(deps): update aes requirement from =0.8.4 to =0.9.2 Updates the requirements on [aes](https://github.com/RustCrypto/block-ciphers) to permit the latest version. - [Commits](https://github.com/RustCrypto/block-ciphers/compare/aes-v0.8.4...aes-v0.9.2) --- updated-dependencies: - dependency-name: aes dependency-version: 0.9.2 dependency-type: direct:production ... Signed-off-by: dependabot[bot] --- crates/binius-mayo/Cargo.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/crates/binius-mayo/Cargo.toml b/crates/binius-mayo/Cargo.toml index de13d44..f0f1286 100644 --- a/crates/binius-mayo/Cargo.toml +++ b/crates/binius-mayo/Cargo.toml @@ -29,7 +29,7 @@ binius-prover = { git = "https://github.com/binius-zk/binius64", rev = "3bc7 binius-verifier = { git = "https://github.com/binius-zk/binius64", rev = "3bc7451dc3c52af6383fcd99892c6892f57e89b0" } binius-hash = { git = "https://github.com/binius-zk/binius64", rev = "3bc7451dc3c52af6383fcd99892c6892f57e89b0" } sha3 = "=0.10.9" -aes = "=0.8.4" +aes = "=0.9.2" rand = "0.10" [dev-dependencies] From 5bf4659a2f2f708d6da6058b4ea85c8481309311 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Tue, 11 Aug 2026 07:20:42 +0000 Subject: [PATCH 2/3] fix(binius-mayo): adapt AES calls for aes 0.9 API Co-authored-by: rymnc <43716372+rymnc@users.noreply.github.com> --- crates/binius-mayo/src/api.rs | 9 +++++---- crates/binius-mayo/tests/common/oracle.rs | 13 +++++++------ 2 files changed, 12 insertions(+), 10 deletions(-) diff --git a/crates/binius-mayo/src/api.rs b/crates/binius-mayo/src/api.rs index 62895c2..33933e1 100644 --- a/crates/binius-mayo/src/api.rs +++ b/crates/binius-mayo/src/api.rs @@ -34,9 +34,9 @@ use std::fmt; use aes::{ Aes128, cipher::{ - BlockEncrypt, + Block, + BlockCipherEncrypt, KeyInit, - generic_array::GenericArray, }, }; use binius_core::word::Word; @@ -666,7 +666,7 @@ fn expand_pk_to_lanes(cpk: &[u8; CPK_BYTES]) -> PkLanes { .expect("CPK_BYTES >= PK_SEED_BYTES"); let p3_packed = &cpk[PK_SEED_BYTES..CPK_BYTES]; - let cipher = Aes128::new(GenericArray::from_slice(pk_seed)); + let cipher = Aes128::new_from_slice(pk_seed).expect("pk_seed must be 16 bytes"); let mut counter: u32 = 0; let mut fill_entry = |entry: &mut [u8; M]| { @@ -674,7 +674,8 @@ fn expand_pk_to_lanes(cpk: &[u8; CPK_BYTES]) -> PkLanes { let mut block = [0u8; 16]; block[12..16].copy_from_slice(&counter.to_be_bytes()); counter = counter.wrapping_add(1); - let mut blk = GenericArray::clone_from_slice(&block); + let mut blk = Block::::default(); + blk.copy_from_slice(&block); cipher.encrypt_block(&mut blk); let off = half * 32; for b in 0..16 { diff --git a/crates/binius-mayo/tests/common/oracle.rs b/crates/binius-mayo/tests/common/oracle.rs index 307311f..5a6c984 100644 --- a/crates/binius-mayo/tests/common/oracle.rs +++ b/crates/binius-mayo/tests/common/oracle.rs @@ -11,9 +11,9 @@ use aes::{ Aes128, cipher::{ - BlockEncrypt, + Block, + BlockCipherEncrypt, KeyInit, - generic_array::GenericArray, }, }; use sha3::{ @@ -299,8 +299,7 @@ pub fn mul_gf16(a: u8, b: u8) -> u8 { /// fallback `aes_c.c`: `iv[16] = {0}` and `ivw[3] = swap32(cc)` → /// counter occupies bytes 12..15 big-endian, starting at 0). fn aes128_ctr_keystream(pk_seed: &[u8; PK_SEED_BYTES], output_len: usize) -> Vec { - let key = GenericArray::from_slice(pk_seed); - let cipher = Aes128::new(key); + let cipher = Aes128::new_from_slice(pk_seed).expect("pk_seed must be 16 bytes"); let n_full = output_len / 16; let tail = output_len % 16; @@ -309,14 +308,16 @@ fn aes128_ctr_keystream(pk_seed: &[u8; PK_SEED_BYTES], output_len: usize) -> Vec for i in 0..n_full { let mut block = [0u8; 16]; block[12..16].copy_from_slice(&(i as u32).to_be_bytes()); - let mut blk = GenericArray::clone_from_slice(&block); + let mut blk = Block::::default(); + blk.copy_from_slice(&block); cipher.encrypt_block(&mut blk); out[i * 16..(i + 1) * 16].copy_from_slice(blk.as_slice()); } if tail > 0 { let mut block = [0u8; 16]; block[12..16].copy_from_slice(&(n_full as u32).to_be_bytes()); - let mut blk = GenericArray::clone_from_slice(&block); + let mut blk = Block::::default(); + blk.copy_from_slice(&block); cipher.encrypt_block(&mut blk); out[n_full * 16..n_full * 16 + tail].copy_from_slice(&blk.as_slice()[..tail]); } From ae40e962d47f59dfbc5d8d287d0d6cf72f6408d7 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Tue, 11 Aug 2026 07:25:52 +0000 Subject: [PATCH 3/3] Apply remaining changes Co-authored-by: rymnc <43716372+rymnc@users.noreply.github.com> --- crates/binius-mayo/tests/common/oracle.rs | 16 ++++++---------- 1 file changed, 6 insertions(+), 10 deletions(-) diff --git a/crates/binius-mayo/tests/common/oracle.rs b/crates/binius-mayo/tests/common/oracle.rs index 5a6c984..a804bb4 100644 --- a/crates/binius-mayo/tests/common/oracle.rs +++ b/crates/binius-mayo/tests/common/oracle.rs @@ -306,20 +306,16 @@ fn aes128_ctr_keystream(pk_seed: &[u8; PK_SEED_BYTES], output_len: usize) -> Vec let mut out = vec![0u8; output_len]; for i in 0..n_full { - let mut block = [0u8; 16]; + let mut block = Block::::default(); block[12..16].copy_from_slice(&(i as u32).to_be_bytes()); - let mut blk = Block::::default(); - blk.copy_from_slice(&block); - cipher.encrypt_block(&mut blk); - out[i * 16..(i + 1) * 16].copy_from_slice(blk.as_slice()); + cipher.encrypt_block(&mut block); + out[i * 16..(i + 1) * 16].copy_from_slice(block.as_slice()); } if tail > 0 { - let mut block = [0u8; 16]; + let mut block = Block::::default(); block[12..16].copy_from_slice(&(n_full as u32).to_be_bytes()); - let mut blk = Block::::default(); - blk.copy_from_slice(&block); - cipher.encrypt_block(&mut blk); - out[n_full * 16..n_full * 16 + tail].copy_from_slice(&blk.as_slice()[..tail]); + cipher.encrypt_block(&mut block); + out[n_full * 16..n_full * 16 + tail].copy_from_slice(&block.as_slice()[..tail]); } out }