http://www.moserware.com/2009/09/stick-figure-guide-to-advanced.html Moserware About A Stick Figure Guide to the Advanced Encryption Standard (AES) Sep 22, 2009 (A play in 4 acts. Please feel free to exit along with the stage character that best represents you. Take intermissions as you see fit. Click on the stage if you have a hard time seeing it. If you get bored, you can jump to the code. Most importantly, enjoy the show!) Act 1: Once Upon a Time... intro sad aes act 1 scene 03 cinderella aes act 1 scene 04 started aes act 1 scene 05 judge aes act 1 scene 06 nbs decree aes act 1 scene 07 lucifer aes act 1 scene 08 anoint des aes act 1 scene 09 des ruled aes act 1 scene 10 des defeated aes act 1 scene 11 triple des aes act 1 scene 12 nist decree aes act 1 scene 13 rallied aes act 1 scene 14 rijndael aes act 1 scene 15 vote aes act 1 scene 16 won aes act 1 scene 17 intel aes act 1 scene 18 crypto question Act 2: Crypto Basics aes act 2 scene 01 three big ideas aes act 2 scene 02 confusion aes act 2 scene 03 diffusion aes act 2 scene 04 key secrecy aes act 2 scene 05 aes details question Act 3: Details aes act 3 scene 01 sign this aes act 3 scene 02 agreement aes act 3 scene 03 state matrix aes act 3 scene 04 initial round aes act 3 scene 05 xor tribute aes act 3 scene 06 key expansion part 1 aes act 3 scene 07 key expansion part 2a aes act 3 scene 08 key expansion part 2b aes act 3 scene 09 key expansion part 3 aes act 3 scene 10 intermediate round start aes act 3 scene 11 substitute bytes aes act 3 scene 12 shift rows aes act 3 scene 13 mix columns aes act 3 scene 14 add round key aes act 3 scene 15 final round aes act 3 scene 16 more rounds the merrier aes act 3 scene 17 tradeoffs aes act 3 scene 18 security margin aes act 3 scene 19 in pictures aes act 3 scene 20 decrypting aes act 3 scene 21 modes aes act 3 scene 22 questions what really happens aes act 3 scene 23 math Act 4: Math! aes act 4 scene 01 algebra class aes act 4 scene 02 reviewing the basics aes act 4 scene 03 algebra coefficients aes act 4 scene 04 remember multiplication growth aes act 4 scene 05 cant go bigger aes act 4 scene 06 clock math aes act 4 scene 07 clock math polynomials aes act 4 scene 08 divide by mx aes act 4 scene 09 logarithms aes act 4 scene 10 using logarithms aes act 4 scene 11 polynomial as byte aes act 4 scene 12 byte operations aes act 4 scene 13 byte inverses aes act 4 scene 14 sbox math aes act 4 scene 15 round constants aes act 4 scene 16 mix columns math aes act 4 scene 17 crib sheet aes act 4 scene 18 got it now aes act 4 scene 19 so much more aes act 4 scene 20 gotta go aes act 4 scene 21 the end Epilogue I created a heavily-commented AES/Rijndael implementation to go along with this post and put it on GitHub. In keeping with the Foot-Shooting Prevention Agreement, it shouldn't be used for production code, but it should be helpful in seeing exactly where all the numbers came from in this play. Several resources were useful in creating this: * [DesignOfRi]The Design of Rijndael is the book on the subject, written by the Rijndael creators. It was helpful in understanding specifics, especially the math (although some parts were beyond me). It's also where I got the math notation and graphical representation in the left and right corners of the scenes describing the layers (SubBytes, ShiftRows, MixColumns, and AddRoundKey). * The FIPS-197 specification formally defines AES and provides a good overview. * The Puzzle Palace, especially chapter 9, was helpful while creating Act 1. For more on how the NSA modified DES, see this. * More on Intel's (and now AMD) inclusion of native AES instructions can be found here and in detail here. - Other helpful resources include Wikipedia, Sam Trenholme's AES math series, and this animation. Please leave a comment if you notice something that can be better explained. Update #1: Several scenes were updated to fix some errors mentioned in the comments. Update #2: By request, I've created a slide show presentation of this play in both PowerPoint and PDF formats. I've licensed them under the Creative Commons Attribution License so that you can use them as you see fit. If you're teaching a class, consider giving extra credit to any student giving a worthy interpretive dance rendition in accordance with the Foot-Shooting Prevention Agreement. Please enable JavaScript to view the comments powered by Disqus. (c) 2015