+void seed_genctx_dummy(uint8_t* key, uint16_t keysize, void* ctx){
+ seed_init(key, ctx);
+}
+
+void testrun_nessie_seed(void){
+ nessie_bc_ctx.blocksize_B = 16;
+ nessie_bc_ctx.keysize_b = 128;
+ nessie_bc_ctx.name = cipher_name;
+ nessie_bc_ctx.ctx_size_B = sizeof(seed_ctx_t);
+ nessie_bc_ctx.cipher_enc = (nessie_bc_enc_fpt)seed_encrypt;
+ nessie_bc_ctx.cipher_dec = (nessie_bc_dec_fpt)seed_decrypt;
+ nessie_bc_ctx.cipher_genctx = (nessie_bc_gen_fpt)seed_genctx_dummy;
+
+ nessie_bc_run();
+
+}
+
+
+void testrun_performance_seed(void){
+ uint64_t t;
+ char str[16];
+ uint8_t key[16], data[16];
+ seed_ctx_t ctx;
+
+ calibrateTimer();
+ print_overhead();
+
+ memset(key, 0, 16);
+ memset(data, 0, 16);
+
+ startTimer(1);
+ seed_init(key, &ctx);
+ t = stopTimer();
+ uart_putstr_P(PSTR("\r\n\tctx-gen time: "));
+ ultoa((unsigned long)t, str, 10);
+ uart_putstr(str);
+
+
+ startTimer(1);
+ seed_encrypt(data, &ctx);
+ t = stopTimer();
+ uart_putstr_P(PSTR("\r\n\tencrypt time: "));
+ ultoa((unsigned long)t, str, 10);
+ uart_putstr(str);
+
+
+ startTimer(1);
+ seed_decrypt(data, &ctx);
+ t = stopTimer();
+ uart_putstr_P(PSTR("\r\n\tdecrypt time: "));
+ ultoa((unsigned long)t, str, 10);
+ uart_putstr(str);
+
+ uart_putstr_P(PSTR("\r\n"));
+}