S3C2: implement CTR mode.