]> git.cryptolib.org Git - avr-crypto-lib.git/blobdiff - test_src/main-skipjack-test.c
changing performance measurment of blockciphers to bcal
[avr-crypto-lib.git] / test_src / main-skipjack-test.c
index c37f2bc16680ee787405f8109a66536a1e15667d..3f1c75fd308b420fd8e31532c7be6ed39be695b4 100644 (file)
@@ -30,6 +30,8 @@
 #include "nessie_bc_test.h"
 #include "cli.h"
 #include "performance_test.h"
+#include "bcal-performance.h"
+#include "bcal_skipjack.h"
 
 #include <stdint.h>
 #include <string.h>
 
 char* algo_name = "Skipjack";
 
+const bcdesc_t* algolist[] PROGMEM = {
+       (bcdesc_t*)&skipjack_desc,
+       NULL
+};
 /*****************************************************************************
  *  additional validation-functions                                                                                     *
  *****************************************************************************/
@@ -59,32 +65,7 @@ void testrun_nessie_skipjack(void){
 
 
 void testrun_performance_skipjack(void){
-       uint64_t t;
-       char str[16];
-       uint8_t key[10], data[8];
-       
-       calibrateTimer();
-       print_overhead();
-       
-       memset(key,  0, 10);
-       memset(data, 0,  8);
-       
-       startTimer(1);
-       skipjack_enc(data, key);
-       t = stopTimer();
-       cli_putstr_P(PSTR("\r\n\tencrypt time: "));
-       ultoa((unsigned long)t, str, 10);
-       cli_putstr(str);
-       
-       
-       startTimer(1);
-       skipjack_dec(data, key);
-       t = stopTimer();
-       cli_putstr_P(PSTR("\r\n\tdecrypt time: "));
-       ultoa((unsigned long)t, str, 10);
-       cli_putstr(str);
-       
-       cli_putstr_P(PSTR("\r\n"));
+       bcal_performance_multiple(algolist);
 }
 
 /*****************************************************************************