Add AES algorithm to logic package

All the MDA computation seems to "work", but the functions are so big
they explode the memory.