Score:1

AES substitution box and key expansion question

us flag

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?
nobody avatar
lk flag
Static and static.
kelalaka avatar
in flag
@nobody is right. If you want to learn AES start from [Stick figure guide to AES](http://www.moserware.com/2009/09/stick-figure-guide-to-advanced.html) then start reading [AES's book](https://www.amazon.com/Design-Rijndael-Encryption-Information-Cryptography-ebook/dp/B0894CJP3S/) and look at some simple implementations, too.
kelalaka avatar
in flag
[twofish has one](https://www.amazon.com/Twofish-Encryption-Algorithm-128-Bit-Cipher/dp/0471353817/), too. And you might be interested in [Block Cipher Companion](https://www.amazon.com/Cipher-Companion-Information-Security-Cryptography-ebook/dp/B009SZ0F44/), too
Score:1
cn flag
  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.

us flag
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?
cn flag
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.
mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.