Properly use AES in CTR mode