# AES substitution box and key expansion question

I'm reading FIPS 197 (AES) to try and understand how the algorithm works but I don't yet have answer for are these two questions:

1. I see the 256 byte s-box for substituting during the rounds. Do the values in this 256 byte table get updated or is it a static table for the whole transformation?
2. In key expansion, I see that the key is expanded based on the amount of rounds there are which determined by the size of the key (128, 192, or 256). But does the expanded key ever change or is it static for the whole transformation?
• Static and static. Commented Feb 13, 2022 at 23:35
• I choose to believe you and I'm grateful for the information.
– mirkaim
Commented Feb 13, 2022 at 23:52
• @nobody is right. If you want to learn AES start from Stick figure guide to AES then start reading AES's book and look at some simple implementations, too. Commented Feb 14, 2022 at 10:01
• @kelalaka I can't believe I never saw "The Design of Rijndael" before. I will look at both of these. Thank you.
– mirkaim
Commented Feb 14, 2022 at 21:45
• twofish has one, too. And you might be interested in Block Cipher Companion, too Commented Feb 14, 2022 at 22:12

## 1 Answer

1. AES uses one sbox table. The sbox table doesn't change for any key or number of round. Unlike Serpent that has 8 different sbox or blowfish and twofish which the sbox change from the key you give. You can have more details here: https://en.wikipedia.org/wiki/Rijndael_S-box.

2. The key expansion is always the same. The key you provide gives the number of round that AES needs to do and also the number of round key it needs to generate.

• Thanks for the answer. I'm trying to get through descriptions of this cipher (from several sources) but all information is explained in mathematical terms and concepts that I am not familiar with and will need a couple of years of maths to translate so I spend the whole time wondering what the words and symbols mean instead of getting an understanding of the underlying algorithm. Could you clarify if the s-box for AES/Rijndael is unique and based on the key or if every implementation uses the same s-box values? Commented Feb 18, 2022 at 21:54
• AES use a unique sbox table for simplicity.The sbox have the same value on any implementation and they aren't based on the key. The value on the sbox table is what Joan Daemen and Vincent Rijmen choose. On a official paper you should have all the value of the sbox and how they choose these values. Commented Feb 18, 2022 at 22:22