Improved tests.
Made CTR constant time.