Correct AES decryption.

This commit is contained in:
Milan Špinka
2025-01-26 15:20:43 +01:00
parent df0b7a4279
commit bf272e47b6

View File

@ -110,7 +110,7 @@ pub fn aes_decrypt_block(n_rounds: comptime_int, block_in: *const [AES_BLOCK_SIZ
// Finish last round. // Finish last round.
aes_inv_shift_rows(&state); aes_inv_shift_rows(&state);
aes_sub_bytes(&state); aes_inv_sub_bytes(&state);
aes_add_round_key(&state, expanded_key[0..4]); aes_add_round_key(&state, expanded_key[0..4]);
// Write the result into the destination buffer. // Write the result into the destination buffer.