I was looking at this aes source code. https://tls.mbed.org/aes-source-code It is the implementation used in TLS. Scroll down to the key schedule section of the code and the switch. Its been a while since I did any coding and im a little hazy on the -> operator so please correct me if I am reading this wrong. ctx is the context meaning 128, 192 or 256? nr is the number of rounds so into the switch, if we are using aes 256 it is going to switch to case 14 ? 14 rounds being the correct number of rounds for aes 256 but in case 14, the for loop is only 7 iterations, not 14. aes 128, which should have 10 rounds should switch to case 10 and the case 10 for loop does have 10 iterations?