Lower s2c12 keysize from 32 to 16. The key size should equal the block size, if I read the problem description correctly. Also, replace a for loop with a map.
Convert a clumsy for loop to initialize a list to a simple map function.
Many changes: Improved error and bounds checking. Slight simplifications in some of the logic. Massively improved documentation on how the algorithm works.