write AES encryption module