Python
I recently became interested in Python and needed a "beginner" project to get me familiar with the basics of the language. Since I recently sorted out Advanced Encryption Standard (AES) in JavaScript (project page [1]) I decided that might be a nice place to start.
Project
I know this has been done quite a few times, and likely better too, but I wanted to start with something I was familiar with, but also found challenging. This is also not intended to be a final version. This is the first conversion from my JavaScript code so there are a lot of optimizations to be done. As I become more familiar with Python I'm sure I realize how terrible some of the code is, but for now it seems to work well for ASCII text input (haven't tested it with Unicode yet). I'm quite familiar with closures in JavaScript so I'm looking forward to playing with lambda functions which I think will simplify a few of the small functions, but I decided to hold off on this first version. I also started to add a conversion of the SHA2 hash class from my JavaScript implementation, but ran into some issues with ints automatically becoming longs and throwing off the bitwise operations so I decided to just get what worked out now and return to SHA at a later time.
Code
Below is a link to the source. Any suggestions for improvements would be greatly appreciated.
aes_v001.py [2]
Links:
[1] http://www.josh-davis.org/ecmascrypt
[2] http://www.josh-davis.org/files/uploads/2007/06/aes_v001.py