3 This file is part of the AVR-Crypto-Lib.
4 Copyright (C) 2008 Daniel Otte (daniel.otte@rub.de)
6 This program is free software: you can redistribute it and/or modify
7 it under the terms of the GNU General Public License as published by
8 the Free Software Foundation, either version 3 of the License, or
9 (at your option) any later version.
11 This program is distributed in the hope that it will be useful,
12 but WITHOUT ANY WARRANTY; without even the implied warranty of
13 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 GNU General Public License for more details.
16 You should have received a copy of the GNU General Public License
17 along with this program. If not, see <http://www.gnu.org/licenses/>.
31 #include "nessie_bc_test.h"
33 #include "performance_test.h"
36 #include "bcal_aes128.h"
37 #include "bcal_aes192.h"
38 #include "bcal_aes256.h"
40 #include "bcal-cfb_byte.h"
41 #include "bcal-cfb_bit.h"
44 #include "bcal-cmac.h"
50 #include <avr/pgmspace.h>
52 char* algo_name = "AES";
54 const bcdesc_t* algolist[] PROGMEM = {
55 (bcdesc_t*)&aes128_desc,
56 (bcdesc_t*)&aes192_desc,
57 (bcdesc_t*)&aes256_desc,
61 /*****************************************************************************
62 * additional validation-functions *
63 *****************************************************************************/
65 void testrun_nessie_aes(void){
66 nessie_bc_ctx.blocksize_B = 16;
67 nessie_bc_ctx.keysize_b = 128;
68 nessie_bc_ctx.name = algo_name;
69 nessie_bc_ctx.ctx_size_B = sizeof(aes128_ctx_t);
70 nessie_bc_ctx.cipher_enc = (nessie_bc_enc_fpt)aes128_enc;
71 nessie_bc_ctx.cipher_dec = (nessie_bc_dec_fpt)aes128_dec;
72 nessie_bc_ctx.cipher_genctx = (nessie_bc_gen_fpt)aes_init;
75 nessie_bc_ctx.keysize_b = 192;
76 nessie_bc_ctx.ctx_size_B = sizeof(aes192_ctx_t);
77 nessie_bc_ctx.cipher_enc = (nessie_bc_enc_fpt)aes192_enc;
78 nessie_bc_ctx.cipher_dec = (nessie_bc_dec_fpt)aes192_dec;
81 nessie_bc_ctx.keysize_b = 256;
82 nessie_bc_ctx.ctx_size_B = sizeof(aes256_ctx_t);
83 nessie_bc_ctx.cipher_enc = (nessie_bc_enc_fpt)aes256_enc;
84 nessie_bc_ctx.cipher_dec = (nessie_bc_dec_fpt)aes256_dec;
88 void testrun_test_aes(void){
89 uint8_t key[16] = { 0x2b, 0x7e, 0x15, 0x16,
90 0x28, 0xae, 0xd2, 0xa6,
91 0xab, 0xf7, 0x15, 0x88,
92 0x09, 0xcf, 0x4f, 0x3c };
93 uint8_t data[16] = { 0x32, 0x43, 0xf6, 0xa8,
94 0x88, 0x5a, 0x30, 0x8d,
95 0x31, 0x31, 0x98, 0xa2,
96 0xe0, 0x37, 0x07, 0x34 };
98 aes128_init(key, &ctx);
99 cli_putstr_P(PSTR("\r\n\r\n cipher test (FIPS 197):\r\n key: "));
100 cli_hexdump(key, 16);
101 cli_putstr_P(PSTR("\r\n plaintext: "));
102 cli_hexdump(data, 16);
103 aes128_enc(data, &ctx);
104 cli_putstr_P(PSTR("\r\n ciphertext: "));
105 cli_hexdump(data, 16);
106 aes128_dec(data, &ctx);
107 cli_putstr_P(PSTR("\r\n plaintext: "));
108 cli_hexdump(data, 16);
109 cli_putstr(PSTR("\r\n testing bcal:"));
110 bcgen_ctx_t bcal_ctx;
112 r = bcal_cipher_init(&aes128_desc, key, 128, &bcal_ctx);
113 cli_putstr_P(PSTR("\r\n init = 0x"));
116 bcal_cipher_enc(data, &bcal_ctx);
117 cli_putstr_P(PSTR("\r\n ciphertext: "));
118 cli_hexdump(data, 16);
119 bcal_cipher_dec(data, &bcal_ctx);
120 cli_putstr_P(PSTR("\r\n plaintext: "));
121 cli_hexdump(data, 16);
122 bcal_cipher_free(&bcal_ctx);
125 void testrun_testkey_aes128(void){
126 uint8_t key[16] = { 0x2b, 0x7e, 0x15, 0x16,
127 0x28, 0xae, 0xd2, 0xa6,
128 0xab, 0xf7, 0x15, 0x88,
129 0x09, 0xcf, 0x4f, 0x3c};
132 aes128_init(key, &ctx);
133 cli_putstr_P(PSTR("\r\n\r\n keyschedule test (FIPS 197):\r\n key: "));
134 cli_hexdump(key, 16);
136 cli_putstr_P(PSTR("\r\n index: "));
139 cli_putstr_P(PSTR(" roundkey "));
140 cli_hexdump(ctx.key[i].ks, 16);
144 void testrun_testkey_aes192(void){
145 uint8_t key[24] = { 0x8e, 0x73, 0xb0, 0xf7,
146 0xda, 0x0e, 0x64, 0x52,
147 0xc8, 0x10, 0xf3, 0x2b,
148 0x80, 0x90, 0x79, 0xe5,
149 0x62, 0xf8, 0xea, 0xd2,
150 0x52, 0x2c, 0x6b, 0x7b};
153 memset(&ctx, 0, sizeof(aes192_ctx_t));
154 aes192_init(key, &ctx);
155 cli_putstr_P(PSTR("\r\n\r\n keyschedule test (FIPS 197):\r\n key: "));
156 cli_hexdump(key, 24);
158 cli_putstr_P(PSTR("\r\n index: "));
161 cli_putstr_P(PSTR(" roundkey "));
162 cli_hexdump(ctx.key[i].ks, 16);
167 void testrun_testkey_aes256(void){
168 uint8_t key[32] = { 0x60, 0x3d, 0xeb, 0x10,
169 0x15, 0xca, 0x71, 0xbe,
170 0x2b, 0x73, 0xae, 0xf0,
171 0x85, 0x7d, 0x77, 0x81,
172 0x1f, 0x35, 0x2c, 0x07,
173 0x3b, 0x61, 0x08, 0xd7,
174 0x2d, 0x98, 0x10, 0xa3,
175 0x09, 0x14, 0xdf, 0xf4};
178 memset(&ctx, 0, sizeof(aes256_ctx_t));
179 aes256_init(key, &ctx);
180 cli_putstr_P(PSTR("\r\n\r\n keyschedule test (FIPS 197):\r\n key: "));
181 cli_hexdump(key, 32);
183 cli_putstr_P(PSTR("\r\n index: "));
186 cli_putstr_P(PSTR(" roundkey "));
187 cli_hexdump(ctx.key[i].ks, 16);
191 void testrun_testkey_aes(void){
192 testrun_testkey_aes128();
193 testrun_testkey_aes192();
194 testrun_testkey_aes256();
197 uint8_t modes_key[] PROGMEM = {
198 0x2b, 0x7e, 0x15, 0x16, 0x28, 0xae, 0xd2, 0xa6,
199 0xab, 0xf7, 0x15, 0x88, 0x09, 0xcf, 0x4f, 0x3c,
200 0x1f, 0x35, 0x2c, 0x07, 0x3b, 0x61, 0x08, 0xd7,
201 0x2d, 0x98, 0x10, 0xa3, 0x09, 0x14, 0xdf, 0xf4
203 uint8_t modes_iv[] PROGMEM = {
204 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07,
205 0x08, 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f
208 uint8_t modes_ctriv[] PROGMEM = {
209 0xf0, 0xf1, 0xf2, 0xf3, 0xf4, 0xf5, 0xf6, 0xf7,
210 0xf8, 0xf9, 0xfa, 0xfb, 0xfc, 0xfd, 0xfe, 0xff
213 uint8_t modes_plain[] PROGMEM = {
214 0x6b, 0xc1, 0xbe, 0xe2, 0x2e, 0x40, 0x9f, 0x96,
215 0xe9, 0x3d, 0x7e, 0x11, 0x73, 0x93, 0x17, 0x2a,
217 0xae, 0x2d, 0x8a, 0x57, 0x1e, 0x03, 0xac, 0x9c,
218 0x9e, 0xb7, 0x6f, 0xac, 0x45, 0xaf, 0x8e, 0x51,
220 0x30, 0xc8, 0x1c, 0x46, 0xa3, 0x5c, 0xe4, 0x11,
221 0xe5, 0xfb, 0xc1, 0x19, 0x1a, 0x0a, 0x52, 0xef,
223 0xf6, 0x9f, 0x24, 0x45, 0xdf, 0x4f, 0x9b, 0x17,
224 0xad, 0x2b, 0x41, 0x7b, 0xe6, 0x6c, 0x37, 0x10
228 void testrun_aes128_cbc(void){
236 memcpy_P(key, modes_key, 16);
237 memcpy_P(iv, modes_iv, 16);
238 memcpy_P(plain, modes_plain, 64);
240 cli_putstr_P(PSTR("\r\n** AES128-CBC-TEST **"));
241 r = bcal_cbc_init(&aes128_desc, key, 128, &ctx);
242 cli_putstr_P(PSTR("\r\n init = 0x"));
244 cli_putstr_P(PSTR("\r\n key: "));
245 cli_hexdump(key, 128/8);
246 cli_putstr_P(PSTR("\r\n IV: "));
247 cli_hexdump(iv, 128/8);
248 cli_putstr_P(PSTR("\r\n plaintext:"));
249 cli_hexdump_block(plain, 4*128/8, 4, 16);
252 bcal_cbc_encMsg(iv, plain, 4, &ctx);
253 cli_putstr_P(PSTR("\r\n ciphertext: "));
254 cli_hexdump_block(plain, 4*128/8, 4, 16);
255 bcal_cbc_decMsg(iv, plain, 4, &ctx);
256 cli_putstr_P(PSTR("\r\n plaintext: "));
257 cli_hexdump_block(plain, 4*128/8, 4, 16);
261 void testrun_aes128_cfb8(void){
266 bcal_cfb_B_ctx_t ctx;
269 memcpy_P(key, modes_key, 16);
270 memcpy_P(iv, modes_iv, 16);
271 memcpy_P(plain, modes_plain, 64);
273 cli_putstr_P(PSTR("\r\n** AES128-CFB8-TEST **"));
274 r = bcal_cfb_B_init(&aes128_desc, key, 128, 8, &ctx);
275 cli_putstr_P(PSTR("\r\n init = 0x"));
277 cli_putstr_P(PSTR("\r\n key: "));
278 cli_hexdump(key, 128/8);
279 cli_putstr_P(PSTR("\r\n IV: "));
280 cli_hexdump(iv, 128/8);
281 cli_putstr_P(PSTR("\r\n plaintext:"));
282 cli_hexdump_block(plain, 4*128/8, 4, 16);
285 bcal_cfb_B_encMsg(iv, plain, 64, &ctx);
286 cli_putstr_P(PSTR("\r\n ciphertext: "));
287 cli_hexdump_block(plain, 64, 4, 16);
289 bcal_cfb_B_decMsg(iv, plain, 64, &ctx);
290 cli_putstr_P(PSTR("\r\n plaintext: "));
291 cli_hexdump_block(plain, 64, 4, 16);
293 bcal_cfb_B_free(&ctx);
297 void testrun_aes128_cfb1(void){
302 bcal_cfb_b_ctx_t ctx;
305 memcpy_P(key, modes_key, 16);
306 memcpy_P(iv, modes_iv, 16);
307 memcpy_P(plain, modes_plain, 64);
309 cli_putstr_P(PSTR("\r\n** AES128-CFB1-TEST **"));
310 r = bcal_cfb_b_init(&aes128_desc, key, 128, 1, &ctx);
311 cli_putstr_P(PSTR("\r\n init = 0x"));
313 cli_putstr_P(PSTR("\r\n key: "));
314 cli_hexdump(key, 128/8);
315 cli_putstr_P(PSTR("\r\n IV: "));
316 cli_hexdump(iv, 128/8);
317 cli_putstr_P(PSTR("\r\n plaintext:"));
318 cli_hexdump_block(plain, 2, 4, 16);
321 uint8_t i, bit_offset, byte_offset;
322 bcal_cfb_b_loadIV(iv, &ctx);
326 cli_putstr_P(PSTR("\r\n plain bit: "));
327 cli_putc((plain[byte_offset]&(1<<(7-bit_offset)))?'1':'0');
328 bcal_cfb_b_encNext(plain+byte_offset, bit_offset, &ctx);
329 cli_putstr_P(PSTR("\r\n cipher bit: "));
330 cli_putc((plain[byte_offset]&(1<<(7-bit_offset)))?'1':'0');
332 cli_putstr_P(PSTR("\r\n ciphertext: "));
333 cli_hexdump_block(plain, 2, 4, 16);
335 bcal_cfb_b_loadIV(iv, &ctx);
339 cli_putstr_P(PSTR("\r\n plain bit: "));
340 cli_putc((plain[byte_offset]&(1<<(7-bit_offset)))?'1':'0');
341 bcal_cfb_b_decNext(plain+byte_offset, bit_offset, &ctx);
342 cli_putstr_P(PSTR("\r\n cipher bit: "));
343 cli_putc((plain[byte_offset]&(1<<(7-bit_offset)))?'1':'0');
345 cli_putstr_P(PSTR("\r\n plaintext: "));
346 cli_hexdump_block(plain, 2, 4, 16);
349 bcal_cfb_b_encMsg(iv, plain, 0, 64*8, &ctx);
350 cli_putstr_P(PSTR("\r\n ciphertext: "));
351 cli_hexdump_block(plain, 64, 4, 16);
353 bcal_cfb_b_decMsg(iv, plain, 0, 64*8, &ctx);
354 cli_putstr_P(PSTR("\r\n plaintext: "));
355 cli_hexdump_block(plain, 64, 4, 16);
357 bcal_cfb_b_free(&ctx);
360 void testrun_aes128_ofb(void){
368 memcpy_P(key, modes_key, 16);
369 memcpy_P(iv, modes_iv, 16);
370 memcpy_P(plain, modes_plain, 64);
372 cli_putstr_P(PSTR("\r\n** AES128-OFB-TEST **"));
373 r = bcal_ofb_init(&aes128_desc, key, 128, &ctx);
374 cli_putstr_P(PSTR("\r\n init = 0x"));
376 cli_putstr_P(PSTR("\r\n key: "));
377 cli_hexdump(key, 128/8);
378 cli_putstr_P(PSTR("\r\n IV: "));
379 cli_hexdump(iv, 128/8);
380 cli_putstr_P(PSTR("\r\n plaintext:"));
381 cli_hexdump_block(plain, 4*128/8, 4, 16);
384 bcal_ofb_encMsg(iv, plain, 4*128, &ctx);
385 cli_putstr_P(PSTR("\r\n ciphertext: "));
386 cli_hexdump_block(plain, 4*128/8, 4, 16);
387 bcal_ofb_decMsg(iv, plain, 4*128, &ctx);
388 cli_putstr_P(PSTR("\r\n plaintext: "));
389 cli_hexdump_block(plain, 4*128/8, 4, 16);
393 void testrun_aes128_ctr(void){
401 memcpy_P(key, modes_key, 16);
402 memcpy_P(iv, modes_ctriv, 16);
403 memcpy_P(plain, modes_plain, 64);
405 cli_putstr_P(PSTR("\r\n** AES128-CTR-TEST **"));
406 r = bcal_ctr_init(&aes128_desc, key, 128, NULL, &ctx);
407 cli_putstr_P(PSTR("\r\n init = 0x"));
409 cli_putstr_P(PSTR("\r\n key: "));
410 cli_hexdump(key, 128/8);
411 cli_putstr_P(PSTR("\r\n IV: "));
412 cli_hexdump(iv, 128/8);
413 cli_putstr_P(PSTR("\r\n plaintext:"));
414 cli_hexdump_block(plain, 4*128/8, 4, 16);
417 bcal_ctr_encMsg(iv, plain, 4*128, &ctx);
418 cli_putstr_P(PSTR("\r\n ciphertext: "));
419 cli_hexdump_block(plain, 4*128/8, 4, 16);
420 bcal_ctr_decMsg(iv, plain, 4*128, &ctx);
421 cli_putstr_P(PSTR("\r\n plaintext: "));
422 cli_hexdump_block(plain, 4*128/8, 4, 16);
426 void testrun_aes128_cmac(void){
430 uint16_t length[] = { 0, 128, 320, 512 };
434 memcpy_P(key, modes_key, 16);
435 memcpy_P(plain, modes_plain, 64);
437 cli_putstr_P(PSTR("\r\n** AES128-CMAC-TEST **"));
439 cli_putstr_P(PSTR("\r\n key: "));
440 cli_hexdump(key, 128/8);
442 r = bcal_cmac_init(&aes128_desc, key, 128, &ctx);
443 cli_putstr_P(PSTR("\r\n init = 0x"));
445 cli_putstr_P(PSTR("\r\n message: "));
446 cli_hexdump_block(plain, length[i]/8, 4, 16);
449 bcal_cmac(tag, 128, plain, length[i], &ctx);
450 cli_putstr_P(PSTR("\r\n tag: "));
451 cli_hexdump_block(tag, 128/8, 4, 16);
452 bcal_cmac_free(&ctx);
459 Key = 3250974e306b4b678f914b514d1e90f6
460 Msg = cf132fd4ebc25fd3866f1a95a6193a1a9cdf
462 void testrun_aes128_cmac72(void){
464 0x32, 0x50, 0x97, 0x4e, 0x30, 0x6b, 0x4b, 0x67,
465 0x8f, 0x91, 0x4b, 0x51, 0x4d, 0x1e, 0x90, 0xf6
468 uint8_t plain[18] = {
469 0xcf, 0x13, 0x2f, 0xd4, 0xeb, 0xc2, 0x5f, 0xd3,
470 0x86, 0x6f, 0x1a, 0x95, 0xa6, 0x19, 0x3a, 0x1a,
477 cli_putstr_P(PSTR("\r\n** AES128-CMAC-72-TEST **"));
479 cli_putstr_P(PSTR("\r\n key: "));
480 cli_hexdump(key, 128/8);
481 r = bcal_cmac_init(&aes128_desc, key, 128, &ctx);
482 cli_putstr_P(PSTR("\r\n init = 0x"));
484 cli_putstr_P(PSTR("\r\n message: "));
485 cli_hexdump_block(plain, 18, 4, 16);
488 bcal_cmac(tag, 16, plain, 18*8, &ctx);
489 cli_putstr_P(PSTR("\r\n tag: "));
490 cli_hexdump_block(tag, 2, 4, 16);
491 bcal_cmac_free(&ctx);
498 Key = 2b2aaa666be161ed16648e862ac9bd1e317f71bc69e268b5
501 void testrun_aes192_cmac0(void){
503 0x2b, 0x2a, 0xaa, 0x66, 0x6b, 0xe1, 0x61, 0xed,
504 0x16, 0x64, 0x8e, 0x86, 0x2a, 0xc9, 0xbd, 0x1e,
505 0x31, 0x7f, 0x71, 0xbc, 0x69, 0xe2, 0x68, 0xb5
515 cli_putstr_P(PSTR("\r\n** AES192-CMAC-0-TEST **"));
517 cli_putstr_P(PSTR("\r\n key: "));
518 cli_hexdump(key, 192/8);
519 r = bcal_cmac_init(&aes192_desc, key, 192, &ctx);
520 cli_putstr_P(PSTR("\r\n init = 0x"));
524 bcal_cmac(tag, 16, plain, 0*8, &ctx);
525 cli_putstr_P(PSTR("\r\n tag: "));
526 cli_hexdump_block(tag, 2, 4, 16);
527 bcal_cmac_free(&ctx);
530 /*****************************************************************************/
532 void testrun_performance_aes128(void){
535 uint8_t key[32], data[16];
545 aes128_init(key, &ctx);
547 cli_putstr_P(PSTR("\r\n\tctx-gen time: "));
548 ultoa((unsigned long)t, str, 10);
553 aes128_enc(data, &ctx);
555 cli_putstr_P(PSTR("\r\n\tencrypt time: "));
556 ultoa((unsigned long)t, str, 10);
561 aes128_dec(data, &ctx);
563 cli_putstr_P(PSTR("\r\n\tdecrypt time: "));
564 ultoa((unsigned long)t, str, 10);
567 cli_putstr_P(PSTR("\r\n"));
571 void testrun_performance_aes192(void){
574 uint8_t key[32], data[16];
584 aes192_init(key, &ctx);
586 cli_putstr_P(PSTR("\r\n\tctx-gen time: "));
587 ultoa((unsigned long)t, str, 10);
592 aes192_enc(data, &ctx);
594 cli_putstr_P(PSTR("\r\n\tencrypt time: "));
595 ultoa((unsigned long)t, str, 10);
600 aes192_dec(data, &ctx);
602 cli_putstr_P(PSTR("\r\n\tdecrypt time: "));
603 ultoa((unsigned long)t, str, 10);
606 cli_putstr_P(PSTR("\r\n"));
610 void testrun_performance_aes256(void){
613 uint8_t key[32], data[16];
623 aes256_init(key, &ctx);
625 cli_putstr_P(PSTR("\r\n\tctx-gen time: "));
626 ultoa((unsigned long)t, str, 10);
631 aes256_enc(data, &ctx);
633 cli_putstr_P(PSTR("\r\n\tencrypt time: "));
634 ultoa((unsigned long)t, str, 10);
639 aes256_dec(data, &ctx);
641 cli_putstr_P(PSTR("\r\n\tdecrypt time: "));
642 ultoa((unsigned long)t, str, 10);
645 cli_putstr_P(PSTR("\r\n"));
648 void testrun_performance_aes(void){
649 cli_putstr_P(PSTR("\r\n -=AES Performance Test=-\r\n"));
650 cli_putstr_P(PSTR("\r\n AES-128\r\n"));
651 testrun_performance_aes128();
652 cli_putstr_P(PSTR("\r\n AES-192\r\n"));
653 testrun_performance_aes192();
654 cli_putstr_P(PSTR("\r\n AES-256\r\n"));
655 testrun_performance_aes256();
657 /*****************************************************************************
659 *****************************************************************************/
661 const char nessie_str[] PROGMEM = "nessie";
662 const char test_str[] PROGMEM = "test";
663 const char testkey_str[] PROGMEM = "testkey";
664 const char testcbc_str[] PROGMEM = "testcbc";
665 const char testcfb8_str[] PROGMEM = "testcfb8";
666 const char testcfb1_str[] PROGMEM = "testcfb1";
667 const char testofb_str[] PROGMEM = "testofb";
668 const char testctr_str[] PROGMEM = "testctr";
669 const char testcmac_str[] PROGMEM = "testcmac";
670 const char testcmac72_str[] PROGMEM = "testcmac72";
671 const char testcmac0_str[] PROGMEM = "testcmac0";
672 const char cmacvs_list_str[] PROGMEM = "cmacvs_list";
673 const char cmacvs_set_str[] PROGMEM = "cmacvs_set";
674 const char cmacvs_test1_str[] PROGMEM = "cmacvs_test1";
675 const char cmacvs_test2_str[] PROGMEM = "cmacvs_test2";
676 const char performance_str[] PROGMEM = "performance";
677 const char dump_str[] PROGMEM = "dump";
678 const char echo_str[] PROGMEM = "echo";
680 cmdlist_entry_t cmdlist[] PROGMEM = {
681 { nessie_str, NULL, testrun_nessie_aes },
682 { test_str, NULL, testrun_test_aes },
683 { testkey_str, NULL, testrun_testkey_aes },
684 { testcbc_str, NULL, testrun_aes128_cbc },
685 { testcfb8_str, NULL, testrun_aes128_cfb8 },
686 { testcfb1_str, NULL, testrun_aes128_cfb1 },
687 { testofb_str, NULL, testrun_aes128_ofb },
688 { testctr_str, NULL, testrun_aes128_ctr },
689 { testcmac_str, NULL, testrun_aes128_cmac },
690 { testcmac72_str, NULL, testrun_aes128_cmac72 },
691 { testcmac0_str, NULL, testrun_aes192_cmac0 },
692 { cmacvs_list_str, NULL, cmacvs_listalgos },
693 { cmacvs_set_str, (void*)1, (void_fpt)cmacvs_setalgo },
694 { cmacvs_test1_str, NULL, cmacvs_test1 },
695 { cmacvs_test2_str, NULL, cmacvs_test2 },
696 { performance_str, NULL, testrun_performance_aes },
697 { dump_str, (void*)1, (void_fpt)dump },
698 { echo_str, (void*)1, (void_fpt)echo_ctrl },
706 cli_rx = (cli_rx_fpt)uart0_getc;
707 cli_tx = (cli_tx_fpt)uart0_putc;
708 cmacvs_algolist=(bcdesc_t**)algolist;
709 cmacvs_algo=(bcdesc_t*)&aes128_desc;
711 cli_putstr_P(PSTR("\r\n\r\nCrypto-VS ("));
712 cli_putstr(algo_name);
713 cli_putstr_P(PSTR(")\r\nloaded and running\r\n"));
714 cmd_interface(cmdlist);