From 755623b0dcc0137c070c63a74e61f48df751d369 Mon Sep 17 00:00:00 2001 From: Manuel Thalmann Date: Tue, 7 Nov 2023 19:25:41 +0100 Subject: [PATCH] Implement `subBytes` --- aes/aes.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/aes/aes.cpp b/aes/aes.cpp index 5a95573..c5cde46 100644 --- a/aes/aes.cpp +++ b/aes/aes.cpp @@ -78,7 +78,9 @@ uint32_t subWord(uint32_t w) { } void subBytes(t_state s) { - s[0] = 0; /* ??? */ + for (uint8_t i = 0; i < 4; i++) { + s[i] = subWord(s[i]); + } }