X-Git-Url: https://codewiz.org/gitweb?a=blobdiff_plain;f=bertos%2Fsec%2Fbenchmarks.c;h=d0e3cdfffaf8aaacc21d34c47c7508a41c10af10;hb=bb60c722116f1c8401cc4d5653c127d461df1c15;hp=727697d3fba1ec9bb6afc09f5abd93842ee1fddf;hpb=2c11694a46d846418792408b130cd40658cb04fa;p=bertos.git diff --git a/bertos/sec/benchmarks.c b/bertos/sec/benchmarks.c index 727697d3..d0e3cdff 100644 --- a/bertos/sec/benchmarks.c +++ b/bertos/sec/benchmarks.c @@ -1,5 +1,4 @@ #include "benchmarks.h" -#include #include #include @@ -31,8 +30,10 @@ void prng_benchmark(PRNG *prng, const char *hname, int numbytes) prng_reseed(prng, buf); ticks_t t = timer_clock(); + enum { CYCLES = 2048 }; - for (int j=0;j<2048;++j) { + for (int j=0;j= cipher_key_len(c)); + cipher_set_key(c, buf); + + uint8_t iv[cipher_block_len(c)]; + memset(iv, 0, sizeof(iv)); + + ticks_t t = timer_clock(); + enum { CYCLES = 64 }; + + for (int j=0;j