Home

Awesome

ctaes

Simple C module for constant-time AES encryption and decryption.

Features:

Performance

Compiled with GCC 5.3.1 with -O3, on an Intel(R) Core(TM) i7-4800MQ CPU, numbers in CPU cycles:

AlgorithmKey scheduleEncryption per byteDecryption per byte
AES-1282.8k154161
AES-1923.1k169181
AES-2564.0k191203

Build steps

Object code:

$ gcc -O3 ctaes.c -c -o ctaes.o

Tests:

$ gcc -O3 ctaes.c test.c -o test

Benchmark:

$ gcc -O3 ctaes.c bench.c -o bench

Review

Results of a formal review of the code can be found in http://bitcoin.sipa.be/ctaes/review.zip