Let's look at a few videos before we go through code in a language that is easier for everybody to understand than C (such as Java or C#)
AES Rijndael Cipher explained as a Flash animation (remember to pause)
https://www.youtube.com/watch?v=gP4PqVGudtg
Lecture 8: Advanced Encryption Standard (AES) by Christof Paar
https://www.youtube.com/watch?v=NHuibtoL_qk
I will post code for the encryption of a simple message, then for a file, (probably explaining some mathematical concepts along the way.) We will look at the decryption process, then we will outline how a method to decrypt without the cipher key would behave. We will study how our government placed a backdoor in the elliptical curve random number generator. We will get to current cryptanalysis efforts on block ciphers and the flaws in their approach.
We'll explore the idea that true, unbreakable mathematical security requires the key to be the same size as the plaintext (which is how One-Time-Pads work), and that because AES does not do this (that would be highly impractical), the patterns of the cipher key must exist in the cipher text.