Reference implementation of AES in CTR mode