From bf272e47b6ddab170acf3292cfb8cc0daa96fbe9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Milan=20=C5=A0pinka?= Date: Sun, 26 Jan 2025 15:20:43 +0100 Subject: [PATCH] Correct AES decryption. --- src/primitive/blockcipher/aes.zig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/primitive/blockcipher/aes.zig b/src/primitive/blockcipher/aes.zig index 421fd57..1176a87 100644 --- a/src/primitive/blockcipher/aes.zig +++ b/src/primitive/blockcipher/aes.zig @@ -110,7 +110,7 @@ pub fn aes_decrypt_block(n_rounds: comptime_int, block_in: *const [AES_BLOCK_SIZ // Finish last round. aes_inv_shift_rows(&state); - aes_sub_bytes(&state); + aes_inv_sub_bytes(&state); aes_add_round_key(&state, expanded_key[0..4]); // Write the result into the destination buffer.