0

I'm working on the project on breaking AES128 on Arduino (Nano) board. I'm using Arduino IDE. My programming skills aren't great, unfortunately. I need to implement AddRoundKey + SubBytes.

There's the pseudocode that I've found (Thank you Owen Lo, William J. Buchanan and Douglas Carson). But I need to declare variables.

set plainText to a known value for i 0 to 9: delay 500 set LED 13 to HIGH for j 0 to 15: sbox_lookup[j] = s[plainText[j] XOR key[j]] set LED 13 to LOW

"The variable s is an array of 256 bytes and consists of the S-Box entries 0×63 to 0×16 while the sbox_lookup is an array of 16 bytes which stores the S-box lookup result. The plainText variable is an array of 16 bytes which contains our plaintext input. Each plaintext value is known during an attack. As demonstrated in the pseudocode, each plaintext value is operated 10 times in order for an average to be acquired. Furthermore, plaintext values should be known or observable by the attacker. In our implementation, we chose to increment plaintText[] by one each time this routine occurs (e.g. plain text array will start at 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, and end at FF, FF, FF, FF, FF, FF, FF, FF, FF, FF, FF, FF, FF, FF, FF, FF) A delay of 500 ms is implemented before the next iteration occurs to ensure the oscilloscope has enough time to capture the trace. The sbox_lookup[] array is used to store the result of the AddRoundKey and SubBytes operation while s is a 256 byte array which contains the constants of Rijndael S-Box."

Could anyone please help?

Tried to write the code but it isn't working (lack of hard skills).

0 Answers0