X-Git-Url: https://git.cryptolib.org/?p=avr-crypto-lib.git;a=blobdiff_plain;f=test_src%2Fmain-salsa20-test.c;h=3f3560cf097eaf5bd13c3faa5eb98666c99231a5;hp=b14f13888eb204deb96080226e9c3bcb503ac8d9;hb=89bbbf7604fa48ddba5877263220791045b6ee6f;hpb=a012cfa921853fb9b8bd484981ab471a9ba25ec9 diff --git a/test_src/main-salsa20-test.c b/test_src/main-salsa20-test.c index b14f138..3f3560c 100644 --- a/test_src/main-salsa20-test.c +++ b/test_src/main-salsa20-test.c @@ -232,12 +232,11 @@ void testrun_nessie_salsa20(void){ scal_nessie_run(&salsa20_desc); } -/* -void testrun_performance_arcfour(void){ +void testrun_performance_salsa20(void){ uint64_t t; char str[16]; - uint8_t key[16]; - arcfour_ctx_t ctx; + uint8_t key[32]; + salsa20_ctx_t ctx; calibrateTimer(); print_overhead(); @@ -245,14 +244,14 @@ void testrun_performance_arcfour(void){ memset(key, 0, 16); startTimer(1); - arcfour_init(key, 16, &ctx); + salsa20_init(key, 128, NULL, &ctx); t = stopTimer(); cli_putstr_P(PSTR("\r\n\tctx-gen time: ")); ultoa((unsigned long)t, str, 10); cli_putstr(str); startTimer(1); - arcfour_gen(&ctx); + salsa20_gen(&ctx); t = stopTimer(); cli_putstr_P(PSTR("\r\n\tencrypt time: ")); ultoa((unsigned long)t, str, 10); @@ -260,7 +259,7 @@ void testrun_performance_arcfour(void){ cli_putstr_P(PSTR("\r\n")); } -*/ + /***************************************************************************** * main * @@ -273,7 +272,7 @@ const char echo_str[] PROGMEM = "echo"; cmdlist_entry_t cmdlist[] PROGMEM = { { nessie_str, NULL, testrun_nessie_salsa20 }, -// { performance_str, NULL, testrun_performance_arcfour}, + { performance_str, NULL, testrun_performance_salsa20}, { test_str, NULL, spec_test}, { echo_str, (void*)1, (void_fpt)echo_ctrl}, { NULL, NULL, NULL}