INNER CODE UNIT · Rust
test_parse_aes_post_key_schedule
ethereum/mpz · crates/circuits-data/src/lib.rs:118
fn test_parse_aes_post_key_schedule() {
let (_, ks, msg, expected_out) = aes_vectors();
let output: [u8; 16] = evaluate!(AES128_POST_KS, ks, msg).unwrap();
assert_eq!(expected_out, output);
}
#[test]
#[cfg(feature = "sha2")]
fn test_sha256_compress() {
static SHA2_INITIAL_STATE: [u32; 8] = [
0x6a09e667, 0xbb67ae85, 0x3c6ef372, 0xa54ff53a, 0x510e527f, 0x9b05688c, 0x1f83d9ab,
0x5be0cd19,
];
fn sha256_compress(msg: [u8; 64], state: [u32; 8]) -> [u32; 8] {
let mut state = state;
sha2::block_api::compress256(&mut state, &[msg]);
state