9 gettimeofday(&tv, NULL);
10 return tv.tv_usec * 0.000001 + tv.tv_sec;
28 double min = HUGE_VAL;
31 for (i = 0; i <
count; i++) {
39 if (teardown != NULL) {
62 for (i = 0; i < 50000; i++) {
69 static const unsigned char key[16] = {0};
75 unsigned char scratch[16] = {0};
77 for (i = 0; i < 4000000 / 16; i++) {
84 unsigned char scratch[16] = {0};
86 for (i = 0; i < 4000000 / 16; i++) {
94 for (i = 0; i < 50000; i++) {
101 static const unsigned char key[16] = {0};
107 unsigned char scratch[16] = {0};
109 for (i = 0; i < 4000000 / 16; i++) {
116 unsigned char scratch[16] = {0};
118 for (i = 0; i < 4000000 / 16; i++) {
126 for (i = 0; i < 50000; i++) {
134 static const unsigned char key[16] = {0};
140 unsigned char scratch[16] = {0};
142 for (i = 0; i < 4000000 / 16; i++) {
149 unsigned char scratch[16] = {0};
151 for (i = 0; i < 4000000 / 16; i++) {
static void bench_AES256_encrypt_setup(void *data)
static void print_number(double x)
static void bench_AES192_decrypt(void *data)
static double gettimedouble(void)
static void bench_AES192_encrypt_setup(void *data)
static void bench_AES192_init(void *data)
static void bench_AES256_decrypt(void *data)
static void run_benchmark(char *name, void(*benchmark)(void *), void(*setup)(void *), void(*teardown)(void *), void *data, int count, int iter)
static void bench_AES128_init(void *data)
static void bench_AES128_decrypt(void *data)
static void bench_AES128_encrypt(void *data)
static void bench_AES256_encrypt(void *data)
static void bench_AES128_encrypt_setup(void *data)
static void bench_AES192_encrypt(void *data)
static void bench_AES256_init(void *data)
void AES128_encrypt(const AES128_ctx *ctx, size_t blocks, unsigned char *cipher16, const unsigned char *plain16)
void AES256_encrypt(const AES256_ctx *ctx, size_t blocks, unsigned char *cipher16, const unsigned char *plain16)
void AES192_decrypt(const AES192_ctx *ctx, size_t blocks, unsigned char *plain16, const unsigned char *cipher16)
void AES256_init(AES256_ctx *ctx, const unsigned char *key32)
void AES256_decrypt(const AES256_ctx *ctx, size_t blocks, unsigned char *plain16, const unsigned char *cipher16)
void AES192_encrypt(const AES192_ctx *ctx, size_t blocks, unsigned char *cipher16, const unsigned char *plain16)
void AES128_decrypt(const AES128_ctx *ctx, size_t blocks, unsigned char *plain16, const unsigned char *cipher16)
void AES128_init(AES128_ctx *ctx, const unsigned char *key16)
void AES192_init(AES192_ctx *ctx, const unsigned char *key24)