switching to new main-*-test layout and to stdio streams
This commit is contained in:
parent
4655b60cc2
commit
a45c328791
|
@ -1,3 +1,5 @@
|
||||||
|
MAKE_DEBUG = 1
|
||||||
|
|
||||||
DEBUG = -gdwarf-2
|
DEBUG = -gdwarf-2
|
||||||
WARNING = -pedantic -Wall -Werror -Wstrict-prototypes
|
WARNING = -pedantic -Wall -Werror -Wstrict-prototypes
|
||||||
PROGRAMMER = jtagmkII
|
PROGRAMMER = jtagmkII
|
||||||
|
|
|
@ -1,15 +0,0 @@
|
||||||
# Makefile for AES
|
|
||||||
ALGO_NAME := AES128_C
|
|
||||||
|
|
||||||
# comment out the following line for removement of AES from the build process
|
|
||||||
BLOCK_CIPHERS += $(ALGO_NAME)
|
|
||||||
|
|
||||||
$(ALGO_NAME)_DIR := aes/
|
|
||||||
$(ALGO_NAME)_INCDIR := gf256mul/ bcal/
|
|
||||||
$(ALGO_NAME)_OBJ := aes_enc.o aes_dec.o aes_sbox.o aes_invsbox.o \
|
|
||||||
aes_keyschedule.o gf256mul.o aes128_enc.o aes128_dec.o
|
|
||||||
$(ALGO_NAME)_TESTBIN := main-aes128-test.o $(CLI_STD) $(BCAL_STD) \
|
|
||||||
bcal_aes128.o
|
|
||||||
$(ALGO_NAME)_NESSIE_TEST := test nessie
|
|
||||||
$(ALGO_NAME)_PERFORMANCE_TEST := performance
|
|
||||||
|
|
|
@ -1,15 +0,0 @@
|
||||||
# Makefile for AES
|
|
||||||
ALGO_NAME := AES192_C
|
|
||||||
|
|
||||||
# comment out the following line for removement of AES from the build process
|
|
||||||
BLOCK_CIPHERS += $(ALGO_NAME)
|
|
||||||
|
|
||||||
$(ALGO_NAME)_DIR := aes/
|
|
||||||
$(ALGO_NAME)_INCDIR := gf256mul/ bcal/
|
|
||||||
$(ALGO_NAME)_OBJ := aes_enc.o aes_dec.o aes_sbox.o aes_invsbox.o \
|
|
||||||
aes_keyschedule.o gf256mul.o aes192_enc.o aes192_dec.o
|
|
||||||
$(ALGO_NAME)_TESTBIN := main-aes192-test.o $(CLI_STD) $(BCAL_STD) \
|
|
||||||
bcal_aes192.o
|
|
||||||
$(ALGO_NAME)_NESSIE_TEST := test nessie
|
|
||||||
$(ALGO_NAME)_PERFORMANCE_TEST := performance
|
|
||||||
|
|
|
@ -1,15 +0,0 @@
|
||||||
# Makefile for AES
|
|
||||||
ALGO_NAME := AES256_C
|
|
||||||
|
|
||||||
# comment out the following line for removement of AES from the build process
|
|
||||||
BLOCK_CIPHERS += $(ALGO_NAME)
|
|
||||||
|
|
||||||
$(ALGO_NAME)_DIR := aes/
|
|
||||||
$(ALGO_NAME)_INCDIR := gf256mul/ bcal/
|
|
||||||
$(ALGO_NAME)_OBJ := aes_enc.o aes_dec.o aes_sbox.o aes_invsbox.o \
|
|
||||||
aes_keyschedule.o gf256mul.o aes256_enc.o aes256_dec.o
|
|
||||||
$(ALGO_NAME)_TESTBIN := main-aes256-test.o $(CLI_STD) $(BCAL_STD) \
|
|
||||||
bcal_aes256.o
|
|
||||||
$(ALGO_NAME)_NESSIE_TEST := test nessie
|
|
||||||
$(ALGO_NAME)_PERFORMANCE_TEST := performance
|
|
||||||
|
|
|
@ -21,18 +21,11 @@
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "config.h"
|
#include "main-test-common.h"
|
||||||
|
|
||||||
#include "uart_i.h"
|
#include "A5_1.h"
|
||||||
#include "debug.h"
|
|
||||||
|
|
||||||
#include <A5_1.h>
|
|
||||||
#include "nessie_stream_test.h"
|
#include "nessie_stream_test.h"
|
||||||
|
|
||||||
#include <stdint.h>
|
|
||||||
#include <string.h>
|
|
||||||
#include "cli.h"
|
|
||||||
|
|
||||||
char* algo_name = "A5_1";
|
char* algo_name = "A5_1";
|
||||||
|
|
||||||
/*****************************************************************************
|
/*****************************************************************************
|
||||||
|
@ -76,15 +69,9 @@ const cmdlist_entry_t cmdlist[] PROGMEM = {
|
||||||
};
|
};
|
||||||
|
|
||||||
int main (void){
|
int main (void){
|
||||||
DEBUG_INIT();
|
main_setup();
|
||||||
|
|
||||||
|
|
||||||
cli_rx = (cli_rx_fpt)uart0_getc;
|
|
||||||
cli_tx = (cli_tx_fpt)uart0_putc;
|
|
||||||
for(;;){
|
for(;;){
|
||||||
cli_putstr_P(PSTR("\r\n\r\nCrypto-VS ("));
|
welcome_msg(algo_name);
|
||||||
cli_putstr(algo_name);
|
|
||||||
cli_putstr_P(PSTR(")\r\nloaded and running\r\n"));
|
|
||||||
cmd_interface(cmdlist);
|
cmd_interface(cmdlist);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1,141 +0,0 @@
|
||||||
/* main-aes128-test.c */
|
|
||||||
/*
|
|
||||||
This file is part of the AVR-Crypto-Lib.
|
|
||||||
Copyright (C) 2008 Daniel Otte (daniel.otte@rub.de)
|
|
||||||
|
|
||||||
This program is free software: you can redistribute it and/or modify
|
|
||||||
it under the terms of the GNU General Public License as published by
|
|
||||||
the Free Software Foundation, either version 3 of the License, or
|
|
||||||
(at your option) any later version.
|
|
||||||
|
|
||||||
This program is distributed in the hope that it will be useful,
|
|
||||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
||||||
GNU General Public License for more details.
|
|
||||||
|
|
||||||
You should have received a copy of the GNU General Public License
|
|
||||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
||||||
*/
|
|
||||||
/*
|
|
||||||
* AES-128 test-suit
|
|
||||||
*
|
|
||||||
*/
|
|
||||||
|
|
||||||
#include "config.h"
|
|
||||||
|
|
||||||
#include "uart_i.h"
|
|
||||||
#include "debug.h"
|
|
||||||
|
|
||||||
#include "aes.h"
|
|
||||||
#include "cli.h"
|
|
||||||
#include "performance_test.h"
|
|
||||||
#include "blockcipher_descriptor.h"
|
|
||||||
#include "bcal-performance.h"
|
|
||||||
#include "bcal-nessie.h"
|
|
||||||
#include "bcal_aes128.h"
|
|
||||||
#include <stdint.h>
|
|
||||||
#include <string.h>
|
|
||||||
#include <stdlib.h>
|
|
||||||
#include <avr/pgmspace.h>
|
|
||||||
|
|
||||||
char* algo_name = "AES-128";
|
|
||||||
|
|
||||||
const bcdesc_t* const algolist[] PROGMEM = {
|
|
||||||
(bcdesc_t*)&aes128_desc,
|
|
||||||
NULL
|
|
||||||
};
|
|
||||||
|
|
||||||
|
|
||||||
/*****************************************************************************
|
|
||||||
* additional validation-functions *
|
|
||||||
*****************************************************************************/
|
|
||||||
|
|
||||||
void testrun_nessie_aes(void){
|
|
||||||
bcal_nessie_multiple(algolist);
|
|
||||||
}
|
|
||||||
|
|
||||||
void testrun_test_aes(void){
|
|
||||||
uint8_t key[16] = { 0x2b, 0x7e, 0x15, 0x16,
|
|
||||||
0x28, 0xae, 0xd2, 0xa6,
|
|
||||||
0xab, 0xf7, 0x15, 0x88,
|
|
||||||
0x09, 0xcf, 0x4f, 0x3c };
|
|
||||||
uint8_t data[16] = { 0x32, 0x43, 0xf6, 0xa8,
|
|
||||||
0x88, 0x5a, 0x30, 0x8d,
|
|
||||||
0x31, 0x31, 0x98, 0xa2,
|
|
||||||
0xe0, 0x37, 0x07, 0x34 };
|
|
||||||
aes128_ctx_t ctx;
|
|
||||||
aes128_init(key, &ctx);
|
|
||||||
cli_putstr_P(PSTR("\r\n\r\n cipher test (FIPS 197):\r\n key: "));
|
|
||||||
cli_hexdump(key, 16);
|
|
||||||
cli_putstr_P(PSTR("\r\n plaintext: "));
|
|
||||||
cli_hexdump(data, 16);
|
|
||||||
aes128_enc(data, &ctx);
|
|
||||||
cli_putstr_P(PSTR("\r\n ciphertext: "));
|
|
||||||
cli_hexdump(data, 16);
|
|
||||||
aes128_dec(data, &ctx);
|
|
||||||
cli_putstr_P(PSTR("\r\n plaintext: "));
|
|
||||||
cli_hexdump(data, 16);
|
|
||||||
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
void testrun_testkey_aes128(void){
|
|
||||||
uint8_t key[16] = { 0x2b, 0x7e, 0x15, 0x16,
|
|
||||||
0x28, 0xae, 0xd2, 0xa6,
|
|
||||||
0xab, 0xf7, 0x15, 0x88,
|
|
||||||
0x09, 0xcf, 0x4f, 0x3c};
|
|
||||||
aes128_ctx_t ctx;
|
|
||||||
uint8_t i;
|
|
||||||
aes128_init(key, &ctx);
|
|
||||||
cli_putstr_P(PSTR("\r\n\r\n keyschedule test (FIPS 197):\r\n key: "));
|
|
||||||
cli_hexdump(key, 16);
|
|
||||||
for(i=0; i<11; ++i){
|
|
||||||
cli_putstr_P(PSTR("\r\n index: "));
|
|
||||||
cli_putc('0'+i/10);
|
|
||||||
cli_putc('0'+i%10);
|
|
||||||
cli_putstr_P(PSTR(" roundkey "));
|
|
||||||
cli_hexdump(ctx.key[i].ks, 16);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
void testrun_testkey_aes(void){
|
|
||||||
testrun_testkey_aes128();
|
|
||||||
}
|
|
||||||
|
|
||||||
/*****************************************************************************/
|
|
||||||
|
|
||||||
void testrun_performance_aes(void){
|
|
||||||
bcal_performance_multiple(algolist);
|
|
||||||
}
|
|
||||||
|
|
||||||
/*****************************************************************************
|
|
||||||
* main *
|
|
||||||
*****************************************************************************/
|
|
||||||
const char nessie_str[] PROGMEM = "nessie";
|
|
||||||
const char test_str[] PROGMEM = "test";
|
|
||||||
const char testkey_str[] PROGMEM = "testkey";
|
|
||||||
const char performance_str[] PROGMEM = "performance";
|
|
||||||
const char echo_str[] PROGMEM = "echo";
|
|
||||||
|
|
||||||
const cmdlist_entry_t cmdlist[] PROGMEM = {
|
|
||||||
{ nessie_str, NULL, testrun_nessie_aes },
|
|
||||||
{ test_str, NULL, testrun_test_aes},
|
|
||||||
{ testkey_str, NULL, testrun_testkey_aes},
|
|
||||||
{ performance_str, NULL, testrun_performance_aes},
|
|
||||||
{ echo_str, (void*)1, (void_fpt)echo_ctrl},
|
|
||||||
{ NULL, NULL, NULL}
|
|
||||||
};
|
|
||||||
|
|
||||||
int main (void){
|
|
||||||
DEBUG_INIT();
|
|
||||||
|
|
||||||
cli_rx = (cli_rx_fpt)uart0_getc;
|
|
||||||
cli_tx = (cli_tx_fpt)uart0_putc;
|
|
||||||
for(;;){
|
|
||||||
cli_putstr_P(PSTR("\r\n\r\nCrypto-VS ("));
|
|
||||||
cli_putstr(algo_name);
|
|
||||||
cli_putstr_P(PSTR(")\r\nloaded and running\r\n"));
|
|
||||||
cmd_interface(cmdlist);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
|
@ -1,120 +0,0 @@
|
||||||
/* main-aes192-test.c */
|
|
||||||
/*
|
|
||||||
This file is part of the AVR-Crypto-Lib.
|
|
||||||
Copyright (C) 2008 Daniel Otte (daniel.otte@rub.de)
|
|
||||||
|
|
||||||
This program is free software: you can redistribute it and/or modify
|
|
||||||
it under the terms of the GNU General Public License as published by
|
|
||||||
the Free Software Foundation, either version 3 of the License, or
|
|
||||||
(at your option) any later version.
|
|
||||||
|
|
||||||
This program is distributed in the hope that it will be useful,
|
|
||||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
||||||
GNU General Public License for more details.
|
|
||||||
|
|
||||||
You should have received a copy of the GNU General Public License
|
|
||||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
||||||
*/
|
|
||||||
/*
|
|
||||||
* AES-192 test-suit
|
|
||||||
*
|
|
||||||
*/
|
|
||||||
|
|
||||||
#include "config.h"
|
|
||||||
|
|
||||||
#include "uart_i.h"
|
|
||||||
#include "debug.h"
|
|
||||||
|
|
||||||
#include "aes.h"
|
|
||||||
#include "cli.h"
|
|
||||||
#include "performance_test.h"
|
|
||||||
#include "blockcipher_descriptor.h"
|
|
||||||
#include "bcal-performance.h"
|
|
||||||
#include "bcal-nessie.h"
|
|
||||||
#include "bcal_aes192.h"
|
|
||||||
#include <stdint.h>
|
|
||||||
#include <string.h>
|
|
||||||
#include <stdlib.h>
|
|
||||||
#include <avr/pgmspace.h>
|
|
||||||
|
|
||||||
char* algo_name = "AES-192";
|
|
||||||
|
|
||||||
const bcdesc_t* const algolist[] PROGMEM = {
|
|
||||||
(bcdesc_t*)&aes192_desc,
|
|
||||||
NULL
|
|
||||||
};
|
|
||||||
|
|
||||||
/*****************************************************************************
|
|
||||||
* additional validation-functions *
|
|
||||||
*****************************************************************************/
|
|
||||||
|
|
||||||
void testrun_nessie_aes(void){
|
|
||||||
bcal_nessie_multiple(algolist);
|
|
||||||
}
|
|
||||||
|
|
||||||
void testrun_testkey_aes192(void){
|
|
||||||
uint8_t key[24] = { 0x8e, 0x73, 0xb0, 0xf7,
|
|
||||||
0xda, 0x0e, 0x64, 0x52,
|
|
||||||
0xc8, 0x10, 0xf3, 0x2b,
|
|
||||||
0x80, 0x90, 0x79, 0xe5,
|
|
||||||
0x62, 0xf8, 0xea, 0xd2,
|
|
||||||
0x52, 0x2c, 0x6b, 0x7b};
|
|
||||||
aes192_ctx_t ctx;
|
|
||||||
uint8_t i;
|
|
||||||
memset(&ctx, 0, sizeof(aes192_ctx_t));
|
|
||||||
aes192_init(key, &ctx);
|
|
||||||
cli_putstr_P(PSTR("\r\n\r\n keyschedule test (FIPS 197):\r\n key: "));
|
|
||||||
cli_hexdump(key, 24);
|
|
||||||
for(i=0; i<13; ++i){
|
|
||||||
cli_putstr_P(PSTR("\r\n index: "));
|
|
||||||
cli_putc('0'+i/10);
|
|
||||||
cli_putc('0'+i%10);
|
|
||||||
cli_putstr_P(PSTR(" roundkey "));
|
|
||||||
cli_hexdump(ctx.key[i].ks, 16);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
void testrun_testkey_aes(void){
|
|
||||||
testrun_testkey_aes192();
|
|
||||||
}
|
|
||||||
/*****************************************************************************/
|
|
||||||
|
|
||||||
|
|
||||||
void testrun_performance_aes(void){
|
|
||||||
bcal_performance_multiple(algolist);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
/*****************************************************************************
|
|
||||||
* main *
|
|
||||||
*****************************************************************************/
|
|
||||||
|
|
||||||
const char nessie_str[] PROGMEM = "nessie";
|
|
||||||
const char test_str[] PROGMEM = "test";
|
|
||||||
const char testkey_str[] PROGMEM = "testkey";
|
|
||||||
const char performance_str[] PROGMEM = "performance";
|
|
||||||
const char echo_str[] PROGMEM = "echo";
|
|
||||||
|
|
||||||
const cmdlist_entry_t cmdlist[] PROGMEM = {
|
|
||||||
{ nessie_str, NULL, testrun_nessie_aes },
|
|
||||||
{ test_str, NULL, testrun_nessie_aes},
|
|
||||||
{ testkey_str, NULL, testrun_testkey_aes},
|
|
||||||
{ performance_str, NULL, testrun_performance_aes},
|
|
||||||
{ echo_str, (void*)1, (void_fpt)echo_ctrl},
|
|
||||||
{ NULL, NULL, NULL}
|
|
||||||
};
|
|
||||||
|
|
||||||
int main (void){
|
|
||||||
DEBUG_INIT();
|
|
||||||
|
|
||||||
cli_rx = (cli_rx_fpt)uart0_getc;
|
|
||||||
cli_tx = (cli_tx_fpt)uart0_putc;
|
|
||||||
for(;;){
|
|
||||||
cli_putstr_P(PSTR("\r\n\r\nCrypto-VS ("));
|
|
||||||
cli_putstr(algo_name);
|
|
||||||
cli_putstr_P(PSTR(")\r\nloaded and running\r\n"));
|
|
||||||
cmd_interface(cmdlist);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
|
@ -1,120 +0,0 @@
|
||||||
/* main-aes256-test.c */
|
|
||||||
/*
|
|
||||||
This file is part of the AVR-Crypto-Lib.
|
|
||||||
Copyright (C) 2008 Daniel Otte (daniel.otte@rub.de)
|
|
||||||
|
|
||||||
This program is free software: you can redistribute it and/or modify
|
|
||||||
it under the terms of the GNU General Public License as published by
|
|
||||||
the Free Software Foundation, either version 3 of the License, or
|
|
||||||
(at your option) any later version.
|
|
||||||
|
|
||||||
This program is distributed in the hope that it will be useful,
|
|
||||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
||||||
GNU General Public License for more details.
|
|
||||||
|
|
||||||
You should have received a copy of the GNU General Public License
|
|
||||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
||||||
*/
|
|
||||||
/*
|
|
||||||
* AES-256 test-suit
|
|
||||||
*
|
|
||||||
*/
|
|
||||||
|
|
||||||
#include "config.h"
|
|
||||||
|
|
||||||
#include "uart_i.h"
|
|
||||||
#include "debug.h"
|
|
||||||
|
|
||||||
#include "aes.h"
|
|
||||||
#include "cli.h"
|
|
||||||
#include "performance_test.h"
|
|
||||||
#include "blockcipher_descriptor.h"
|
|
||||||
#include "bcal-performance.h"
|
|
||||||
#include "bcal-nessie.h"
|
|
||||||
#include "bcal_aes256.h"
|
|
||||||
#include <stdint.h>
|
|
||||||
#include <string.h>
|
|
||||||
#include <stdlib.h>
|
|
||||||
#include <avr/pgmspace.h>
|
|
||||||
|
|
||||||
char* algo_name = "AES-256";
|
|
||||||
|
|
||||||
const bcdesc_t* const algolist[] PROGMEM = {
|
|
||||||
(bcdesc_t*)&aes256_desc,
|
|
||||||
NULL
|
|
||||||
};
|
|
||||||
/*****************************************************************************
|
|
||||||
* additional validation-functions *
|
|
||||||
*****************************************************************************/
|
|
||||||
|
|
||||||
void testrun_nessie_aes(void){
|
|
||||||
bcal_nessie_multiple(algolist);
|
|
||||||
}
|
|
||||||
|
|
||||||
void testrun_testkey_aes256(void){
|
|
||||||
uint8_t key[32] = { 0x60, 0x3d, 0xeb, 0x10,
|
|
||||||
0x15, 0xca, 0x71, 0xbe,
|
|
||||||
0x2b, 0x73, 0xae, 0xf0,
|
|
||||||
0x85, 0x7d, 0x77, 0x81,
|
|
||||||
0x1f, 0x35, 0x2c, 0x07,
|
|
||||||
0x3b, 0x61, 0x08, 0xd7,
|
|
||||||
0x2d, 0x98, 0x10, 0xa3,
|
|
||||||
0x09, 0x14, 0xdf, 0xf4};
|
|
||||||
aes256_ctx_t ctx;
|
|
||||||
uint8_t i;
|
|
||||||
memset(&ctx, 0, sizeof(aes256_ctx_t));
|
|
||||||
aes256_init(key, &ctx);
|
|
||||||
cli_putstr_P(PSTR("\r\n\r\n keyschedule test (FIPS 197):\r\n key: "));
|
|
||||||
cli_hexdump(key, 32);
|
|
||||||
for(i=0; i<15; ++i){
|
|
||||||
cli_putstr_P(PSTR("\r\n index: "));
|
|
||||||
cli_putc('0'+i/10);
|
|
||||||
cli_putc('0'+i%10);
|
|
||||||
cli_putstr_P(PSTR(" roundkey "));
|
|
||||||
cli_hexdump(ctx.key[i].ks, 16);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
void testrun_testkey_aes(void){
|
|
||||||
testrun_testkey_aes256();
|
|
||||||
}
|
|
||||||
/*****************************************************************************/
|
|
||||||
|
|
||||||
void testrun_performance_aes(void){
|
|
||||||
bcal_performance_multiple(algolist);
|
|
||||||
}
|
|
||||||
|
|
||||||
/*****************************************************************************
|
|
||||||
* main *
|
|
||||||
*****************************************************************************/
|
|
||||||
|
|
||||||
const char nessie_str[] PROGMEM = "nessie";
|
|
||||||
const char test_str[] PROGMEM = "test";
|
|
||||||
const char testkey_str[] PROGMEM = "testkey";
|
|
||||||
const char performance_str[] PROGMEM = "performance";
|
|
||||||
const char echo_str[] PROGMEM = "echo";
|
|
||||||
|
|
||||||
const cmdlist_entry_t cmdlist[] PROGMEM = {
|
|
||||||
{ nessie_str, NULL, testrun_nessie_aes },
|
|
||||||
{ test_str, NULL, testrun_nessie_aes},
|
|
||||||
{ testkey_str, NULL, testrun_testkey_aes},
|
|
||||||
{ performance_str, NULL, testrun_performance_aes},
|
|
||||||
{ echo_str, (void*)1, (void_fpt)echo_ctrl},
|
|
||||||
{ NULL, NULL, NULL}
|
|
||||||
};
|
|
||||||
|
|
||||||
int main (void){
|
|
||||||
DEBUG_INIT();
|
|
||||||
|
|
||||||
cli_rx = (cli_rx_fpt)uart0_getc;
|
|
||||||
cli_tx = (cli_tx_fpt)uart0_putc;
|
|
||||||
for(;;){
|
|
||||||
cli_putstr_P(PSTR("\r\n\r\nCrypto-VS ("));
|
|
||||||
cli_putstr(algo_name);
|
|
||||||
cli_putstr_P(PSTR(")\r\nloaded and running\r\n"));
|
|
||||||
cmd_interface(cmdlist);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
|
@ -21,23 +21,15 @@
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "config.h"
|
#include "main-test-common.h"
|
||||||
|
|
||||||
#include "uart_i.h"
|
|
||||||
#include "debug.h"
|
|
||||||
|
|
||||||
#include "noekeon.h"
|
#include "noekeon.h"
|
||||||
#include "noekeon_prng.h"
|
#include "noekeon_prng.h"
|
||||||
#include "base64_enc.h"
|
#include "base64_enc.h"
|
||||||
#include "base64_dec.h"
|
#include "base64_dec.h"
|
||||||
|
|
||||||
#include "cli.h"
|
|
||||||
#include "performance_test.h"
|
#include "performance_test.h"
|
||||||
|
|
||||||
#include <stdint.h>
|
|
||||||
#include <string.h>
|
|
||||||
#include <stdlib.h>
|
|
||||||
|
|
||||||
char* algo_name = "Base64";
|
char* algo_name = "Base64";
|
||||||
|
|
||||||
/*****************************************************************************
|
/*****************************************************************************
|
||||||
|
@ -152,14 +144,10 @@ const cmdlist_entry_t cmdlist[] PROGMEM = {
|
||||||
};
|
};
|
||||||
|
|
||||||
int main (void){
|
int main (void){
|
||||||
DEBUG_INIT();
|
main_setup();
|
||||||
|
|
||||||
cli_rx = (cli_rx_fpt)uart0_getc;
|
|
||||||
cli_tx = (cli_tx_fpt)uart0_putc;
|
|
||||||
for(;;){
|
for(;;){
|
||||||
cli_putstr_P(PSTR("\r\n\r\nCrypto-VS ("));
|
welcome_msg(algo_name);
|
||||||
cli_putstr(algo_name);
|
|
||||||
cli_putstr_P(PSTR(")\r\nloaded and running\r\n"));
|
|
||||||
cmd_interface(cmdlist);
|
cmd_interface(cmdlist);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -21,23 +21,15 @@
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "config.h"
|
#include "main-test-common.h"
|
||||||
|
|
||||||
#include "uart_i.h"
|
|
||||||
#include "debug.h"
|
|
||||||
|
|
||||||
#include "noekeon.h"
|
#include "noekeon.h"
|
||||||
#include "noekeon_prng.h"
|
#include "noekeon_prng.h"
|
||||||
#include "bigint.h"
|
#include "bigint.h"
|
||||||
#include "bigint_io.h"
|
#include "bigint_io.h"
|
||||||
|
|
||||||
#include "cli.h"
|
|
||||||
#include "performance_test.h"
|
#include "performance_test.h"
|
||||||
|
|
||||||
#include <stdint.h>
|
|
||||||
#include <string.h>
|
|
||||||
#include <stdlib.h>
|
|
||||||
|
|
||||||
char* algo_name = "BigInt";
|
char* algo_name = "BigInt";
|
||||||
|
|
||||||
/*****************************************************************************
|
/*****************************************************************************
|
||||||
|
@ -531,14 +523,10 @@ const cmdlist_entry_t cmdlist[] PROGMEM = {
|
||||||
};
|
};
|
||||||
|
|
||||||
int main (void){
|
int main (void){
|
||||||
DEBUG_INIT();
|
main_setup();
|
||||||
|
|
||||||
cli_rx = (cli_rx_fpt)uart0_getc;
|
|
||||||
cli_tx = (cli_tx_fpt)uart0_putc;
|
|
||||||
for(;;){
|
for(;;){
|
||||||
cli_putstr_P(PSTR("\r\n\r\nCrypto-VS ("));
|
welcome_msg(algo_name);
|
||||||
cli_putstr(algo_name);
|
|
||||||
cli_putstr_P(PSTR(")\r\nloaded and running\r\n"));
|
|
||||||
cmd_interface(cmdlist);
|
cmd_interface(cmdlist);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -21,10 +21,7 @@
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "config.h"
|
#include "main-test-common.h"
|
||||||
|
|
||||||
#include "uart_i.h"
|
|
||||||
#include "debug.h"
|
|
||||||
|
|
||||||
#include "blake_small.h"
|
#include "blake_small.h"
|
||||||
#include "blake_large.h"
|
#include "blake_large.h"
|
||||||
|
@ -34,17 +31,11 @@
|
||||||
#include "hfal-test.h"
|
#include "hfal-test.h"
|
||||||
#include "hfal-performance.h"
|
#include "hfal-performance.h"
|
||||||
#include "shavs.h"
|
#include "shavs.h"
|
||||||
#include "cli.h"
|
|
||||||
#include "nessie_hash_test.h"
|
#include "nessie_hash_test.h"
|
||||||
#include "performance_test.h"
|
#include "performance_test.h"
|
||||||
|
|
||||||
#include <stdint.h>
|
|
||||||
#include <string.h>
|
|
||||||
#include <stdlib.h>
|
|
||||||
|
|
||||||
char* algo_name = "Blake";
|
char* algo_name = "Blake";
|
||||||
|
|
||||||
|
|
||||||
const hfdesc_t* const algolist[] PROGMEM = {
|
const hfdesc_t* const algolist[] PROGMEM = {
|
||||||
(hfdesc_t*)&blake224_desc,
|
(hfdesc_t*)&blake224_desc,
|
||||||
(hfdesc_t*)&blake256_desc,
|
(hfdesc_t*)&blake256_desc,
|
||||||
|
@ -149,21 +140,12 @@ const cmdlist_entry_t cmdlist[] PROGMEM = {
|
||||||
};
|
};
|
||||||
|
|
||||||
int main (void){
|
int main (void){
|
||||||
DEBUG_INIT();
|
main_setup();
|
||||||
|
|
||||||
cli_rx = (cli_rx_fpt)uart0_getc;
|
|
||||||
cli_tx = (cli_tx_fpt)uart0_putc;
|
|
||||||
shavs_algolist=(hfdesc_t**)algolist;
|
shavs_algolist=(hfdesc_t**)algolist;
|
||||||
shavs_algo=(hfdesc_t*)&blake256_desc;
|
shavs_algo=(hfdesc_t*)&blake256_desc;
|
||||||
for(;;){
|
for(;;){
|
||||||
cli_putstr_P(PSTR("\r\n\r\nCrypto-VS ("));
|
welcome_msg(algo_name);
|
||||||
cli_putstr(algo_name);
|
|
||||||
cli_putstr_P(PSTR("; "));
|
|
||||||
cli_putstr(__DATE__);
|
|
||||||
cli_putstr_P(PSTR(" "));
|
|
||||||
cli_putstr(__TIME__);
|
|
||||||
cli_putstr_P(PSTR(")\r\nloaded and running\r\n"));
|
|
||||||
|
|
||||||
cmd_interface(cmdlist);
|
cmd_interface(cmdlist);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -21,25 +21,19 @@
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "config.h"
|
#include "main-test-common.h"
|
||||||
#include "uart_i.h"
|
|
||||||
#include "debug.h"
|
|
||||||
|
|
||||||
#include "bmw_small.h"
|
#include "bmw_small.h"
|
||||||
#include "bmw_large.h"
|
#include "bmw_large.h"
|
||||||
#include "cli.h"
|
|
||||||
#include "hfal_bmw_small.h"
|
#include "hfal_bmw_small.h"
|
||||||
#include "hfal_bmw_large.h"
|
#include "hfal_bmw_large.h"
|
||||||
|
|
||||||
#include "shavs.h"
|
#include "shavs.h"
|
||||||
#include "nessie_hash_test.h"
|
#include "nessie_hash_test.h"
|
||||||
#include "performance_test.h"
|
|
||||||
#include "hfal-nessie.h"
|
#include "hfal-nessie.h"
|
||||||
#include "hfal-performance.h"
|
#include "hfal-performance.h"
|
||||||
#include "hfal-test.h"
|
#include "hfal-test.h"
|
||||||
|
#include "performance_test.h"
|
||||||
#include <stdint.h>
|
|
||||||
#include <string.h>
|
|
||||||
#include <stdlib.h>
|
|
||||||
|
|
||||||
char* algo_name = "BlueMidnightWish";
|
char* algo_name = "BlueMidnightWish";
|
||||||
|
|
||||||
|
@ -173,21 +167,12 @@ const cmdlist_entry_t cmdlist[] PROGMEM = {
|
||||||
};
|
};
|
||||||
|
|
||||||
int main (void){
|
int main (void){
|
||||||
DEBUG_INIT();
|
main_setup();
|
||||||
|
|
||||||
cli_rx = (cli_rx_fpt)uart0_getc;
|
|
||||||
cli_tx = (cli_tx_fpt)uart0_putc;
|
|
||||||
shavs_algolist=(hfdesc_t**)algolist;
|
shavs_algolist=(hfdesc_t**)algolist;
|
||||||
shavs_algo=(hfdesc_t*)&bmw256_desc;
|
shavs_algo=(hfdesc_t*)&bmw256_desc;
|
||||||
for(;;){
|
for(;;){
|
||||||
cli_putstr_P(PSTR("\r\n\r\nCrypto-VS ("));
|
welcome_msg(algo_name);
|
||||||
cli_putstr(algo_name);
|
|
||||||
cli_putstr_P(PSTR("; "));
|
|
||||||
cli_putstr(__DATE__);
|
|
||||||
cli_putstr_P(PSTR(" "));
|
|
||||||
cli_putstr(__TIME__);
|
|
||||||
cli_putstr_P(PSTR(")\r\nloaded and running\r\n"));
|
|
||||||
|
|
||||||
cmd_interface(cmdlist);
|
cmd_interface(cmdlist);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -21,21 +21,13 @@
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "config.h"
|
#include "main-test-common.h"
|
||||||
|
|
||||||
#include "uart_i.h"
|
|
||||||
#include "debug.h"
|
|
||||||
|
|
||||||
#include "camellia.h"
|
#include "camellia.h"
|
||||||
#include "performance_test.h"
|
#include "performance_test.h"
|
||||||
#include "cli.h"
|
|
||||||
#include "bcal_camellia128.h"
|
#include "bcal_camellia128.h"
|
||||||
#include "bcal-performance.h"
|
#include "bcal-performance.h"
|
||||||
#include "bcal-nessie.h"
|
#include "bcal-nessie.h"
|
||||||
#include <stdint.h>
|
|
||||||
#include <string.h>
|
|
||||||
#include <stdlib.h>
|
|
||||||
#include <avr/pgmspace.h>
|
|
||||||
|
|
||||||
char* algo_name = "Camellia";
|
char* algo_name = "Camellia";
|
||||||
|
|
||||||
|
@ -183,14 +175,10 @@ const cmdlist_entry_t cmdlist[] PROGMEM = {
|
||||||
};
|
};
|
||||||
|
|
||||||
int main (void){
|
int main (void){
|
||||||
DEBUG_INIT();
|
main_setup();
|
||||||
|
|
||||||
cli_rx = (cli_rx_fpt)uart0_getc;
|
|
||||||
cli_tx = (cli_tx_fpt)uart0_putc;
|
|
||||||
for(;;){
|
for(;;){
|
||||||
cli_putstr_P(PSTR("\r\n\r\nCrypto-VS ("));
|
welcome_msg(algo_name);
|
||||||
cli_putstr(algo_name);
|
|
||||||
cli_putstr_P(PSTR(")\r\nloaded and running\r\n"));
|
|
||||||
cmd_interface(cmdlist);
|
cmd_interface(cmdlist);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -21,21 +21,13 @@
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "config.h"
|
#include "main-test-common.h"
|
||||||
|
|
||||||
#include "uart_i.h"
|
|
||||||
#include "debug.h"
|
|
||||||
|
|
||||||
#include <cast5.h>
|
#include <cast5.h>
|
||||||
#include "performance_test.h"
|
#include "performance_test.h"
|
||||||
#include "bcal-performance.h"
|
#include "bcal-performance.h"
|
||||||
#include "bcal-nessie.h"
|
#include "bcal-nessie.h"
|
||||||
#include "bcal_cast5.h"
|
#include "bcal_cast5.h"
|
||||||
#include "cli.h"
|
|
||||||
|
|
||||||
#include <stdint.h>
|
|
||||||
#include <string.h>
|
|
||||||
#include <stdlib.h>
|
|
||||||
|
|
||||||
char* algo_name = "cast-128 (cast5)";
|
char* algo_name = "cast-128 (cast5)";
|
||||||
|
|
||||||
|
@ -172,14 +164,10 @@ const cmdlist_entry_t cmdlist[] PROGMEM = {
|
||||||
};
|
};
|
||||||
|
|
||||||
int main (void){
|
int main (void){
|
||||||
DEBUG_INIT();
|
main_setup();
|
||||||
|
|
||||||
cli_rx = (cli_rx_fpt)uart0_getc;
|
|
||||||
cli_tx = (cli_tx_fpt)uart0_putc;
|
|
||||||
for(;;){
|
for(;;){
|
||||||
cli_putstr_P(PSTR("\r\n\r\nCrypto-VS ("));
|
welcome_msg(algo_name);
|
||||||
cli_putstr(algo_name);
|
|
||||||
cli_putstr_P(PSTR(")\r\nloaded and running\r\n"));
|
|
||||||
cmd_interface(cmdlist);
|
cmd_interface(cmdlist);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -3,23 +3,14 @@
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "config.h"
|
#include "main-test-common.h"
|
||||||
|
|
||||||
#include "uart_i.h"
|
|
||||||
#include "debug.h"
|
|
||||||
|
|
||||||
#include "cast6.h"
|
#include "cast6.h"
|
||||||
#include "cli.h"
|
|
||||||
#include "performance_test.h"
|
#include "performance_test.h"
|
||||||
#include "bcal-performance.h"
|
#include "bcal-performance.h"
|
||||||
#include "bcal-nessie.h"
|
#include "bcal-nessie.h"
|
||||||
#include "bcal_cast6.h"
|
#include "bcal_cast6.h"
|
||||||
|
|
||||||
#include <stdint.h>
|
|
||||||
#include <string.h>
|
|
||||||
#include <stdlib.h>
|
|
||||||
#include <avr/pgmspace.h>
|
|
||||||
|
|
||||||
char* algo_name = "CAST-256";
|
char* algo_name = "CAST-256";
|
||||||
|
|
||||||
const bcdesc_t* const algolist[] PROGMEM = {
|
const bcdesc_t* const algolist[] PROGMEM = {
|
||||||
|
@ -117,13 +108,10 @@ const cmdlist_entry_t cmdlist[] PROGMEM = {
|
||||||
};
|
};
|
||||||
|
|
||||||
int main (void){
|
int main (void){
|
||||||
DEBUG_INIT();
|
main_setup();
|
||||||
cli_rx = (cli_rx_fpt)uart0_getc;
|
|
||||||
cli_tx = (cli_tx_fpt)uart0_putc;
|
|
||||||
for(;;){
|
for(;;){
|
||||||
cli_putstr_P(PSTR("\r\n\r\nCrypto-VS ("));
|
welcome_msg(algo_name);
|
||||||
cli_putstr(algo_name);
|
|
||||||
cli_putstr_P(PSTR(")\r\nloaded and running\r\n"));
|
|
||||||
cmd_interface(cmdlist);
|
cmd_interface(cmdlist);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -21,22 +21,14 @@
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "config.h"
|
#include "main-test-common.h"
|
||||||
|
|
||||||
#include "uart_i.h"
|
|
||||||
#include "debug.h"
|
|
||||||
|
|
||||||
#include "cscipher.h"
|
#include "cscipher.h"
|
||||||
#include "bcal-nessie.h"
|
#include "bcal-nessie.h"
|
||||||
#include "cli.h"
|
|
||||||
#include "performance_test.h"
|
#include "performance_test.h"
|
||||||
#include "bcal-performance.h"
|
#include "bcal-performance.h"
|
||||||
#include "bcal_cscipher.h"
|
#include "bcal_cscipher.h"
|
||||||
|
|
||||||
#include <stdint.h>
|
|
||||||
#include <string.h>
|
|
||||||
#include <stdlib.h>
|
|
||||||
|
|
||||||
char* algo_name = "CS-Cipher";
|
char* algo_name = "CS-Cipher";
|
||||||
|
|
||||||
const bcdesc_t* const algolist[] PROGMEM = {
|
const bcdesc_t* const algolist[] PROGMEM = {
|
||||||
|
@ -148,14 +140,10 @@ const cmdlist_entry_t cmdlist[] PROGMEM = {
|
||||||
};
|
};
|
||||||
|
|
||||||
int main (void){
|
int main (void){
|
||||||
DEBUG_INIT();
|
main_setup();
|
||||||
|
|
||||||
cli_rx = (cli_rx_fpt)uart0_getc;
|
|
||||||
cli_tx = (cli_tx_fpt)uart0_putc;
|
|
||||||
for(;;){
|
for(;;){
|
||||||
cli_putstr_P(PSTR("\r\n\r\nCrypto-VS ("));
|
welcome_msg(algo_name);
|
||||||
cli_putstr(algo_name);
|
|
||||||
cli_putstr_P(PSTR(")\r\nloaded and running\r\n"));
|
|
||||||
cmd_interface(cmdlist);
|
cmd_interface(cmdlist);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -21,12 +21,9 @@
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "config.h"
|
#include "main-test-common.h"
|
||||||
#include "uart_i.h"
|
|
||||||
#include "debug.h"
|
|
||||||
|
|
||||||
#include "cubehash.h"
|
#include "cubehash.h"
|
||||||
#include "cli.h"
|
|
||||||
#include "hfal_cubehash.h"
|
#include "hfal_cubehash.h"
|
||||||
#include "shavs.h"
|
#include "shavs.h"
|
||||||
#include "nessie_hash_test.h"
|
#include "nessie_hash_test.h"
|
||||||
|
@ -35,10 +32,6 @@
|
||||||
#include "hfal-performance.h"
|
#include "hfal-performance.h"
|
||||||
#include "hfal-test.h"
|
#include "hfal-test.h"
|
||||||
|
|
||||||
#include <stdint.h>
|
|
||||||
#include <string.h>
|
|
||||||
#include <stdlib.h>
|
|
||||||
|
|
||||||
char* algo_name = "CubeHash";
|
char* algo_name = "CubeHash";
|
||||||
|
|
||||||
|
|
||||||
|
@ -99,21 +92,12 @@ const cmdlist_entry_t cmdlist[] PROGMEM = {
|
||||||
};
|
};
|
||||||
|
|
||||||
int main (void){
|
int main (void){
|
||||||
DEBUG_INIT();
|
main_setup();
|
||||||
|
|
||||||
cli_rx = (cli_rx_fpt)uart0_getc;
|
|
||||||
cli_tx = (cli_tx_fpt)uart0_putc;
|
|
||||||
shavs_algolist=(hfdesc_t**)algolist;
|
shavs_algolist=(hfdesc_t**)algolist;
|
||||||
shavs_algo=(hfdesc_t*)&cubehash256_desc;
|
shavs_algo=(hfdesc_t*)&cubehash256_desc;
|
||||||
for(;;){
|
for(;;){
|
||||||
cli_putstr_P(PSTR("\r\n\r\nCrypto-VS ("));
|
welcome_msg(algo_name);
|
||||||
cli_putstr(algo_name);
|
|
||||||
cli_putstr_P(PSTR("; "));
|
|
||||||
cli_putstr(__DATE__);
|
|
||||||
cli_putstr_P(PSTR(" "));
|
|
||||||
cli_putstr(__TIME__);
|
|
||||||
cli_putstr_P(PSTR(")\r\nloaded and running\r\n"));
|
|
||||||
|
|
||||||
cmd_interface(cmdlist);
|
cmd_interface(cmdlist);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -21,10 +21,7 @@
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "config.h"
|
#include "main-test-common.h"
|
||||||
|
|
||||||
#include "uart_i.h"
|
|
||||||
#include "debug.h"
|
|
||||||
|
|
||||||
#include "noekeon.h"
|
#include "noekeon.h"
|
||||||
#include "noekeon_prng.h"
|
#include "noekeon_prng.h"
|
||||||
|
@ -33,14 +30,10 @@
|
||||||
#include "dsa.h"
|
#include "dsa.h"
|
||||||
#include "dsa_key_blob.h"
|
#include "dsa_key_blob.h"
|
||||||
|
|
||||||
#include "cli.h"
|
|
||||||
#include "performance_test.h"
|
#include "performance_test.h"
|
||||||
#include "hfal_sha1.h"
|
#include "hfal_sha1.h"
|
||||||
#include "base64_enc.h"
|
#include "base64_enc.h"
|
||||||
#include "base64_dec.h"
|
#include "base64_dec.h"
|
||||||
#include <stdint.h>
|
|
||||||
#include <string.h>
|
|
||||||
#include <stdlib.h>
|
|
||||||
|
|
||||||
char* algo_name = "DSA";
|
char* algo_name = "DSA";
|
||||||
|
|
||||||
|
@ -178,14 +171,10 @@ const const cmdlist_entry_t cmdlist[] PROGMEM = {
|
||||||
};
|
};
|
||||||
|
|
||||||
int main (void){
|
int main (void){
|
||||||
DEBUG_INIT();
|
main_setup();
|
||||||
|
|
||||||
cli_rx = (cli_rx_fpt)uart0_getc;
|
|
||||||
cli_tx = (cli_tx_fpt)uart0_putc;
|
|
||||||
for(;;){
|
for(;;){
|
||||||
cli_putstr_P(PSTR("\r\n\r\nCrypto-VS ("));
|
welcome_msg(algo_name);
|
||||||
cli_putstr(algo_name);
|
|
||||||
cli_putstr_P(PSTR(")\r\nloaded and running\r\n"));
|
|
||||||
cmd_interface(cmdlist);
|
cmd_interface(cmdlist);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -21,12 +21,9 @@
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "config.h"
|
#include "main-test-common.h"
|
||||||
#include "uart_i.h"
|
|
||||||
#include "debug.h"
|
|
||||||
|
|
||||||
#include "echo.h"
|
#include "echo.h"
|
||||||
#include "cli.h"
|
|
||||||
#include "hfal_echo.h"
|
#include "hfal_echo.h"
|
||||||
#include "shavs.h"
|
#include "shavs.h"
|
||||||
#include "nessie_hash_test.h"
|
#include "nessie_hash_test.h"
|
||||||
|
@ -35,10 +32,6 @@
|
||||||
#include "hfal-performance.h"
|
#include "hfal-performance.h"
|
||||||
#include "hfal-test.h"
|
#include "hfal-test.h"
|
||||||
|
|
||||||
#include <stdint.h>
|
|
||||||
#include <string.h>
|
|
||||||
#include <stdlib.h>
|
|
||||||
|
|
||||||
char* algo_name = "Echo";
|
char* algo_name = "Echo";
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -21,20 +21,12 @@
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "config.h"
|
#include "main-test-common.h"
|
||||||
|
|
||||||
#include "uart_i.h"
|
|
||||||
#include "debug.h"
|
|
||||||
|
|
||||||
#include "entropium.h"
|
#include "entropium.h"
|
||||||
#include "nessie_bc_test.h"
|
#include "nessie_bc_test.h"
|
||||||
#include "cli.h"
|
|
||||||
#include "performance_test.h"
|
#include "performance_test.h"
|
||||||
|
|
||||||
#include <stdint.h>
|
|
||||||
#include <string.h>
|
|
||||||
#include <stdlib.h>
|
|
||||||
|
|
||||||
char* algo_name = "Entropium";
|
char* algo_name = "Entropium";
|
||||||
|
|
||||||
/*****************************************************************************
|
/*****************************************************************************
|
||||||
|
@ -105,14 +97,10 @@ const cmdlist_entry_t cmdlist[] PROGMEM = {
|
||||||
|
|
||||||
|
|
||||||
int main (void){
|
int main (void){
|
||||||
DEBUG_INIT();
|
main_setup();
|
||||||
cli_rx = (cli_rx_fpt)uart0_getc;
|
|
||||||
cli_tx = (cli_tx_fpt)uart0_putc;
|
|
||||||
|
|
||||||
for(;;){
|
for(;;){
|
||||||
cli_putstr_P(PSTR("\r\n\r\nCrypto-VS ("));
|
welcome_msg(algo_name);
|
||||||
cli_putstr(algo_name);
|
|
||||||
cli_putstr_P(PSTR(")\r\nloaded and running\r\n"));
|
|
||||||
cmd_interface(cmdlist);
|
cmd_interface(cmdlist);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -21,11 +21,7 @@
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "config.h"
|
#include "main-test-common.h"
|
||||||
|
|
||||||
#include "uart_i.h"
|
|
||||||
#include "debug.h"
|
|
||||||
#include "cli.h"
|
|
||||||
|
|
||||||
#include "grain.h"
|
#include "grain.h"
|
||||||
#include "scal_grain.h"
|
#include "scal_grain.h"
|
||||||
|
@ -33,10 +29,6 @@
|
||||||
#include "scal-nessie.h"
|
#include "scal-nessie.h"
|
||||||
#include "performance_test.h"
|
#include "performance_test.h"
|
||||||
|
|
||||||
#include <stdlib.h>
|
|
||||||
#include <stdint.h>
|
|
||||||
#include <string.h>
|
|
||||||
|
|
||||||
char* algo_name = "Grain";
|
char* algo_name = "Grain";
|
||||||
|
|
||||||
/*****************************************************************************
|
/*****************************************************************************
|
||||||
|
@ -162,14 +154,10 @@ const cmdlist_entry_t cmdlist[] PROGMEM = {
|
||||||
};
|
};
|
||||||
|
|
||||||
int main (void){
|
int main (void){
|
||||||
DEBUG_INIT();
|
main_setup();
|
||||||
|
|
||||||
cli_rx = (cli_rx_fpt)uart0_getc;
|
|
||||||
cli_tx = (cli_tx_fpt)uart0_putc;
|
|
||||||
for(;;){
|
for(;;){
|
||||||
cli_putstr_P(PSTR("\r\n\r\nCrypto-VS ("));
|
welcome_msg(algo_name);
|
||||||
cli_putstr(algo_name);
|
|
||||||
cli_putstr_P(PSTR(")\r\nloaded and running\r\n"));
|
|
||||||
cmd_interface(cmdlist);
|
cmd_interface(cmdlist);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -21,10 +21,7 @@
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "config.h"
|
#include "main-test-common.h"
|
||||||
|
|
||||||
#include "uart_i.h"
|
|
||||||
#include "debug.h"
|
|
||||||
|
|
||||||
#include "groestl_small.h"
|
#include "groestl_small.h"
|
||||||
#include "groestl_large.h"
|
#include "groestl_large.h"
|
||||||
|
@ -34,14 +31,9 @@
|
||||||
#include "hfal-test.h"
|
#include "hfal-test.h"
|
||||||
#include "hfal-performance.h"
|
#include "hfal-performance.h"
|
||||||
#include "shavs.h"
|
#include "shavs.h"
|
||||||
#include "cli.h"
|
|
||||||
#include "nessie_hash_test.h"
|
#include "nessie_hash_test.h"
|
||||||
#include "performance_test.h"
|
#include "performance_test.h"
|
||||||
|
|
||||||
#include <stdint.h>
|
|
||||||
#include <string.h>
|
|
||||||
#include <stdlib.h>
|
|
||||||
|
|
||||||
char* algo_name = "Groestl";
|
char* algo_name = "Groestl";
|
||||||
|
|
||||||
|
|
||||||
|
@ -147,21 +139,12 @@ const cmdlist_entry_t cmdlist[] PROGMEM = {
|
||||||
};
|
};
|
||||||
|
|
||||||
int main (void){
|
int main (void){
|
||||||
DEBUG_INIT();
|
main_setup();
|
||||||
|
|
||||||
cli_rx = (cli_rx_fpt)uart0_getc;
|
|
||||||
cli_tx = (cli_tx_fpt)uart0_putc;
|
|
||||||
shavs_algolist=(hfdesc_t**)algolist;
|
shavs_algolist=(hfdesc_t**)algolist;
|
||||||
shavs_algo=(hfdesc_t*)&groestl256_desc;
|
shavs_algo=(hfdesc_t*)&groestl256_desc;
|
||||||
for(;;){
|
for(;;){
|
||||||
cli_putstr_P(PSTR("\r\n\r\nCrypto-VS ("));
|
welcome_msg(algo_name);
|
||||||
cli_putstr(algo_name);
|
|
||||||
cli_putstr_P(PSTR("; "));
|
|
||||||
cli_putstr(__DATE__);
|
|
||||||
cli_putstr_P(PSTR(" "));
|
|
||||||
cli_putstr(__TIME__);
|
|
||||||
cli_putstr_P(PSTR(")\r\nloaded and running\r\n"));
|
|
||||||
|
|
||||||
cmd_interface(cmdlist);
|
cmd_interface(cmdlist);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -21,23 +21,12 @@
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "config.h"
|
#include "main-test-common.h"
|
||||||
|
|
||||||
#include "uart_i.h"
|
|
||||||
#include "debug.h"
|
|
||||||
|
|
||||||
#include "md5.h"
|
#include "md5.h"
|
||||||
#include "hmac-md5.h"
|
#include "hmac-md5.h"
|
||||||
/*
|
|
||||||
#include "base64_enc.h"
|
|
||||||
#include "base64_dec.h"
|
|
||||||
*/
|
|
||||||
#include "nessie_mac_test.h"
|
#include "nessie_mac_test.h"
|
||||||
|
|
||||||
#include <stdint.h>
|
|
||||||
#include <string.h>
|
|
||||||
#include "cli.h"
|
|
||||||
|
|
||||||
char* algo_name = "HMAC-MD5";
|
char* algo_name = "HMAC-MD5";
|
||||||
|
|
||||||
/*****************************************************************************
|
/*****************************************************************************
|
||||||
|
@ -182,13 +171,10 @@ const cmdlist_entry_t cmdlist[] PROGMEM = {
|
||||||
};
|
};
|
||||||
|
|
||||||
int main (void){
|
int main (void){
|
||||||
DEBUG_INIT();
|
main_setup();
|
||||||
cli_rx = (cli_rx_fpt)uart0_getc;
|
|
||||||
cli_tx = (cli_tx_fpt)uart0_putc;
|
|
||||||
for(;;){
|
for(;;){
|
||||||
cli_putstr_P(PSTR("\r\n\r\nCrypto-VS ("));
|
welcome_msg(algo_name);
|
||||||
cli_putstr(algo_name);
|
|
||||||
cli_putstr_P(PSTR(")\r\nloaded and running\r\n"));
|
|
||||||
cmd_interface(cmdlist);
|
cmd_interface(cmdlist);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -21,20 +21,13 @@
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "config.h"
|
#include "main-test-common.h"
|
||||||
|
|
||||||
#include "uart_i.h"
|
|
||||||
#include "debug.h"
|
|
||||||
|
|
||||||
#include "sha1.h"
|
#include "sha1.h"
|
||||||
#include "hmac-sha1.h"
|
#include "hmac-sha1.h"
|
||||||
|
|
||||||
#include "nessie_mac_test.h"
|
#include "nessie_mac_test.h"
|
||||||
|
|
||||||
#include <stdint.h>
|
|
||||||
#include <string.h>
|
|
||||||
#include "cli.h"
|
|
||||||
|
|
||||||
char* algo_name = "HMAC-SHA1";
|
char* algo_name = "HMAC-SHA1";
|
||||||
|
|
||||||
/*****************************************************************************
|
/*****************************************************************************
|
||||||
|
@ -74,14 +67,10 @@ const cmdlist_entry_t cmdlist[] PROGMEM = {
|
||||||
};
|
};
|
||||||
|
|
||||||
int main (void){
|
int main (void){
|
||||||
DEBUG_INIT();
|
main_setup();
|
||||||
|
|
||||||
cli_rx = (cli_rx_fpt)uart0_getc;
|
|
||||||
cli_tx = (cli_tx_fpt)uart0_putc;
|
|
||||||
for(;;){
|
for(;;){
|
||||||
cli_putstr_P(PSTR("\r\n\r\nCrypto-VS ("));
|
welcome_msg(algo_name);
|
||||||
cli_putstr(algo_name);
|
|
||||||
cli_putstr_P(PSTR(")\r\nloaded and running\r\n"));
|
|
||||||
cmd_interface(cmdlist);
|
cmd_interface(cmdlist);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -21,20 +21,13 @@
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "config.h"
|
#include "main-test-common.h"
|
||||||
|
|
||||||
#include "uart_i.h"
|
|
||||||
#include "debug.h"
|
|
||||||
|
|
||||||
#include "sha256.h"
|
#include "sha256.h"
|
||||||
#include "hmac-sha256.h"
|
#include "hmac-sha256.h"
|
||||||
|
|
||||||
#include "cli.h"
|
|
||||||
#include "nessie_mac_test.h"
|
#include "nessie_mac_test.h"
|
||||||
|
|
||||||
#include <stdint.h>
|
|
||||||
#include <string.h>
|
|
||||||
|
|
||||||
char* algo_name = "HMAC-SHA256";
|
char* algo_name = "HMAC-SHA256";
|
||||||
|
|
||||||
/*****************************************************************************
|
/*****************************************************************************
|
||||||
|
@ -92,14 +85,10 @@ const cmdlist_entry_t cmdlist[] PROGMEM = {
|
||||||
};
|
};
|
||||||
|
|
||||||
int main (void){
|
int main (void){
|
||||||
DEBUG_INIT();
|
main_setup();
|
||||||
|
|
||||||
cli_rx = (cli_rx_fpt)uart0_getc;
|
|
||||||
cli_tx = (cli_tx_fpt)uart0_putc;
|
|
||||||
for(;;){
|
for(;;){
|
||||||
cli_putstr_P(PSTR("\r\n\r\nCrypto-VS ("));
|
welcome_msg(algo_name);
|
||||||
cli_putstr(algo_name);
|
|
||||||
cli_putstr_P(PSTR(")\r\nloaded and running\r\n"));
|
|
||||||
cmd_interface(cmdlist);
|
cmd_interface(cmdlist);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -21,10 +21,7 @@
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "config.h"
|
#include "main-test-common.h"
|
||||||
|
|
||||||
#include "uart_i.h"
|
|
||||||
#include "debug.h"
|
|
||||||
|
|
||||||
#include "jh_simple.h"
|
#include "jh_simple.h"
|
||||||
#include "hfal_jh.h"
|
#include "hfal_jh.h"
|
||||||
|
@ -32,14 +29,9 @@
|
||||||
#include "hfal-test.h"
|
#include "hfal-test.h"
|
||||||
#include "hfal-performance.h"
|
#include "hfal-performance.h"
|
||||||
#include "shavs.h"
|
#include "shavs.h"
|
||||||
#include "cli.h"
|
|
||||||
#include "nessie_hash_test.h"
|
#include "nessie_hash_test.h"
|
||||||
#include "performance_test.h"
|
#include "performance_test.h"
|
||||||
|
|
||||||
#include <stdint.h>
|
|
||||||
#include <string.h>
|
|
||||||
#include <stdlib.h>
|
|
||||||
|
|
||||||
char* algo_name = "JH";
|
char* algo_name = "JH";
|
||||||
|
|
||||||
|
|
||||||
|
@ -101,21 +93,12 @@ const cmdlist_entry_t cmdlist[] PROGMEM = {
|
||||||
};
|
};
|
||||||
|
|
||||||
int main (void){
|
int main (void){
|
||||||
DEBUG_INIT();
|
main_setup();
|
||||||
|
|
||||||
cli_rx = (cli_rx_fpt)uart0_getc;
|
|
||||||
cli_tx = (cli_tx_fpt)uart0_putc;
|
|
||||||
shavs_algolist=(hfdesc_t**)algolist;
|
shavs_algolist=(hfdesc_t**)algolist;
|
||||||
shavs_algo=(hfdesc_t*)&jh256_desc;
|
shavs_algo=(hfdesc_t*)&jh256_desc;
|
||||||
for(;;){
|
for(;;){
|
||||||
cli_putstr_P(PSTR("\r\n\r\nCrypto-VS ("));
|
welcome_msg(algo_name);
|
||||||
cli_putstr(algo_name);
|
|
||||||
cli_putstr_P(PSTR("; "));
|
|
||||||
cli_putstr(__DATE__);
|
|
||||||
cli_putstr_P(PSTR(" "));
|
|
||||||
cli_putstr(__TIME__);
|
|
||||||
cli_putstr_P(PSTR(")\r\nloaded and running\r\n"));
|
|
||||||
|
|
||||||
cmd_interface(cmdlist);
|
cmd_interface(cmdlist);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -21,12 +21,9 @@
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "config.h"
|
#include "main-test-common.h"
|
||||||
#include "uart_i.h"
|
|
||||||
#include "debug.h"
|
|
||||||
|
|
||||||
#include "keccak.h"
|
#include "keccak.h"
|
||||||
#include "cli.h"
|
|
||||||
#include "hfal_keccak.h"
|
#include "hfal_keccak.h"
|
||||||
#include "shavs.h"
|
#include "shavs.h"
|
||||||
#include "nessie_hash_test.h"
|
#include "nessie_hash_test.h"
|
||||||
|
@ -35,10 +32,6 @@
|
||||||
#include "hfal-performance.h"
|
#include "hfal-performance.h"
|
||||||
#include "hfal-test.h"
|
#include "hfal-test.h"
|
||||||
|
|
||||||
#include <stdint.h>
|
|
||||||
#include <string.h>
|
|
||||||
#include <stdlib.h>
|
|
||||||
|
|
||||||
char* algo_name = "Keccak";
|
char* algo_name = "Keccak";
|
||||||
|
|
||||||
|
|
||||||
|
@ -100,21 +93,12 @@ const cmdlist_entry_t cmdlist[] PROGMEM = {
|
||||||
};
|
};
|
||||||
|
|
||||||
int main (void){
|
int main (void){
|
||||||
DEBUG_INIT();
|
main_setup();
|
||||||
|
|
||||||
cli_rx = (cli_rx_fpt)uart0_getc;
|
|
||||||
cli_tx = (cli_tx_fpt)uart0_putc;
|
|
||||||
shavs_algolist=(hfdesc_t**)algolist;
|
shavs_algolist=(hfdesc_t**)algolist;
|
||||||
shavs_algo=(hfdesc_t*)&keccak256_desc;
|
shavs_algo=(hfdesc_t*)&keccak256_desc;
|
||||||
for(;;){
|
for(;;){
|
||||||
cli_putstr_P(PSTR("\r\n\r\nCrypto-VS ("));
|
welcome_msg(algo_name);
|
||||||
cli_putstr(algo_name);
|
|
||||||
cli_putstr_P(PSTR("; "));
|
|
||||||
cli_putstr(__DATE__);
|
|
||||||
cli_putstr_P(PSTR(" "));
|
|
||||||
cli_putstr(__TIME__);
|
|
||||||
cli_putstr_P(PSTR(")\r\nloaded and running\r\n"));
|
|
||||||
|
|
||||||
cmd_interface(cmdlist);
|
cmd_interface(cmdlist);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -20,23 +20,14 @@
|
||||||
* khazad test-suit
|
* khazad test-suit
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
#include "main-test-common.h"
|
||||||
#include "config.h"
|
|
||||||
|
|
||||||
#include "uart_i.h"
|
|
||||||
#include "debug.h"
|
|
||||||
|
|
||||||
#include "khazad.h"
|
#include "khazad.h"
|
||||||
#include "cli.h"
|
|
||||||
#include "performance_test.h"
|
#include "performance_test.h"
|
||||||
#include "bcal-performance.h"
|
#include "bcal-performance.h"
|
||||||
#include "bcal-nessie.h"
|
#include "bcal-nessie.h"
|
||||||
#include "bcal_khazad.h"
|
#include "bcal_khazad.h"
|
||||||
|
|
||||||
#include <stdint.h>
|
|
||||||
#include <string.h>
|
|
||||||
#include <stdlib.h>
|
|
||||||
|
|
||||||
char* algo_name = "Khazad";
|
char* algo_name = "Khazad";
|
||||||
|
|
||||||
const bcdesc_t* const algolist[] PROGMEM = {
|
const bcdesc_t* const algolist[] PROGMEM = {
|
||||||
|
@ -113,14 +104,10 @@ const cmdlist_entry_t cmdlist[] PROGMEM = {
|
||||||
};
|
};
|
||||||
|
|
||||||
int main (void){
|
int main (void){
|
||||||
DEBUG_INIT();
|
main_setup();
|
||||||
|
|
||||||
cli_rx = (cli_rx_fpt)uart0_getc;
|
|
||||||
cli_tx = (cli_tx_fpt)uart0_putc;
|
|
||||||
for(;;){
|
for(;;){
|
||||||
cli_putstr_P(PSTR("\r\n\r\nCrypto-VS ("));
|
welcome_msg(algo_name);
|
||||||
cli_putstr(algo_name);
|
|
||||||
cli_putstr_P(PSTR(")\r\nloaded and running\r\n"));
|
|
||||||
cmd_interface(cmdlist);
|
cmd_interface(cmdlist);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -21,10 +21,7 @@
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "config.h"
|
#include "main-test-common.h"
|
||||||
|
|
||||||
#include "uart_i.h"
|
|
||||||
#include "debug.h"
|
|
||||||
|
|
||||||
#include "md5.h"
|
#include "md5.h"
|
||||||
#include "nessie_hash_test.h"
|
#include "nessie_hash_test.h"
|
||||||
|
@ -32,11 +29,6 @@
|
||||||
#include "hfal_md5.h"
|
#include "hfal_md5.h"
|
||||||
#include "hfal-performance.h"
|
#include "hfal-performance.h"
|
||||||
|
|
||||||
#include <stdint.h>
|
|
||||||
#include <string.h>
|
|
||||||
#include <stdlib.h>
|
|
||||||
#include "cli.h"
|
|
||||||
|
|
||||||
char* algo_name = "MD5";
|
char* algo_name = "MD5";
|
||||||
|
|
||||||
const hfdesc_t* const algolist[] PROGMEM = {
|
const hfdesc_t* const algolist[] PROGMEM = {
|
||||||
|
@ -140,15 +132,10 @@ const cmdlist_entry_t cmdlist[] PROGMEM = {
|
||||||
};
|
};
|
||||||
|
|
||||||
int main (void){
|
int main (void){
|
||||||
DEBUG_INIT();
|
main_setup();
|
||||||
|
|
||||||
cli_rx = (cli_rx_fpt)uart0_getc;
|
|
||||||
cli_tx = (cli_tx_fpt)uart0_putc;
|
|
||||||
testrun_md5();
|
|
||||||
for(;;){
|
for(;;){
|
||||||
cli_putstr_P(PSTR("\r\n\r\nCrypto-VS ("));
|
welcome_msg(algo_name);
|
||||||
cli_putstr(algo_name);
|
|
||||||
cli_putstr_P(PSTR(")\r\nloaded and running\r\n"));
|
|
||||||
cmd_interface(cmdlist);
|
cmd_interface(cmdlist);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -3,20 +3,14 @@
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "config.h"
|
|
||||||
|
|
||||||
#include "uart_i.h"
|
#include "main-test-common.h"
|
||||||
#include "debug.h"
|
|
||||||
#include "cli.h"
|
|
||||||
|
|
||||||
#include "mickey128.h"
|
#include "mickey128.h"
|
||||||
#include "scal_mickey128.h"
|
#include "scal_mickey128.h"
|
||||||
#include "scal-basic.h"
|
#include "scal-basic.h"
|
||||||
#include "scal-nessie.h"
|
#include "scal-nessie.h"
|
||||||
|
|
||||||
#include <stdint.h>
|
|
||||||
#include <string.h>
|
|
||||||
|
|
||||||
char* algo_name = "Mickey128";
|
char* algo_name = "Mickey128";
|
||||||
|
|
||||||
/*****************************************************************************
|
/*****************************************************************************
|
||||||
|
@ -127,14 +121,10 @@ const cmdlist_entry_t cmdlist[] PROGMEM = {
|
||||||
};
|
};
|
||||||
|
|
||||||
int main (void){
|
int main (void){
|
||||||
DEBUG_INIT();
|
main_setup();
|
||||||
|
|
||||||
cli_rx = (cli_rx_fpt)uart0_getc;
|
|
||||||
cli_tx = (cli_tx_fpt)uart0_putc;
|
|
||||||
for(;;){
|
for(;;){
|
||||||
cli_putstr_P(PSTR("\r\n\r\nCrypto-VS ("));
|
welcome_msg(algo_name);
|
||||||
cli_putstr(algo_name);
|
|
||||||
cli_putstr_P(PSTR(")\r\nloaded and running\r\n"));
|
|
||||||
cmd_interface(cmdlist);
|
cmd_interface(cmdlist);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -21,19 +21,12 @@
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "config.h"
|
#include "main-test-common.h"
|
||||||
#include "uart_i.h"
|
|
||||||
#include "debug.h"
|
|
||||||
|
|
||||||
#include "cli.h"
|
|
||||||
#include "mqq160-sign.h"
|
#include "mqq160-sign.h"
|
||||||
#include "mqq160-sign_P.h"
|
#include "mqq160-sign_P.h"
|
||||||
#include "mqq160-sign_testkey.h"
|
#include "mqq160-sign_testkey.h"
|
||||||
#include "performance_test.h"
|
#include "performance_test.h"
|
||||||
#include <stdint.h>
|
|
||||||
#include <string.h>
|
|
||||||
#include <stdlib.h>
|
|
||||||
#include <avr/pgmspace.h>
|
|
||||||
#include "stack_measuring.h"
|
#include "stack_measuring.h"
|
||||||
|
|
||||||
char* algo_name = "MQQ160-sign";
|
char* algo_name = "MQQ160-sign";
|
||||||
|
@ -186,19 +179,10 @@ const cmdlist_entry_t cmdlist[] PROGMEM = {
|
||||||
};
|
};
|
||||||
|
|
||||||
int main (void){
|
int main (void){
|
||||||
DEBUG_INIT();
|
main_setup();
|
||||||
|
|
||||||
cli_rx = (cli_rx_fpt)uart0_getc;
|
|
||||||
cli_tx = (cli_tx_fpt)uart0_putc;
|
|
||||||
for(;;){
|
for(;;){
|
||||||
cli_putstr_P(PSTR("\r\n\r\nCrypto-VS ("));
|
welcome_msg(algo_name);
|
||||||
cli_putstr(algo_name);
|
|
||||||
cli_putstr_P(PSTR("; "));
|
|
||||||
cli_putstr(__DATE__);
|
|
||||||
cli_putstr_P(PSTR(" "));
|
|
||||||
cli_putstr(__TIME__);
|
|
||||||
cli_putstr_P(PSTR(")\r\nloaded and running\r\n"));
|
|
||||||
|
|
||||||
cmd_interface(cmdlist);
|
cmd_interface(cmdlist);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -21,20 +21,12 @@
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "config.h"
|
#include "main-test-common.h"
|
||||||
|
|
||||||
#include "uart_i.h"
|
|
||||||
#include "debug.h"
|
|
||||||
|
|
||||||
#include "mugi.h"
|
#include "mugi.h"
|
||||||
#include "nessie_stream_test.h"
|
#include "nessie_stream_test.h"
|
||||||
#include "cli.h"
|
|
||||||
#include "performance_test.h"
|
#include "performance_test.h"
|
||||||
|
|
||||||
#include <stdlib.h>
|
|
||||||
#include <stdint.h>
|
|
||||||
#include <string.h>
|
|
||||||
|
|
||||||
char* algo_name = "MUGI";
|
char* algo_name = "MUGI";
|
||||||
|
|
||||||
/*****************************************************************************
|
/*****************************************************************************
|
||||||
|
@ -127,14 +119,10 @@ const cmdlist_entry_t cmdlist[] PROGMEM = {
|
||||||
};
|
};
|
||||||
|
|
||||||
int main (void){
|
int main (void){
|
||||||
DEBUG_INIT();
|
main_setup();
|
||||||
|
|
||||||
cli_rx = (cli_rx_fpt)uart0_getc;
|
|
||||||
cli_tx = (cli_tx_fpt)uart0_putc;
|
|
||||||
for(;;){
|
for(;;){
|
||||||
cli_putstr_P(PSTR("\r\n\r\nCrypto-VS ("));
|
welcome_msg(algo_name);
|
||||||
cli_putstr(algo_name);
|
|
||||||
cli_putstr_P(PSTR(")\r\nloaded and running\r\n"));
|
|
||||||
cmd_interface(cmdlist);
|
cmd_interface(cmdlist);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -21,21 +21,13 @@
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "config.h"
|
#include "main-test-common.h"
|
||||||
|
|
||||||
#include "uart_i.h"
|
|
||||||
#include "debug.h"
|
|
||||||
|
|
||||||
#include "noekeon.h"
|
#include "noekeon.h"
|
||||||
#include "bcal-nessie.h"
|
#include "bcal-nessie.h"
|
||||||
#include "performance_test.h"
|
#include "performance_test.h"
|
||||||
#include "bcal-performance.h"
|
#include "bcal-performance.h"
|
||||||
#include "bcal_noekeon.h"
|
#include "bcal_noekeon.h"
|
||||||
#include "cli.h"
|
|
||||||
|
|
||||||
#include <stdint.h>
|
|
||||||
#include <string.h>
|
|
||||||
#include <stdlib.h>
|
|
||||||
|
|
||||||
char* algo_name = "Noekeon";
|
char* algo_name = "Noekeon";
|
||||||
|
|
||||||
|
@ -164,14 +156,10 @@ const cmdlist_entry_t cmdlist[] PROGMEM = {
|
||||||
};
|
};
|
||||||
|
|
||||||
int main (void){
|
int main (void){
|
||||||
DEBUG_INIT();
|
main_setup();
|
||||||
|
|
||||||
cli_rx = (cli_rx_fpt)uart0_getc;
|
|
||||||
cli_tx = (cli_tx_fpt)uart0_putc;
|
|
||||||
for(;;){
|
for(;;){
|
||||||
cli_putstr_P(PSTR("\r\n\r\nCrypto-VS ("));
|
welcome_msg(algo_name);
|
||||||
cli_putstr(algo_name);
|
|
||||||
cli_putstr_P(PSTR(")\r\nloaded and running\r\n"));
|
|
||||||
cmd_interface(cmdlist);
|
cmd_interface(cmdlist);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -21,22 +21,14 @@
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "config.h"
|
#include "main-test-common.h"
|
||||||
|
|
||||||
#include "uart_i.h"
|
|
||||||
#include "debug.h"
|
|
||||||
|
|
||||||
#include "noekeon.h"
|
#include "noekeon.h"
|
||||||
#include "omac_noekeon.h"
|
#include "omac_noekeon.h"
|
||||||
|
|
||||||
#include "cli.h"
|
|
||||||
#include "nessie_mac_test.h"
|
#include "nessie_mac_test.h"
|
||||||
#include "performance_test.h"
|
#include "performance_test.h"
|
||||||
|
|
||||||
#include <stdlib.h>
|
|
||||||
#include <stdint.h>
|
|
||||||
#include <string.h>
|
|
||||||
|
|
||||||
char* algo_name = "OMAC-Noekeon";
|
char* algo_name = "OMAC-Noekeon";
|
||||||
|
|
||||||
/*****************************************************************************
|
/*****************************************************************************
|
||||||
|
@ -166,14 +158,10 @@ const cmdlist_entry_t cmdlist[] PROGMEM = {
|
||||||
};
|
};
|
||||||
|
|
||||||
int main (void){
|
int main (void){
|
||||||
DEBUG_INIT();
|
main_setup();
|
||||||
|
|
||||||
cli_rx = (cli_rx_fpt)uart0_getc;
|
|
||||||
cli_tx = (cli_tx_fpt)uart0_putc;
|
|
||||||
for(;;){
|
for(;;){
|
||||||
cli_putstr_P(PSTR("\r\n\r\nCrypto-VS ("));
|
welcome_msg(algo_name);
|
||||||
cli_putstr(algo_name);
|
|
||||||
cli_putstr_P(PSTR(")\r\nloaded and running\r\n"));
|
|
||||||
cmd_interface(cmdlist);
|
cmd_interface(cmdlist);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -17,26 +17,15 @@
|
||||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
#include "main-test-common.h"
|
||||||
#include "config.h"
|
|
||||||
|
|
||||||
#include "uart_i.h"
|
|
||||||
#include "debug.h"
|
|
||||||
|
|
||||||
#include "rabbit.h"
|
#include "rabbit.h"
|
||||||
#include "cli.h"
|
|
||||||
#include "performance_test.h"
|
#include "performance_test.h"
|
||||||
|
|
||||||
#include "scal_rabbit.h"
|
#include "scal_rabbit.h"
|
||||||
#include "scal-basic.h"
|
#include "scal-basic.h"
|
||||||
#include "scal-nessie.h"
|
#include "scal-nessie.h"
|
||||||
|
|
||||||
#include <stdlib.h>
|
|
||||||
#include <stdint.h>
|
|
||||||
#include <string.h>
|
|
||||||
|
|
||||||
#include <avr/pgmspace.h>
|
|
||||||
|
|
||||||
const char* algo_name = "Rabbit";
|
const char* algo_name = "Rabbit";
|
||||||
|
|
||||||
/*****************************************************************************
|
/*****************************************************************************
|
||||||
|
@ -226,14 +215,10 @@ const cmdlist_entry_t cmdlist[] PROGMEM = {
|
||||||
};
|
};
|
||||||
|
|
||||||
int main (void){
|
int main (void){
|
||||||
DEBUG_INIT();
|
main_setup();
|
||||||
|
|
||||||
cli_rx = (cli_rx_fpt)uart0_getc;
|
|
||||||
cli_tx = (cli_tx_fpt)uart0_putc;
|
|
||||||
for(;;){
|
for(;;){
|
||||||
cli_putstr_P(PSTR("\r\n\r\nCrypto-VS ("));
|
welcome_msg(algo_name);
|
||||||
cli_putstr(algo_name);
|
|
||||||
cli_putstr_P(PSTR(")\r\nloaded and running\r\n"));
|
|
||||||
cmd_interface(cmdlist);
|
cmd_interface(cmdlist);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -21,22 +21,14 @@
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "config.h"
|
#include "main-test-common.h"
|
||||||
|
|
||||||
#include "uart_i.h"
|
|
||||||
#include "debug.h"
|
|
||||||
|
|
||||||
#include "rc5.h"
|
#include "rc5.h"
|
||||||
#include "cli.h"
|
|
||||||
#include "performance_test.h"
|
#include "performance_test.h"
|
||||||
#include "bcal-performance.h"
|
#include "bcal-performance.h"
|
||||||
#include "bcal-nessie.h"
|
#include "bcal-nessie.h"
|
||||||
#include "bcal_rc5.h"
|
#include "bcal_rc5.h"
|
||||||
|
|
||||||
#include <stdint.h>
|
|
||||||
#include <string.h>
|
|
||||||
#include <stdlib.h>
|
|
||||||
|
|
||||||
#define RC5_ROUNDS 12
|
#define RC5_ROUNDS 12
|
||||||
char* algo_name = "RC5-32/12/16";
|
char* algo_name = "RC5-32/12/16";
|
||||||
|
|
||||||
|
@ -78,14 +70,10 @@ const cmdlist_entry_t cmdlist[] PROGMEM = {
|
||||||
};
|
};
|
||||||
|
|
||||||
int main (void){
|
int main (void){
|
||||||
DEBUG_INIT();
|
main_setup();
|
||||||
|
|
||||||
cli_rx = (cli_rx_fpt)uart0_getc;
|
|
||||||
cli_tx = (cli_tx_fpt)uart0_putc;
|
|
||||||
for(;;){
|
for(;;){
|
||||||
cli_putstr_P(PSTR("\r\n\r\nCrypto-VS ("));
|
welcome_msg(algo_name);
|
||||||
cli_putstr(algo_name);
|
|
||||||
cli_putstr_P(PSTR(")\r\nloaded and running\r\n"));
|
|
||||||
cmd_interface(cmdlist);
|
cmd_interface(cmdlist);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -21,22 +21,14 @@
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "config.h"
|
#include "main-test-common.h"
|
||||||
|
|
||||||
#include "uart_i.h"
|
|
||||||
#include "debug.h"
|
|
||||||
|
|
||||||
#include "rc6.h"
|
#include "rc6.h"
|
||||||
#include "cli.h"
|
|
||||||
#include "performance_test.h"
|
#include "performance_test.h"
|
||||||
#include "bcal-performance.h"
|
#include "bcal-performance.h"
|
||||||
#include "bcal-nessie.h"
|
#include "bcal-nessie.h"
|
||||||
#include "bcal_rc6.h"
|
#include "bcal_rc6.h"
|
||||||
|
|
||||||
#include <stdint.h>
|
|
||||||
#include <string.h>
|
|
||||||
#include <stdlib.h>
|
|
||||||
|
|
||||||
#define RC6_ROUNDS 20
|
#define RC6_ROUNDS 20
|
||||||
char* algo_name = "RC6-32/20/16";
|
char* algo_name = "RC6-32/20/16";
|
||||||
|
|
||||||
|
@ -77,14 +69,10 @@ const cmdlist_entry_t cmdlist[] PROGMEM = {
|
||||||
};
|
};
|
||||||
|
|
||||||
int main (void){
|
int main (void){
|
||||||
DEBUG_INIT();
|
main_setup();
|
||||||
|
|
||||||
cli_rx = (cli_rx_fpt)uart0_getc;
|
|
||||||
cli_tx = (cli_tx_fpt)uart0_putc;
|
|
||||||
for(;;){
|
for(;;){
|
||||||
cli_putstr_P(PSTR("\r\n\r\nCrypto-VS ("));
|
welcome_msg(algo_name);
|
||||||
cli_putstr(algo_name);
|
|
||||||
cli_putstr_P(PSTR(")\r\nloaded and running\r\n"));
|
|
||||||
cmd_interface(cmdlist);
|
cmd_interface(cmdlist);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -18,23 +18,15 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
#include "config.h"
|
#include "main-test-common.h"
|
||||||
|
|
||||||
#include "uart_i.h"
|
|
||||||
#include "debug.h"
|
|
||||||
|
|
||||||
#include "salsa20.h"
|
#include "salsa20.h"
|
||||||
#include "cli.h"
|
|
||||||
#include "performance_test.h"
|
#include "performance_test.h"
|
||||||
|
|
||||||
#include "scal_salsa20.h"
|
#include "scal_salsa20.h"
|
||||||
#include "scal-basic.h"
|
#include "scal-basic.h"
|
||||||
#include "scal-nessie.h"
|
#include "scal-nessie.h"
|
||||||
|
|
||||||
#include <stdlib.h>
|
|
||||||
#include <stdint.h>
|
|
||||||
#include <string.h>
|
|
||||||
|
|
||||||
char* algo_name = "Salsa20";
|
char* algo_name = "Salsa20";
|
||||||
|
|
||||||
/*****************************************************************************
|
/*****************************************************************************
|
||||||
|
@ -279,14 +271,10 @@ const cmdlist_entry_t cmdlist[] PROGMEM = {
|
||||||
};
|
};
|
||||||
|
|
||||||
int main (void){
|
int main (void){
|
||||||
DEBUG_INIT();
|
main_setup();
|
||||||
|
|
||||||
cli_rx = (cli_rx_fpt)uart0_getc;
|
|
||||||
cli_tx = (cli_tx_fpt)uart0_putc;
|
|
||||||
for(;;){
|
for(;;){
|
||||||
cli_putstr_P(PSTR("\r\n\r\nCrypto-VS ("));
|
welcome_msg(algo_name);
|
||||||
cli_putstr(algo_name);
|
|
||||||
cli_putstr_P(PSTR(")\r\nloaded and running\r\n"));
|
|
||||||
cmd_interface(cmdlist);
|
cmd_interface(cmdlist);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -26,22 +26,16 @@
|
||||||
* GPLv3 or later
|
* GPLv3 or later
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
#include "config.h"
|
|
||||||
|
|
||||||
#include "uart_i.h"
|
|
||||||
#include "debug.h"
|
#include "main-test-common.h"
|
||||||
|
|
||||||
#include "seed.h"
|
#include "seed.h"
|
||||||
#include "cli.h"
|
|
||||||
#include "performance_test.h"
|
#include "performance_test.h"
|
||||||
#include "bcal-performance.h"
|
#include "bcal-performance.h"
|
||||||
#include "bcal-nessie.h"
|
#include "bcal-nessie.h"
|
||||||
#include "bcal_seed.h"
|
#include "bcal_seed.h"
|
||||||
|
|
||||||
#include <stdint.h>
|
|
||||||
#include <string.h>
|
|
||||||
#include <stdlib.h>
|
|
||||||
|
|
||||||
char* algo_name = "Seed";
|
char* algo_name = "Seed";
|
||||||
|
|
||||||
const bcdesc_t* const algolist[] PROGMEM = {
|
const bcdesc_t* const algolist[] PROGMEM = {
|
||||||
|
@ -140,14 +134,10 @@ const cmdlist_entry_t cmdlist[] PROGMEM = {
|
||||||
};
|
};
|
||||||
|
|
||||||
int main (void){
|
int main (void){
|
||||||
DEBUG_INIT();
|
main_setup();
|
||||||
|
|
||||||
cli_rx = (cli_rx_fpt)uart0_getc;
|
|
||||||
cli_tx = (cli_tx_fpt)uart0_putc;
|
|
||||||
for(;;){
|
for(;;){
|
||||||
cli_putstr_P(PSTR("\r\n\r\nCrypto-VS ("));
|
welcome_msg(algo_name);
|
||||||
cli_putstr(algo_name);
|
|
||||||
cli_putstr_P(PSTR(")\r\nloaded and running\r\n"));
|
|
||||||
cmd_interface(cmdlist);
|
cmd_interface(cmdlist);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -21,22 +21,15 @@
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "config.h"
|
|
||||||
|
|
||||||
#include "uart_i.h"
|
#include "main-test-common.h"
|
||||||
#include "debug.h"
|
|
||||||
|
|
||||||
#include "serpent.h"
|
#include "serpent.h"
|
||||||
#include "cli.h"
|
|
||||||
#include "performance_test.h"
|
#include "performance_test.h"
|
||||||
#include "bcal-performance.h"
|
#include "bcal-performance.h"
|
||||||
#include "bcal-nessie.h"
|
#include "bcal-nessie.h"
|
||||||
#include "bcal_serpent.h"
|
#include "bcal_serpent.h"
|
||||||
|
|
||||||
#include <stdint.h>
|
|
||||||
#include <string.h>
|
|
||||||
#include <stdlib.h>
|
|
||||||
|
|
||||||
char* algo_name = "Serpent";
|
char* algo_name = "Serpent";
|
||||||
|
|
||||||
const bcdesc_t* const algolist[] PROGMEM = {
|
const bcdesc_t* const algolist[] PROGMEM = {
|
||||||
|
@ -90,14 +83,10 @@ const cmdlist_entry_t cmdlist[] PROGMEM = {
|
||||||
};
|
};
|
||||||
|
|
||||||
int main (void){
|
int main (void){
|
||||||
DEBUG_INIT();
|
main_setup();
|
||||||
|
|
||||||
cli_rx = (cli_rx_fpt)uart0_getc;
|
|
||||||
cli_tx = (cli_tx_fpt)uart0_putc;
|
|
||||||
for(;;){
|
for(;;){
|
||||||
cli_putstr_P(PSTR("\r\n\r\nCrypto-VS ("));
|
welcome_msg(algo_name);
|
||||||
cli_putstr(algo_name);
|
|
||||||
cli_putstr_P(PSTR(")\r\nloaded and running\r\n"));
|
|
||||||
cmd_interface(cmdlist);
|
cmd_interface(cmdlist);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -21,20 +21,14 @@
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "config.h"
|
|
||||||
|
|
||||||
#include "uart_i.h"
|
#include "main-test-common.h"
|
||||||
#include "debug.h"
|
|
||||||
|
|
||||||
#include "sha1.h"
|
#include "sha1.h"
|
||||||
#include "nessie_hash_test.h"
|
#include "nessie_hash_test.h"
|
||||||
#include "hfal_sha1.h"
|
#include "hfal_sha1.h"
|
||||||
#include "hfal-performance.h"
|
#include "hfal-performance.h"
|
||||||
|
|
||||||
#include <stdint.h>
|
|
||||||
#include <string.h>
|
|
||||||
#include <stdlib.h>
|
|
||||||
#include "cli.h"
|
|
||||||
#include "shavs.h"
|
#include "shavs.h"
|
||||||
#include "hfal_sha1.h"
|
#include "hfal_sha1.h"
|
||||||
#include "dump.h"
|
#include "dump.h"
|
||||||
|
@ -210,16 +204,12 @@ const cmdlist_entry_t cmdlist[] PROGMEM = {
|
||||||
};
|
};
|
||||||
|
|
||||||
int main (void){
|
int main (void){
|
||||||
DEBUG_INIT();
|
main_setup();
|
||||||
|
|
||||||
cli_rx = (cli_rx_fpt)uart0_getc;
|
|
||||||
cli_tx = (cli_tx_fpt)uart0_putc;
|
|
||||||
shavs_algolist=(hfdesc_t**)algolist;
|
shavs_algolist=(hfdesc_t**)algolist;
|
||||||
shavs_algo=(hfdesc_t*)&sha1_desc;
|
shavs_algo=(hfdesc_t*)&sha1_desc;
|
||||||
for(;;){
|
for(;;){
|
||||||
cli_putstr_P(PSTR("\r\n\r\nCrypto-VS ("));
|
welcome_msg(algo_name);
|
||||||
cli_putstr(algo_name);
|
|
||||||
cli_putstr_P(PSTR(")\r\nloaded and running\r\n"));
|
|
||||||
cmd_interface(cmdlist);
|
cmd_interface(cmdlist);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -21,10 +21,8 @@
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "config.h"
|
|
||||||
|
|
||||||
#include "uart_i.h"
|
#include "main-test-common.h"
|
||||||
#include "debug.h"
|
|
||||||
|
|
||||||
#include "sha256.h"
|
#include "sha256.h"
|
||||||
#include "nessie_hash_test.h"
|
#include "nessie_hash_test.h"
|
||||||
|
@ -32,12 +30,9 @@
|
||||||
#include "hfal-performance.h"
|
#include "hfal-performance.h"
|
||||||
#include "hfal-nessie.h"
|
#include "hfal-nessie.h"
|
||||||
|
|
||||||
#include <stdint.h>
|
|
||||||
#include <string.h>
|
|
||||||
#include <stdlib.h>
|
|
||||||
#include "cli.h"
|
|
||||||
#include "shavs.h"
|
#include "shavs.h"
|
||||||
#include "hfal_sha256.h"
|
#include "hfal_sha256.h"
|
||||||
|
|
||||||
#include "dump.h"
|
#include "dump.h"
|
||||||
|
|
||||||
char* algo_name = "SHA-256";
|
char* algo_name = "SHA-256";
|
||||||
|
@ -155,16 +150,13 @@ const cmdlist_entry_t cmdlist[] PROGMEM = {
|
||||||
};
|
};
|
||||||
|
|
||||||
int main (void){
|
int main (void){
|
||||||
DEBUG_INIT();
|
main_setup();
|
||||||
|
|
||||||
cli_rx = (cli_rx_fpt)uart0_getc;
|
|
||||||
cli_tx = (cli_tx_fpt)uart0_putc;
|
|
||||||
shavs_algolist=(hfdesc_t**)algolist;
|
shavs_algolist=(hfdesc_t**)algolist;
|
||||||
shavs_algo=(hfdesc_t*)&sha256_desc;
|
shavs_algo=(hfdesc_t*)&sha256_desc;
|
||||||
|
|
||||||
for(;;){
|
for(;;){
|
||||||
cli_putstr_P(PSTR("\r\n\r\nCrypto-VS ("));
|
welcome_msg(algo_name);
|
||||||
cli_putstr(algo_name);
|
|
||||||
cli_putstr_P(PSTR(")\r\nloaded and running\r\n"));
|
|
||||||
cmd_interface(cmdlist);
|
cmd_interface(cmdlist);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -21,13 +21,10 @@
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "config.h"
|
|
||||||
|
|
||||||
#include "uart_i.h"
|
#include "main-test-common.h"
|
||||||
#include "debug.h"
|
|
||||||
|
|
||||||
#include "shabal.h"
|
#include "shabal.h"
|
||||||
#include "cli.h"
|
|
||||||
#include "hfal_shabal.h"
|
#include "hfal_shabal.h"
|
||||||
#include "hfal-test.h"
|
#include "hfal-test.h"
|
||||||
#include "hfal-nessie.h"
|
#include "hfal-nessie.h"
|
||||||
|
@ -36,13 +33,8 @@
|
||||||
#include "nessie_hash_test.h"
|
#include "nessie_hash_test.h"
|
||||||
#include "performance_test.h"
|
#include "performance_test.h"
|
||||||
|
|
||||||
#include <stdint.h>
|
|
||||||
#include <string.h>
|
|
||||||
#include <stdlib.h>
|
|
||||||
|
|
||||||
char* algo_name = "Shabal";
|
char* algo_name = "Shabal";
|
||||||
|
|
||||||
|
|
||||||
const hfdesc_t* const algolist[] PROGMEM = {
|
const hfdesc_t* const algolist[] PROGMEM = {
|
||||||
(hfdesc_t*)&shabal192_desc,
|
(hfdesc_t*)&shabal192_desc,
|
||||||
(hfdesc_t*)&shabal224_desc,
|
(hfdesc_t*)&shabal224_desc,
|
||||||
|
@ -220,21 +212,13 @@ const cmdlist_entry_t cmdlist[] PROGMEM = {
|
||||||
};
|
};
|
||||||
|
|
||||||
int main (void){
|
int main (void){
|
||||||
DEBUG_INIT();
|
main_setup();
|
||||||
|
|
||||||
cli_rx = (cli_rx_fpt)uart0_getc;
|
|
||||||
cli_tx = (cli_tx_fpt)uart0_putc;
|
|
||||||
shavs_algolist=(hfdesc_t**)algolist;
|
shavs_algolist=(hfdesc_t**)algolist;
|
||||||
shavs_algo=(hfdesc_t*)&shabal256_desc;
|
shavs_algo=(hfdesc_t*)&shabal256_desc;
|
||||||
for(;;){
|
|
||||||
cli_putstr_P(PSTR("\r\n\r\nCrypto-VS ("));
|
|
||||||
cli_putstr(algo_name);
|
|
||||||
cli_putstr_P(PSTR("; "));
|
|
||||||
cli_putstr(__DATE__);
|
|
||||||
cli_putstr_P(PSTR(" "));
|
|
||||||
cli_putstr(__TIME__);
|
|
||||||
cli_putstr_P(PSTR(")\r\nloaded and running\r\n"));
|
|
||||||
|
|
||||||
|
for(;;){
|
||||||
|
welcome_msg(algo_name);
|
||||||
cmd_interface(cmdlist);
|
cmd_interface(cmdlist);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -25,20 +25,13 @@
|
||||||
* GPLv3 or later
|
* GPLv3 or later
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
#include "config.h"
|
|
||||||
|
|
||||||
#include "uart_i.h"
|
#include "main-test-common.h"
|
||||||
#include "debug.h"
|
|
||||||
|
|
||||||
#include "shabea.h"
|
#include "shabea.h"
|
||||||
#include "nessie_bc_test.h"
|
#include "nessie_bc_test.h"
|
||||||
#include "cli.h"
|
|
||||||
#include "performance_test.h"
|
#include "performance_test.h"
|
||||||
|
|
||||||
#include <stdint.h>
|
|
||||||
#include <string.h>
|
|
||||||
#include <stdlib.h>
|
|
||||||
|
|
||||||
char* algo_name = "Shabea";
|
char* algo_name = "Shabea";
|
||||||
|
|
||||||
/*****************************************************************************
|
/*****************************************************************************
|
||||||
|
@ -180,14 +173,10 @@ const cmdlist_entry_t cmdlist[] PROGMEM = {
|
||||||
};
|
};
|
||||||
|
|
||||||
int main (void){
|
int main (void){
|
||||||
DEBUG_INIT();
|
main_setup();
|
||||||
|
|
||||||
cli_rx = (cli_rx_fpt)uart0_getc;
|
|
||||||
cli_tx = (cli_tx_fpt)uart0_putc;
|
|
||||||
for(;;){
|
for(;;){
|
||||||
cli_putstr_P(PSTR("\r\n\r\nCrypto-VS ("));
|
welcome_msg(algo_name);
|
||||||
cli_putstr(algo_name);
|
|
||||||
cli_putstr_P(PSTR(")\r\nloaded and running\r\n"));
|
|
||||||
cmd_interface(cmdlist);
|
cmd_interface(cmdlist);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -21,20 +21,12 @@
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "config.h"
|
#include "main-test-common.h"
|
||||||
|
|
||||||
#include "uart_i.h"
|
|
||||||
#include "debug.h"
|
|
||||||
|
|
||||||
#include "shacal1_enc.h"
|
#include "shacal1_enc.h"
|
||||||
#include "nessie_bc_test.h"
|
#include "nessie_bc_test.h"
|
||||||
#include "cli.h"
|
|
||||||
#include "performance_test.h"
|
#include "performance_test.h"
|
||||||
|
|
||||||
#include <stdlib.h>
|
|
||||||
#include <stdint.h>
|
|
||||||
#include <string.h>
|
|
||||||
|
|
||||||
char* algo_name = "Shacal1 encryption only";
|
char* algo_name = "Shacal1 encryption only";
|
||||||
|
|
||||||
/*****************************************************************************
|
/*****************************************************************************
|
||||||
|
@ -97,14 +89,10 @@ const cmdlist_entry_t cmdlist[] PROGMEM = {
|
||||||
};
|
};
|
||||||
|
|
||||||
int main (void){
|
int main (void){
|
||||||
DEBUG_INIT();
|
main_setup();
|
||||||
|
|
||||||
cli_rx = (cli_rx_fpt)uart0_getc;
|
|
||||||
cli_tx = (cli_tx_fpt)uart0_putc;
|
|
||||||
for(;;){
|
for(;;){
|
||||||
cli_putstr_P(PSTR("\r\n\r\nCrypto-VS ("));
|
welcome_msg(algo_name);
|
||||||
cli_putstr(algo_name);
|
|
||||||
cli_putstr_P(PSTR(")\r\nloaded and running\r\n"));
|
|
||||||
cmd_interface(cmdlist);
|
cmd_interface(cmdlist);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -21,20 +21,12 @@
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "config.h"
|
#include "main-test-common.h"
|
||||||
|
|
||||||
#include "uart_i.h"
|
|
||||||
#include "debug.h"
|
|
||||||
|
|
||||||
#include "shacal2_enc.h"
|
#include "shacal2_enc.h"
|
||||||
#include "nessie_bc_test.h"
|
#include "nessie_bc_test.h"
|
||||||
#include "cli.h"
|
|
||||||
#include "performance_test.h"
|
#include "performance_test.h"
|
||||||
|
|
||||||
#include <stdlib.h>
|
|
||||||
#include <stdint.h>
|
|
||||||
#include <string.h>
|
|
||||||
|
|
||||||
char* algo_name = "Shacal2 encryption only";
|
char* algo_name = "Shacal2 encryption only";
|
||||||
|
|
||||||
/*****************************************************************************
|
/*****************************************************************************
|
||||||
|
@ -97,14 +89,10 @@ const cmdlist_entry_t cmdlist[] PROGMEM = {
|
||||||
};
|
};
|
||||||
|
|
||||||
int main (void){
|
int main (void){
|
||||||
DEBUG_INIT();
|
main_setup();
|
||||||
|
|
||||||
cli_rx = (cli_rx_fpt)uart0_getc;
|
|
||||||
cli_tx = (cli_tx_fpt)uart0_putc;
|
|
||||||
for(;;){
|
for(;;){
|
||||||
cli_putstr_P(PSTR("\r\n\r\nCrypto-VS ("));
|
welcome_msg(algo_name);
|
||||||
cli_putstr(algo_name);
|
|
||||||
cli_putstr_P(PSTR(")\r\nloaded and running\r\n"));
|
|
||||||
cmd_interface(cmdlist);
|
cmd_interface(cmdlist);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -21,24 +21,15 @@
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "config.h"
|
#include "main-test-common.h"
|
||||||
|
|
||||||
#include "uart_i.h"
|
|
||||||
#include "debug.h"
|
|
||||||
|
|
||||||
#include "skipjack.h"
|
#include "skipjack.h"
|
||||||
#include "nessie_bc_test.h"
|
#include "nessie_bc_test.h"
|
||||||
#include "cli.h"
|
|
||||||
#include "performance_test.h"
|
#include "performance_test.h"
|
||||||
#include "bcal-performance.h"
|
#include "bcal-performance.h"
|
||||||
#include "bcal-nessie.h"
|
#include "bcal-nessie.h"
|
||||||
#include "bcal_skipjack.h"
|
#include "bcal_skipjack.h"
|
||||||
|
|
||||||
#include <stdint.h>
|
|
||||||
#include <string.h>
|
|
||||||
#include <stdlib.h>
|
|
||||||
|
|
||||||
|
|
||||||
char* algo_name = "Skipjack";
|
char* algo_name = "Skipjack";
|
||||||
|
|
||||||
const bcdesc_t* const algolist[] PROGMEM = {
|
const bcdesc_t* const algolist[] PROGMEM = {
|
||||||
|
@ -175,14 +166,10 @@ const cmdlist_entry_t cmdlist[] PROGMEM = {
|
||||||
};
|
};
|
||||||
|
|
||||||
int main (void){
|
int main (void){
|
||||||
DEBUG_INIT();
|
main_setup();
|
||||||
|
|
||||||
cli_rx = (cli_rx_fpt)uart0_getc;
|
|
||||||
cli_tx = (cli_tx_fpt)uart0_putc;
|
|
||||||
for(;;){
|
for(;;){
|
||||||
cli_putstr_P(PSTR("\r\n\r\nCrypto-VS ("));
|
welcome_msg(algo_name);
|
||||||
cli_putstr(algo_name);
|
|
||||||
cli_putstr_P(PSTR(")\r\nloaded and running\r\n"));
|
|
||||||
cmd_interface(cmdlist);
|
cmd_interface(cmdlist);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -21,23 +21,15 @@
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "config.h"
|
#include "main-test-common.h"
|
||||||
|
|
||||||
#include "uart_i.h"
|
|
||||||
#include "debug.h"
|
|
||||||
|
|
||||||
#include "des.h"
|
#include "des.h"
|
||||||
#include "cli.h"
|
|
||||||
#include "performance_test.h"
|
#include "performance_test.h"
|
||||||
#include "bcal-performance.h"
|
#include "bcal-performance.h"
|
||||||
#include "bcal-nessie.h"
|
#include "bcal-nessie.h"
|
||||||
#include "bcal_tdes.h"
|
#include "bcal_tdes.h"
|
||||||
#include "bcal_tdes2.h"
|
#include "bcal_tdes2.h"
|
||||||
|
|
||||||
#include <stdint.h>
|
|
||||||
#include <string.h>
|
|
||||||
#include <stdlib.h>
|
|
||||||
|
|
||||||
char* algo_name = "TDES";
|
char* algo_name = "TDES";
|
||||||
|
|
||||||
const bcdesc_t* const algolist[] PROGMEM = {
|
const bcdesc_t* const algolist[] PROGMEM = {
|
||||||
|
@ -75,14 +67,10 @@ const cmdlist_entry_t cmdlist[] PROGMEM = {
|
||||||
};
|
};
|
||||||
|
|
||||||
int main (void){
|
int main (void){
|
||||||
DEBUG_INIT();
|
main_setup();
|
||||||
|
|
||||||
cli_rx = (cli_rx_fpt)uart0_getc;
|
|
||||||
cli_tx = (cli_tx_fpt)uart0_putc;
|
|
||||||
for(;;){
|
for(;;){
|
||||||
cli_putstr_P(PSTR("\r\n\r\nCrypto-VS ("));
|
welcome_msg(algo_name);
|
||||||
cli_putstr(algo_name);
|
|
||||||
cli_putstr_P(PSTR(")\r\nloaded and running\r\n"));
|
|
||||||
cmd_interface(cmdlist);
|
cmd_interface(cmdlist);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -21,13 +21,10 @@
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "config.h"
|
|
||||||
|
|
||||||
#include "uart_i.h"
|
#include "main-test-common.h"
|
||||||
#include "debug.h"
|
|
||||||
|
|
||||||
#include "threefish.h"
|
#include "threefish.h"
|
||||||
#include "cli.h"
|
|
||||||
#include "performance_test.h"
|
#include "performance_test.h"
|
||||||
#include "bcal-performance.h"
|
#include "bcal-performance.h"
|
||||||
#include "bcal-nessie.h"
|
#include "bcal-nessie.h"
|
||||||
|
@ -35,10 +32,6 @@
|
||||||
#include "bcal_threefish512.h"
|
#include "bcal_threefish512.h"
|
||||||
#include "bcal_threefish1024.h"
|
#include "bcal_threefish1024.h"
|
||||||
|
|
||||||
#include <stdint.h>
|
|
||||||
#include <string.h>
|
|
||||||
#include <stdlib.h>
|
|
||||||
|
|
||||||
char* algo_name = "Threefish";
|
char* algo_name = "Threefish";
|
||||||
|
|
||||||
const bcdesc_t* const algolist[] PROGMEM = {
|
const bcdesc_t* const algolist[] PROGMEM = {
|
||||||
|
@ -267,14 +260,10 @@ const cmdlist_entry_t cmdlist[] PROGMEM = {
|
||||||
};
|
};
|
||||||
|
|
||||||
int main (void){
|
int main (void){
|
||||||
DEBUG_INIT();
|
main_setup();
|
||||||
|
|
||||||
cli_rx = (cli_rx_fpt)uart0_getc;
|
|
||||||
cli_tx = (cli_tx_fpt)uart0_putc;
|
|
||||||
for(;;){
|
for(;;){
|
||||||
cli_putstr_P(PSTR("\r\n\r\nCrypto-VS ("));
|
welcome_msg(algo_name);
|
||||||
cli_putstr(algo_name);
|
|
||||||
cli_putstr_P(PSTR(")\r\nloaded and running\r\n"));
|
|
||||||
cmd_interface(cmdlist);
|
cmd_interface(cmdlist);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -17,15 +17,11 @@
|
||||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
*/
|
*/
|
||||||
/*
|
/*
|
||||||
* Mickey128 test-suit
|
* Trivium test-suit
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "config.h"
|
#include "main-test-common.h"
|
||||||
|
|
||||||
#include "uart_i.h"
|
|
||||||
#include "debug.h"
|
|
||||||
#include "cli.h"
|
|
||||||
|
|
||||||
#include "trivium.h"
|
#include "trivium.h"
|
||||||
#include "scal_trivium.h"
|
#include "scal_trivium.h"
|
||||||
|
@ -33,10 +29,6 @@
|
||||||
#include "scal-nessie.h"
|
#include "scal-nessie.h"
|
||||||
#include "performance_test.h"
|
#include "performance_test.h"
|
||||||
|
|
||||||
#include <stdlib.h>
|
|
||||||
#include <stdint.h>
|
|
||||||
#include <string.h>
|
|
||||||
|
|
||||||
char* algo_name = "Trivium";
|
char* algo_name = "Trivium";
|
||||||
|
|
||||||
/*****************************************************************************
|
/*****************************************************************************
|
||||||
|
@ -143,14 +135,10 @@ const cmdlist_entry_t cmdlist[] PROGMEM = {
|
||||||
};
|
};
|
||||||
|
|
||||||
int main (void){
|
int main (void){
|
||||||
DEBUG_INIT();
|
main_setup();
|
||||||
|
|
||||||
cli_rx = (cli_rx_fpt)uart0_getc;
|
|
||||||
cli_tx = (cli_tx_fpt)uart0_putc;
|
|
||||||
for(;;){
|
for(;;){
|
||||||
cli_putstr_P(PSTR("\r\n\r\nCrypto-VS ("));
|
welcome_msg(algo_name);
|
||||||
cli_putstr(algo_name);
|
|
||||||
cli_putstr_P(PSTR(")\r\nloaded and running\r\n"));
|
|
||||||
cmd_interface(cmdlist);
|
cmd_interface(cmdlist);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -21,10 +21,8 @@
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "config.h"
|
|
||||||
|
|
||||||
#include "uart_i.h"
|
#include "main-test-common.h"
|
||||||
#include "debug.h"
|
|
||||||
|
|
||||||
#include "twister-small.h"
|
#include "twister-small.h"
|
||||||
#include "twister-large.h"
|
#include "twister-large.h"
|
||||||
|
@ -39,12 +37,6 @@
|
||||||
#include "hfal-test.h"
|
#include "hfal-test.h"
|
||||||
#include "shavs.h"
|
#include "shavs.h"
|
||||||
|
|
||||||
|
|
||||||
#include <stdint.h>
|
|
||||||
#include <string.h>
|
|
||||||
#include <stdlib.h>
|
|
||||||
#include "cli.h"
|
|
||||||
|
|
||||||
char* algo_name = "TWISTER";
|
char* algo_name = "TWISTER";
|
||||||
|
|
||||||
const hfdesc_t* const algolist[] PROGMEM = {
|
const hfdesc_t* const algolist[] PROGMEM = {
|
||||||
|
@ -139,16 +131,13 @@ const cmdlist_entry_t cmdlist[] PROGMEM = {
|
||||||
};
|
};
|
||||||
|
|
||||||
int main (void){
|
int main (void){
|
||||||
DEBUG_INIT();
|
main_setup();
|
||||||
|
|
||||||
cli_rx = (cli_rx_fpt)uart0_getc;
|
|
||||||
cli_tx = (cli_tx_fpt)uart0_putc;
|
|
||||||
shavs_algolist=(hfdesc_t**)algolist;
|
shavs_algolist=(hfdesc_t**)algolist;
|
||||||
shavs_algo=(hfdesc_t*)&twister256_desc;
|
shavs_algo=(hfdesc_t*)&twister256_desc;
|
||||||
|
|
||||||
for(;;){
|
for(;;){
|
||||||
cli_putstr_P(PSTR("\r\n\r\nCrypto-VS ("));
|
welcome_msg(algo_name);
|
||||||
cli_putstr(algo_name);
|
|
||||||
cli_putstr_P(PSTR(")\r\nloaded and running\r\n"));
|
|
||||||
cmd_interface(cmdlist);
|
cmd_interface(cmdlist);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -21,19 +21,11 @@
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "config.h"
|
#include "main-test-common.h"
|
||||||
|
|
||||||
#include "uart_i.h"
|
|
||||||
#include "debug.h"
|
|
||||||
|
|
||||||
#include "ubi.h"
|
#include "ubi.h"
|
||||||
#include "cli.h"
|
|
||||||
#include "performance_test.h"
|
#include "performance_test.h"
|
||||||
|
|
||||||
#include <stdint.h>
|
|
||||||
#include <string.h>
|
|
||||||
#include <stdlib.h>
|
|
||||||
|
|
||||||
char* algo_name = "UBI-Threefish";
|
char* algo_name = "UBI-Threefish";
|
||||||
|
|
||||||
/*****************************************************************************
|
/*****************************************************************************
|
||||||
|
@ -194,14 +186,10 @@ const cmdlist_entry_t cmdlist[] PROGMEM = {
|
||||||
};
|
};
|
||||||
|
|
||||||
int main (void){
|
int main (void){
|
||||||
DEBUG_INIT();
|
main_setup();
|
||||||
|
|
||||||
cli_rx = (cli_rx_fpt)uart0_getc;
|
|
||||||
cli_tx = (cli_tx_fpt)uart0_putc;
|
|
||||||
for(;;){
|
for(;;){
|
||||||
cli_putstr_P(PSTR("\r\n\r\nCrypto-VS ("));
|
welcome_msg(algo_name);
|
||||||
cli_putstr(algo_name);
|
|
||||||
cli_putstr_P(PSTR(")\r\nloaded and running\r\n"));
|
|
||||||
cmd_interface(cmdlist);
|
cmd_interface(cmdlist);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -21,10 +21,7 @@
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "config.h"
|
#include "main-test-common.h"
|
||||||
|
|
||||||
#include "uart_i.h"
|
|
||||||
#include "debug.h"
|
|
||||||
|
|
||||||
#include "whirlpool.h"
|
#include "whirlpool.h"
|
||||||
#include "nessie_hash_test.h"
|
#include "nessie_hash_test.h"
|
||||||
|
@ -32,10 +29,6 @@
|
||||||
#include "hfal-performance.h"
|
#include "hfal-performance.h"
|
||||||
#include "hfal-nessie.h"
|
#include "hfal-nessie.h"
|
||||||
|
|
||||||
#include <stdint.h>
|
|
||||||
#include <string.h>
|
|
||||||
#include <stdlib.h>
|
|
||||||
#include "cli.h"
|
|
||||||
#include "shavs.h"
|
#include "shavs.h"
|
||||||
#include "hfal_whirlpool_0.h"
|
#include "hfal_whirlpool_0.h"
|
||||||
#include "dump.h"
|
#include "dump.h"
|
||||||
|
@ -156,16 +149,12 @@ const cmdlist_entry_t cmdlist[] PROGMEM = {
|
||||||
};
|
};
|
||||||
|
|
||||||
int main (void){
|
int main (void){
|
||||||
DEBUG_INIT();
|
main_setup();
|
||||||
|
|
||||||
cli_rx = (cli_rx_fpt)uart0_getc;
|
|
||||||
cli_tx = (cli_tx_fpt)uart0_putc;
|
|
||||||
shavs_algolist=(hfdesc_t**)algolist;
|
shavs_algolist=(hfdesc_t**)algolist;
|
||||||
shavs_algo=(hfdesc_t*)&whirlpool_0_desc;
|
shavs_algo=(hfdesc_t*)&whirlpool_0_desc;
|
||||||
for(;;){
|
for(;;){
|
||||||
cli_putstr_P(PSTR("\r\n\r\nCrypto-VS ("));
|
welcome_msg(algo_name);
|
||||||
cli_putstr(algo_name);
|
|
||||||
cli_putstr_P(PSTR(")\r\nloaded and running\r\n"));
|
|
||||||
cmd_interface(cmdlist);
|
cmd_interface(cmdlist);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -21,10 +21,8 @@
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "config.h"
|
|
||||||
|
|
||||||
#include "uart_i.h"
|
#include "main-test-common.h"
|
||||||
#include "debug.h"
|
|
||||||
|
|
||||||
#include "whirlpool.h"
|
#include "whirlpool.h"
|
||||||
#include "nessie_hash_test.h"
|
#include "nessie_hash_test.h"
|
||||||
|
@ -32,10 +30,6 @@
|
||||||
#include "hfal-performance.h"
|
#include "hfal-performance.h"
|
||||||
#include "hfal-nessie.h"
|
#include "hfal-nessie.h"
|
||||||
|
|
||||||
#include <stdint.h>
|
|
||||||
#include <string.h>
|
|
||||||
#include <stdlib.h>
|
|
||||||
#include "cli.h"
|
|
||||||
#include "shavs.h"
|
#include "shavs.h"
|
||||||
#include "hfal_whirlpool_t.h"
|
#include "hfal_whirlpool_t.h"
|
||||||
#include "dump.h"
|
#include "dump.h"
|
||||||
|
@ -156,16 +150,13 @@ const cmdlist_entry_t cmdlist[] PROGMEM = {
|
||||||
};
|
};
|
||||||
|
|
||||||
int main (void){
|
int main (void){
|
||||||
DEBUG_INIT();
|
main_setup();
|
||||||
|
|
||||||
cli_rx = (cli_rx_fpt)uart0_getc;
|
|
||||||
cli_tx = (cli_tx_fpt)uart0_putc;
|
|
||||||
shavs_algolist=(hfdesc_t**)algolist;
|
shavs_algolist=(hfdesc_t**)algolist;
|
||||||
shavs_algo=(hfdesc_t*)&whirlpool_t_desc;
|
shavs_algo=(hfdesc_t*)&whirlpool_t_desc;
|
||||||
|
|
||||||
for(;;){
|
for(;;){
|
||||||
cli_putstr_P(PSTR("\r\n\r\nCrypto-VS ("));
|
welcome_msg(algo_name);
|
||||||
cli_putstr(algo_name);
|
|
||||||
cli_putstr_P(PSTR(")\r\nloaded and running\r\n"));
|
|
||||||
cmd_interface(cmdlist);
|
cmd_interface(cmdlist);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -21,10 +21,7 @@
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "config.h"
|
#include "main-test-common.h"
|
||||||
|
|
||||||
#include "uart_i.h"
|
|
||||||
#include "debug.h"
|
|
||||||
|
|
||||||
#include "whirlpool.h"
|
#include "whirlpool.h"
|
||||||
#include "nessie_hash_test.h"
|
#include "nessie_hash_test.h"
|
||||||
|
@ -32,10 +29,6 @@
|
||||||
#include "hfal-performance.h"
|
#include "hfal-performance.h"
|
||||||
#include "hfal-nessie.h"
|
#include "hfal-nessie.h"
|
||||||
|
|
||||||
#include <stdint.h>
|
|
||||||
#include <string.h>
|
|
||||||
#include <stdlib.h>
|
|
||||||
#include "cli.h"
|
|
||||||
#include "shavs.h"
|
#include "shavs.h"
|
||||||
#include "hfal_whirlpool.h"
|
#include "hfal_whirlpool.h"
|
||||||
#include "dump.h"
|
#include "dump.h"
|
||||||
|
@ -156,16 +149,12 @@ const cmdlist_entry_t cmdlist[] PROGMEM = {
|
||||||
};
|
};
|
||||||
|
|
||||||
int main (void){
|
int main (void){
|
||||||
DEBUG_INIT();
|
main_setup();
|
||||||
|
|
||||||
cli_rx = (cli_rx_fpt)uart0_getc;
|
|
||||||
cli_tx = (cli_tx_fpt)uart0_putc;
|
|
||||||
shavs_algolist=(hfdesc_t**)algolist;
|
shavs_algolist=(hfdesc_t**)algolist;
|
||||||
shavs_algo=(hfdesc_t*)&whirlpool_desc;
|
shavs_algo=(hfdesc_t*)&whirlpool_desc;
|
||||||
for(;;){
|
for(;;){
|
||||||
cli_putstr_P(PSTR("\r\n\r\nCrypto-VS ("));
|
welcome_msg(algo_name);
|
||||||
cli_putstr(algo_name);
|
|
||||||
cli_putstr_P(PSTR(")\r\nloaded and running\r\n"));
|
|
||||||
cmd_interface(cmdlist);
|
cmd_interface(cmdlist);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -21,10 +21,8 @@
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "config.h"
|
|
||||||
|
|
||||||
#include "uart_i.h"
|
#include "main-test-common.h"
|
||||||
#include "debug.h"
|
|
||||||
|
|
||||||
#include "xtea.h"
|
#include "xtea.h"
|
||||||
#include "nessie_bc_test.h"
|
#include "nessie_bc_test.h"
|
||||||
|
@ -32,10 +30,6 @@
|
||||||
#include "bcal-performance.h"
|
#include "bcal-performance.h"
|
||||||
#include "bcal-nessie.h"
|
#include "bcal-nessie.h"
|
||||||
#include "bcal_xtea.h"
|
#include "bcal_xtea.h"
|
||||||
#include "cli.h"
|
|
||||||
|
|
||||||
#include <stdint.h>
|
|
||||||
#include <string.h>
|
|
||||||
|
|
||||||
char* algo_name = "XTEA";
|
char* algo_name = "XTEA";
|
||||||
|
|
||||||
|
@ -91,14 +85,10 @@ const cmdlist_entry_t cmdlist[] PROGMEM = {
|
||||||
};
|
};
|
||||||
|
|
||||||
int main (void){
|
int main (void){
|
||||||
DEBUG_INIT();
|
main_setup();
|
||||||
|
|
||||||
cli_rx = (cli_rx_fpt)uart0_getc;
|
|
||||||
cli_tx = (cli_tx_fpt)uart0_putc;
|
|
||||||
for(;;){
|
for(;;){
|
||||||
cli_putstr_P(PSTR("\r\n\r\nCrypto-VS ("));
|
welcome_msg(algo_name);
|
||||||
cli_putstr(algo_name);
|
|
||||||
cli_putstr_P(PSTR(")\r\nloaded and running\r\n"));
|
|
||||||
cmd_interface(cmdlist);
|
cmd_interface(cmdlist);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -28,47 +28,54 @@
|
||||||
|
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
#include <stdint.h>
|
#include <stdint.h>
|
||||||
|
#include <stdio.h>
|
||||||
#include <avr/pgmspace.h>
|
#include <avr/pgmspace.h>
|
||||||
#include <stdlib.h> /* utoa() */
|
|
||||||
#include "nessie_common.h"
|
#include "nessie_common.h"
|
||||||
#include "hexdigit_tab.h"
|
#include "hexdigit_tab.h"
|
||||||
|
|
||||||
|
#define nessie_out_file stdout
|
||||||
|
|
||||||
|
void nessie_set_output_stream(FILE* out_stream){
|
||||||
|
nessie_out_file = out_stream;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
#ifdef NESSIE_ALIVE
|
#ifdef NESSIE_ALIVE
|
||||||
void nessie_send_alive(void){
|
void nessie_send_alive(void){
|
||||||
NESSIE_PUTC(NESSIE_ALIVE_CHAR);
|
putc(NESSIE_ALIVE_CHAR, nessie_out_file);
|
||||||
}
|
}
|
||||||
|
|
||||||
void nessie_send_alive_a(uint16_t i){
|
void nessie_send_alive_a(uint16_t i){
|
||||||
if((i&31)==0)
|
if((i&31)==0)
|
||||||
NESSIE_PUTC(NESSIE_ALIVE_CHAR);
|
putc(NESSIE_ALIVE_CHAR, nessie_out_file);
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
void nessie_print_block(uint8_t* block, uint16_t blocksize_bit){
|
void nessie_print_block(uint8_t* block, uint16_t blocksize_bit){
|
||||||
uint16_t i;
|
uint16_t i;
|
||||||
for(i=0; i<(blocksize_bit+7)/8; ++i){
|
for(i=0; i<(blocksize_bit+7)/8; ++i){
|
||||||
NESSIE_PUTC(pgm_read_byte(hexdigit_tab_uc_P+((block[i])>>4)));
|
putc(pgm_read_byte(hexdigit_tab_uc_P + ((block[i]) >> 4)), nessie_out_file);
|
||||||
NESSIE_PUTC(pgm_read_byte(hexdigit_tab_uc_P+((block[i])&0xf)));
|
putc(pgm_read_byte(hexdigit_tab_uc_P + ((block[i]) & 0xf)), nessie_out_file);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#define SPACES 31
|
#define SPACES 31
|
||||||
#define BYTESPERLINE 16
|
#define BYTESPERLINE 16
|
||||||
|
|
||||||
void nessie_print_item(char* name, uint8_t* buffer, uint16_t size_B){
|
void nessie_print_item(const char* name, uint8_t* buffer, uint16_t size_B){
|
||||||
uint8_t name_len;
|
uint8_t name_len;
|
||||||
uint8_t i;
|
uint8_t i;
|
||||||
name_len = strlen(name);
|
name_len = strlen(name);
|
||||||
if(name_len > SPACES - 1){
|
if(name_len > SPACES - 1){
|
||||||
NESSIE_PUTSTR_P(PSTR("\r\n!!! formatting error !!!\r\n"));
|
fputs_P(PSTR("\n!!! formatting error !!!\n"), nessie_out_file);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
NESSIE_PUTSTR_P(PSTR("\r\n"));
|
putc('\n', nessie_out_file);
|
||||||
for(i = 0; i < SPACES-name_len - 1; ++i){
|
for(i = 0; i < SPACES-name_len - 1; ++i){
|
||||||
NESSIE_PUTC(' ');
|
putc(' ', nessie_out_file);
|
||||||
}
|
}
|
||||||
NESSIE_PUTSTR(name);
|
fputs(name, stdout);
|
||||||
NESSIE_PUTC('=');
|
putc('=', nessie_out_file);
|
||||||
/* now the data printing begins */
|
/* now the data printing begins */
|
||||||
if(size_B <= BYTESPERLINE){
|
if(size_B <= BYTESPERLINE){
|
||||||
/* one line seems sufficient */
|
/* one line seems sufficient */
|
||||||
|
@ -79,9 +86,9 @@ void nessie_print_item(char* name, uint8_t* buffer, uint16_t size_B){
|
||||||
int16_t toprint = size_B - BYTESPERLINE;
|
int16_t toprint = size_B - BYTESPERLINE;
|
||||||
buffer += BYTESPERLINE;
|
buffer += BYTESPERLINE;
|
||||||
while(toprint > 0){
|
while(toprint > 0){
|
||||||
NESSIE_PUTSTR_P(PSTR("\r\n"));
|
putc('\n', nessie_out_file);
|
||||||
for(i = 0; i < SPACES; ++i){
|
for(i = 0; i < SPACES; ++i){
|
||||||
NESSIE_PUTC(' ');
|
putc(' ', nessie_out_file);
|
||||||
}
|
}
|
||||||
nessie_print_block(buffer, ((toprint > BYTESPERLINE) ? BYTESPERLINE : toprint) * 8);
|
nessie_print_block(buffer, ((toprint > BYTESPERLINE) ? BYTESPERLINE : toprint) * 8);
|
||||||
buffer += BYTESPERLINE;
|
buffer += BYTESPERLINE;
|
||||||
|
@ -92,14 +99,7 @@ void nessie_print_item(char* name, uint8_t* buffer, uint16_t size_B){
|
||||||
|
|
||||||
|
|
||||||
void nessie_print_set_vector(uint8_t set, uint16_t vector){
|
void nessie_print_set_vector(uint8_t set, uint16_t vector){
|
||||||
NESSIE_PUTSTR_P(PSTR("\r\n\r\nSet "));
|
fprintf_P(nessie_out_file, PSTR("\n\nSet %"PRIu8", vector#%4"PRIu16":"), set, vector);
|
||||||
NESSIE_PUTC('0'+set%10);
|
|
||||||
NESSIE_PUTSTR_P(PSTR(", vector#"));
|
|
||||||
NESSIE_PUTC((vector<1000)?' ':'0'+vector/1000);
|
|
||||||
NESSIE_PUTC((vector<100)?' ':'0'+(vector/100)%10);
|
|
||||||
NESSIE_PUTC((vector<10 )?' ':'0'+(vector/10)%10);
|
|
||||||
NESSIE_PUTC('0'+vector%10);
|
|
||||||
NESSIE_PUTC(':');
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/* example:
|
/* example:
|
||||||
|
@ -107,9 +107,7 @@ Test vectors -- set 3
|
||||||
=====================
|
=====================
|
||||||
*/
|
*/
|
||||||
void nessie_print_setheader(uint8_t set){
|
void nessie_print_setheader(uint8_t set){
|
||||||
NESSIE_PUTSTR_P(PSTR("\r\n\r\nTest vectors -- set "));
|
fprintf_P(nessie_out_file, PSTR("\r\n\r\nTest vectors -- set %"PRIu8"\n====================="), set);
|
||||||
NESSIE_PUTC('0'+set%10);
|
|
||||||
NESSIE_PUTSTR_P(PSTR("\r\n====================="));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/* example:
|
/* example:
|
||||||
|
@ -123,64 +121,47 @@ Key size: 256 bits
|
||||||
Block size: 128 bits
|
Block size: 128 bits
|
||||||
*/
|
*/
|
||||||
|
|
||||||
void nessie_print_header(char* name,
|
void nessie_print_header(const char* name,
|
||||||
uint16_t keysize_b,
|
uint16_t keysize_b,
|
||||||
uint16_t blocksize_b,
|
uint16_t blocksize_b,
|
||||||
uint16_t hashsize_b,
|
uint16_t hashsize_b,
|
||||||
uint16_t macsize_b,
|
uint16_t macsize_b,
|
||||||
uint16_t ivsize_b ){
|
uint16_t ivsize_b ){
|
||||||
uint16_t i;
|
uint16_t i;
|
||||||
NESSIE_PUTSTR_P(PSTR("\r\n\r\n"
|
fputs_P(PSTR("\n\n"
|
||||||
"********************************************************************************\r\n"
|
"********************************************************************************\n"
|
||||||
"* AVR-Crypto-Lib - crypto primitives for AVR microcontrolles by Daniel Otte *\r\n"
|
"* AVR-Crypto-Lib - crypto primitives for AVR microcontrollers by Daniel Otte *\n"
|
||||||
"********************************************************************************\r\n"
|
"********************************************************************************\n\n"),
|
||||||
"\r\n"));
|
nessie_out_file);
|
||||||
NESSIE_PUTSTR_P(PSTR("Primitive Name: "));
|
fprintf_P(nessie_out_file, PSTR("Primitive Name: %s\n"), name);
|
||||||
NESSIE_PUTSTR(name);
|
|
||||||
NESSIE_PUTSTR_P(PSTR("\r\n"));
|
|
||||||
/* underline */
|
/* underline */
|
||||||
for(i=0; i<16+strlen(name); ++i){
|
for(i=0; i<16+strlen(name); ++i){
|
||||||
NESSIE_PUTC('=');
|
putc('=', nessie_out_file);
|
||||||
}
|
}
|
||||||
char str[6]; /* must catch numbers up to 65535 + terminatin \0 */
|
|
||||||
if(keysize_b){
|
if(keysize_b){
|
||||||
NESSIE_PUTSTR_P(PSTR("\r\nKey size: "));
|
fprintf_P(nessie_out_file, PSTR("\nKey size: %"PRIu16" bits"), keysize_b);
|
||||||
utoa(keysize_b, str, 10);
|
|
||||||
NESSIE_PUTSTR(str);
|
|
||||||
NESSIE_PUTSTR_P(PSTR(" bits"));
|
|
||||||
}
|
}
|
||||||
if(blocksize_b){
|
if(blocksize_b){
|
||||||
NESSIE_PUTSTR_P(PSTR("\r\nBlock size: "));
|
fprintf_P(nessie_out_file, PSTR("\nBlock size: %"PRIu16" bits"), blocksize_b);
|
||||||
utoa(blocksize_b, str, 10);
|
|
||||||
NESSIE_PUTSTR(str);
|
|
||||||
NESSIE_PUTSTR_P(PSTR(" bits"));
|
|
||||||
}
|
}
|
||||||
if(hashsize_b){
|
if(hashsize_b){
|
||||||
NESSIE_PUTSTR_P(PSTR("\r\nHash size: "));
|
fprintf_P(nessie_out_file, PSTR("\nHash size: %"PRIu16" bits"), hashsize_b);
|
||||||
utoa(hashsize_b, str, 10);
|
|
||||||
NESSIE_PUTSTR(str);
|
|
||||||
NESSIE_PUTSTR_P(PSTR(" bits"));
|
|
||||||
}
|
}
|
||||||
if(macsize_b){
|
if(macsize_b){
|
||||||
NESSIE_PUTSTR_P(PSTR("\r\nMac size: "));
|
fprintf_P(nessie_out_file, PSTR("\nMac size: %"PRIu16" bits"), macsize_b);
|
||||||
utoa(macsize_b, str, 10);
|
|
||||||
NESSIE_PUTSTR(str);
|
|
||||||
NESSIE_PUTSTR_P(PSTR(" bits"));
|
|
||||||
}
|
}
|
||||||
if(ivsize_b){
|
if(ivsize_b){
|
||||||
if(ivsize_b==(uint16_t)-1){
|
if(ivsize_b==(uint16_t)-1){
|
||||||
NESSIE_PUTSTR_P(PSTR("\r\nNo initial value (IV) mode"));
|
fputs_P(PSTR("\nNo initial value (IV) mode"), stdout);
|
||||||
}else{
|
}else{
|
||||||
NESSIE_PUTSTR_P(PSTR("\r\nIV size: "));
|
fprintf_P(nessie_out_file, PSTR("\nIV size: %"PRIu16" bits"), ivsize_b);
|
||||||
utoa(ivsize_b, str, 10);
|
|
||||||
NESSIE_PUTSTR(str);
|
|
||||||
NESSIE_PUTSTR_P(PSTR(" bits"));
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
NESSIE_PUTSTR_P(PSTR("\r\n"));
|
putc('\n', nessie_out_file);
|
||||||
}
|
}
|
||||||
|
|
||||||
void nessie_print_footer(void){
|
void nessie_print_footer(void){
|
||||||
NESSIE_PUTSTR_P(PSTR("\r\n\r\n\r\n\r\nEnd of test vectors\r\n\r\n"));
|
puts_P(PSTR("\n\n\n\nEnd of test vectors\n\n"));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -34,6 +34,7 @@
|
||||||
#define NESSIE_USE_CLI
|
#define NESSIE_USE_CLI
|
||||||
|
|
||||||
#include <stdint.h>
|
#include <stdint.h>
|
||||||
|
#include <stdio.h>
|
||||||
|
|
||||||
#ifdef NESSIE_ALIVE
|
#ifdef NESSIE_ALIVE
|
||||||
#define NESSIE_SEND_ALIVE nessie_send_alive()
|
#define NESSIE_SEND_ALIVE nessie_send_alive()
|
||||||
|
@ -45,7 +46,7 @@ void nessie_send_alive_a(uint16_t i);
|
||||||
#define NESSIE_SEND_ALIVE_A(i)
|
#define NESSIE_SEND_ALIVE_A(i)
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
/*
|
||||||
#ifdef NESSIE_USE_CLI
|
#ifdef NESSIE_USE_CLI
|
||||||
#include "cli.h"
|
#include "cli.h"
|
||||||
#define NESSIE_PUTC cli_putc
|
#define NESSIE_PUTC cli_putc
|
||||||
|
@ -54,12 +55,15 @@ void nessie_send_alive_a(uint16_t i);
|
||||||
#else
|
#else
|
||||||
# error "direct uart output removed for nessie"
|
# error "direct uart output removed for nessie"
|
||||||
#endif
|
#endif
|
||||||
|
*/
|
||||||
|
|
||||||
|
void nessie_set_output_stream(FILE* out_stream);
|
||||||
|
|
||||||
void nessie_print_block(uint8_t* block, uint16_t blocksize_bit);
|
void nessie_print_block(uint8_t* block, uint16_t blocksize_bit);
|
||||||
void nessie_print_item(char* name, uint8_t* buffer, uint16_t size_B);
|
void nessie_print_item(const char* name, uint8_t* buffer, uint16_t size_B);
|
||||||
void nessie_print_set_vector(uint8_t set, uint16_t vector);
|
void nessie_print_set_vector(uint8_t set, uint16_t vector);
|
||||||
void nessie_print_setheader(uint8_t set);
|
void nessie_print_setheader(uint8_t set);
|
||||||
void nessie_print_header(char* name,
|
void nessie_print_header(const char* name,
|
||||||
uint16_t keysize_b,
|
uint16_t keysize_b,
|
||||||
uint16_t blocksize_b,
|
uint16_t blocksize_b,
|
||||||
uint16_t hashsize_b,
|
uint16_t hashsize_b,
|
||||||
|
|
|
@ -27,6 +27,7 @@
|
||||||
* */
|
* */
|
||||||
#include <stdint.h>
|
#include <stdint.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
|
#include <stdio.h>
|
||||||
#include "nessie_hash_test.h"
|
#include "nessie_hash_test.h"
|
||||||
#include "nessie_common.h"
|
#include "nessie_common.h"
|
||||||
#include "dbz_strings.h"
|
#include "dbz_strings.h"
|
||||||
|
@ -44,8 +45,8 @@ void ascii_hash_P(PGM_P data, PGM_P desc){
|
||||||
uint16_t sl;
|
uint16_t sl;
|
||||||
uint8_t buffer[BLOCKSIZE_B];
|
uint8_t buffer[BLOCKSIZE_B];
|
||||||
|
|
||||||
NESSIE_PUTSTR_P(PSTR("\r\n message="));
|
fputs_P(PSTR("\n message="), stdout);
|
||||||
NESSIE_PUTSTR_P(desc);
|
fputs_P(desc, stdout);
|
||||||
nessie_hash_ctx.hash_init(ctx);
|
nessie_hash_ctx.hash_init(ctx);
|
||||||
sl = strlen_P(data);
|
sl = strlen_P(data);
|
||||||
while(sl>=BLOCKSIZE_B){
|
while(sl>=BLOCKSIZE_B){
|
||||||
|
@ -70,8 +71,8 @@ void amillion_hash(void){
|
||||||
uint32_t n=1000000LL;
|
uint32_t n=1000000LL;
|
||||||
uint16_t i=0;
|
uint16_t i=0;
|
||||||
|
|
||||||
NESSIE_PUTSTR_P(PSTR("\r\n message="));
|
fputs_P(PSTR("\n message="), stdout);
|
||||||
NESSIE_PUTSTR_P(PSTR("1 million times \"a\""));
|
fputs_P(PSTR("1 million times \"a\""), stdout);
|
||||||
memset(block, 'a', nessie_hash_ctx.blocksize_B);
|
memset(block, 'a', nessie_hash_ctx.blocksize_B);
|
||||||
nessie_hash_ctx.hash_init(ctx);
|
nessie_hash_ctx.hash_init(ctx);
|
||||||
while(n>=nessie_hash_ctx.blocksize_B){
|
while(n>=nessie_hash_ctx.blocksize_B){
|
||||||
|
@ -91,17 +92,8 @@ void zero_hash(uint16_t n){
|
||||||
uint8_t hash[(nessie_hash_ctx.hashsize_b+7)/8];
|
uint8_t hash[(nessie_hash_ctx.hashsize_b+7)/8];
|
||||||
uint8_t block[nessie_hash_ctx.blocksize_B];
|
uint8_t block[nessie_hash_ctx.blocksize_B];
|
||||||
|
|
||||||
NESSIE_PUTSTR_P(PSTR("\r\n message="));
|
fputs_P(PSTR("\n message="), stdout);
|
||||||
if(n>=10000)
|
fprintf_P(stdout, PSTR("%"PRIu16" zero bits"));
|
||||||
NESSIE_PUTC('0'+n/10000);
|
|
||||||
if(n>=1000)
|
|
||||||
NESSIE_PUTC('0'+(n/1000)%10);
|
|
||||||
if(n>=100)
|
|
||||||
NESSIE_PUTC('0'+(n/100)%10);
|
|
||||||
if(n>=10)
|
|
||||||
NESSIE_PUTC('0'+(n/10)%10);
|
|
||||||
NESSIE_PUTC('0'+n%10);
|
|
||||||
NESSIE_PUTSTR_P(PSTR(" zero bits"));
|
|
||||||
|
|
||||||
memset(block, 0, nessie_hash_ctx.blocksize_B);
|
memset(block, 0, nessie_hash_ctx.blocksize_B);
|
||||||
nessie_hash_ctx.hash_init(ctx);
|
nessie_hash_ctx.hash_init(ctx);
|
||||||
|
@ -124,24 +116,10 @@ void one_in512_hash(uint16_t pos){
|
||||||
"08", "04", "02", "01" };
|
"08", "04", "02", "01" };
|
||||||
|
|
||||||
pos&=511;
|
pos&=511;
|
||||||
NESSIE_PUTSTR_P(PSTR("\r\n message="));
|
fputs_P(PSTR("\n message="), stdout);
|
||||||
NESSIE_PUTSTR_P(PSTR("512-bit string: "));
|
fputs_P(PSTR("512-bit string: "), stdout);
|
||||||
if((pos/8) >=10){
|
|
||||||
NESSIE_PUTC('0'+(pos/8/10)%10);
|
fprintf_P(stdout, PSTR("%2"PRIu16"*00,%s,%2"PRIu16"*00"), pos / 8, tab[pos & 7], 63 - pos / 8);
|
||||||
} else {
|
|
||||||
NESSIE_PUTC(' ');
|
|
||||||
}
|
|
||||||
NESSIE_PUTC('0'+(pos/8)%10);
|
|
||||||
NESSIE_PUTSTR_P(PSTR("*00,"));
|
|
||||||
NESSIE_PUTSTR(tab[pos&7]);
|
|
||||||
NESSIE_PUTC(',');
|
|
||||||
if(63-(pos/8) >=10){
|
|
||||||
NESSIE_PUTC('0'+((63-pos/8)/10)%10);
|
|
||||||
} else {
|
|
||||||
NESSIE_PUTC(' ');
|
|
||||||
}
|
|
||||||
NESSIE_PUTC('0'+(63-pos/8)%10);
|
|
||||||
NESSIE_PUTSTR_P(PSTR("*00"));
|
|
||||||
|
|
||||||
/* now the real stuff */
|
/* now the real stuff */
|
||||||
memset(block, 0, 512/8);
|
memset(block, 0, 512/8);
|
||||||
|
@ -164,18 +142,9 @@ void tv4_hash(void){
|
||||||
uint16_t n=nessie_hash_ctx.hashsize_b;
|
uint16_t n=nessie_hash_ctx.hashsize_b;
|
||||||
uint32_t i;
|
uint32_t i;
|
||||||
|
|
||||||
NESSIE_PUTSTR_P(PSTR("\r\n message="));
|
fputs_P(PSTR("\r\n message="), stdout);
|
||||||
if(nessie_hash_ctx.hashsize_b>=10000)
|
fprintf_P(stdout, PSTR("%"PRIu16" zero bits"), nessie_hash_ctx.hashsize_b);
|
||||||
NESSIE_PUTC('0' + (nessie_hash_ctx.hashsize_b/10000)%10);
|
|
||||||
if(nessie_hash_ctx.hashsize_b>=1000)
|
|
||||||
NESSIE_PUTC('0' + (nessie_hash_ctx.hashsize_b/1000)%10);
|
|
||||||
if(nessie_hash_ctx.hashsize_b>=100)
|
|
||||||
NESSIE_PUTC('0' + (nessie_hash_ctx.hashsize_b/100)%10);
|
|
||||||
if(nessie_hash_ctx.hashsize_b>=10)
|
|
||||||
NESSIE_PUTC('0' + (nessie_hash_ctx.hashsize_b/10)%10);
|
|
||||||
NESSIE_PUTC('0' + nessie_hash_ctx.hashsize_b%10);
|
|
||||||
|
|
||||||
NESSIE_PUTSTR_P(PSTR(" zero bits"));
|
|
||||||
memset(block, 0, nessie_hash_ctx.hashsize_b/8);
|
memset(block, 0, nessie_hash_ctx.hashsize_b/8);
|
||||||
|
|
||||||
nessie_hash_ctx.hash_init(ctx);
|
nessie_hash_ctx.hash_init(ctx);
|
||||||
|
|
|
@ -28,6 +28,7 @@
|
||||||
#include <stdint.h>
|
#include <stdint.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
|
#include <stdio.h>
|
||||||
#include <avr/pgmspace.h>
|
#include <avr/pgmspace.h>
|
||||||
#include "nessie_mac_test.h"
|
#include "nessie_mac_test.h"
|
||||||
#include "nessie_common.h"
|
#include "nessie_common.h"
|
||||||
|
@ -55,8 +56,8 @@ void ascii_mac_P(PGM_P data, PGM_P desc, uint8_t* key){
|
||||||
uint16_t sl;
|
uint16_t sl;
|
||||||
uint8_t buffer[BLOCKSIZE_B];
|
uint8_t buffer[BLOCKSIZE_B];
|
||||||
|
|
||||||
NESSIE_PUTSTR_P(PSTR("\r\n message="));
|
fputs_P(PSTR("\r\n message="), stdout);
|
||||||
NESSIE_PUTSTR_P(desc);
|
fputs_P(desc, stdout);
|
||||||
PRINTKEY;
|
PRINTKEY;
|
||||||
nessie_mac_ctx.mac_init(ctx, key, nessie_mac_ctx.keysize_b);
|
nessie_mac_ctx.mac_init(ctx, key, nessie_mac_ctx.keysize_b);
|
||||||
sl = strlen_P(data);
|
sl = strlen_P(data);
|
||||||
|
@ -82,8 +83,8 @@ void amillion_mac(uint8_t* key){
|
||||||
uint32_t n=1000000LL;
|
uint32_t n=1000000LL;
|
||||||
uint16_t i=0;
|
uint16_t i=0;
|
||||||
|
|
||||||
NESSIE_PUTSTR_P(PSTR("\r\n message="));
|
fputs_P(PSTR("\r\n message="), stdout);
|
||||||
NESSIE_PUTSTR_P(PSTR("1 million times \"a\""));
|
fputs_P(PSTR("1 million times \"a\""), stdout);
|
||||||
PRINTKEY;
|
PRINTKEY;
|
||||||
|
|
||||||
memset(block, 'a', nessie_mac_ctx.blocksize_B);
|
memset(block, 'a', nessie_mac_ctx.blocksize_B);
|
||||||
|
@ -105,17 +106,8 @@ void zero_mac(uint16_t n, uint8_t* key){
|
||||||
uint8_t mac[MACSIZE_B];
|
uint8_t mac[MACSIZE_B];
|
||||||
uint8_t block[nessie_mac_ctx.blocksize_B];
|
uint8_t block[nessie_mac_ctx.blocksize_B];
|
||||||
|
|
||||||
NESSIE_PUTSTR_P(PSTR("\r\n message="));
|
fputs_P(PSTR("\r\n message="), stdout);
|
||||||
if(n>=10000)
|
fprintf_P(stdout, PSTR("%"PRIu16" zero bits"), n);
|
||||||
NESSIE_PUTC('0'+n/10000);
|
|
||||||
if(n>=1000)
|
|
||||||
NESSIE_PUTC('0'+(n/1000)%10);
|
|
||||||
if(n>=100)
|
|
||||||
NESSIE_PUTC('0'+(n/100)%10);
|
|
||||||
if(n>=10)
|
|
||||||
NESSIE_PUTC('0'+(n/10)%10);
|
|
||||||
NESSIE_PUTC('0'+n%10);
|
|
||||||
NESSIE_PUTSTR_P(PSTR(" zero bits"));
|
|
||||||
PRINTKEY;
|
PRINTKEY;
|
||||||
|
|
||||||
memset(block, 0, nessie_mac_ctx.blocksize_B);
|
memset(block, 0, nessie_mac_ctx.blocksize_B);
|
||||||
|
@ -139,24 +131,10 @@ void one_in512_mac(uint16_t pos, uint8_t* key){
|
||||||
"08", "04", "02", "01" };
|
"08", "04", "02", "01" };
|
||||||
|
|
||||||
pos&=511;
|
pos&=511;
|
||||||
NESSIE_PUTSTR_P(PSTR("\r\n message="));
|
fputs_P(PSTR("\r\n message="), stdout);
|
||||||
NESSIE_PUTSTR_P(PSTR("512-bit string: "));
|
fputs_P(PSTR("512-bit string: "), stdout);
|
||||||
if((pos/8) >=10){
|
|
||||||
NESSIE_PUTC('0'+(pos/8/10)%10);
|
fprintf_P(stdout, PSTR("%2"PRIu16"*00,%s,%2"PRIu16"*00"), pos / 8, tab[pos & 7], 63 - pos / 8);
|
||||||
} else {
|
|
||||||
NESSIE_PUTC(' ');
|
|
||||||
}
|
|
||||||
NESSIE_PUTC('0'+(pos/8)%10);
|
|
||||||
NESSIE_PUTSTR_P(PSTR("*00,"));
|
|
||||||
NESSIE_PUTSTR(tab[pos&7]);
|
|
||||||
NESSIE_PUTC(',');
|
|
||||||
if(63-(pos/8) >=10){
|
|
||||||
NESSIE_PUTC('0'+((63-pos/8)/10)%10);
|
|
||||||
} else {
|
|
||||||
NESSIE_PUTC(' ');
|
|
||||||
}
|
|
||||||
NESSIE_PUTC('0'+(63-pos/8)%10);
|
|
||||||
NESSIE_PUTSTR_P(PSTR("*00"));
|
|
||||||
PRINTKEY;
|
PRINTKEY;
|
||||||
|
|
||||||
/* now the real stuff */
|
/* now the real stuff */
|
||||||
|
@ -183,12 +161,10 @@ void tv4_mac(void){
|
||||||
uint8_t key[KEYSIZE_B];
|
uint8_t key[KEYSIZE_B];
|
||||||
uint16_t n=MACSIZE_B*8;
|
uint16_t n=MACSIZE_B*8;
|
||||||
uint32_t i;
|
uint32_t i;
|
||||||
char str[6];
|
|
||||||
|
|
||||||
NESSIE_PUTSTR_P(PSTR("\r\n message="));
|
fputs_P(PSTR("\r\n message="), stdout);
|
||||||
utoa(MACSIZE_B*8, str, 10);
|
fprintf_P(stdout, PSTR("%"PRIu16" zero bits"), nessie_mac_ctx.macsize_b);
|
||||||
NESSIE_PUTSTR(str);
|
|
||||||
NESSIE_PUTSTR_P(PSTR(" zero bits"));
|
|
||||||
memset(block, 0, MACSIZE_B);
|
memset(block, 0, MACSIZE_B);
|
||||||
for(i=0; i<KEYSIZE_B; ++i)
|
for(i=0; i<KEYSIZE_B; ++i)
|
||||||
key[i] = pgm_read_byte(&(keyproto[i%(3*8)]));
|
key[i] = pgm_read_byte(&(keyproto[i%(3*8)]));
|
||||||
|
|
|
@ -28,6 +28,7 @@
|
||||||
#include <stdint.h>
|
#include <stdint.h>
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
|
#include <stdio.h>
|
||||||
#include <ctype.h>
|
#include <ctype.h>
|
||||||
#include "hashfunction_descriptor.h"
|
#include "hashfunction_descriptor.h"
|
||||||
#include "hfal-basic.h"
|
#include "hfal-basic.h"
|
||||||
|
@ -50,19 +51,17 @@
|
||||||
hfdesc_t* shavs_algo=NULL;
|
hfdesc_t* shavs_algo=NULL;
|
||||||
hfdesc_t** shavs_algolist=NULL;
|
hfdesc_t** shavs_algolist=NULL;
|
||||||
|
|
||||||
|
#define shavs_out_file stdout
|
||||||
|
|
||||||
void shavs_listalgos(void){
|
void shavs_listalgos(void){
|
||||||
char option = 'a';
|
char option = 'a';
|
||||||
|
|
||||||
hfdesc_t* t;
|
hfdesc_t* t;
|
||||||
uint8_t i=0;
|
uint8_t i=0;
|
||||||
cli_putstr_P(PSTR("\r\nthe following algorithms are available:\r\n"));
|
fputs_P(PSTR("\nthe following algorithms are available:\n"), shavs_out_file);
|
||||||
while(option <= 'z' && (t = (hfdesc_t*)pgm_read_word(&(shavs_algolist[i])))){
|
while(option <= 'z' && (t = (hfdesc_t*)pgm_read_word(&(shavs_algolist[i])))){
|
||||||
cli_putc('\t');
|
fprintf_P(shavs_out_file, PSTR("\t%c%c:\t%S\n"),
|
||||||
cli_putc((t==shavs_algo)?'*':' ');
|
(t == shavs_algo) ? '*' : ' ', option++, pgm_read_word(&(t->name)));
|
||||||
cli_putc(option++);
|
|
||||||
cli_putstr_P(PSTR(":\t"));
|
|
||||||
cli_putstr_P((void*)(pgm_read_word(&(t->name))));
|
|
||||||
cli_putstr_P(PSTR("\r\n"));
|
|
||||||
i++;
|
i++;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -73,12 +72,12 @@ void shavs_setalgo(char* param){
|
||||||
uint8_t i, option = param[0] - 'a';
|
uint8_t i, option = param[0] - 'a';
|
||||||
|
|
||||||
if(!shavs_algolist){
|
if(!shavs_algolist){
|
||||||
cli_putstr_P(PSTR("\r\nERROR: shavs_algolist not set!"));
|
fputs_P(PSTR("\nERROR: shavs_algolist not set!"), shavs_out_file);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
for(i=0; i<=option; ++i){
|
for(i=0; i<=option; ++i){
|
||||||
if((void*)pgm_read_word(&(shavs_algolist[i]))==NULL){
|
if((void*)pgm_read_word(&(shavs_algolist[i]))==NULL){
|
||||||
cli_putstr_P(PSTR("\r\nERROR: invalid selection!"));
|
fputs_P(PSTR("\r\nERROR: invalid selection!"), shavs_out_file);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -92,6 +91,7 @@ void shavs_setalgo(char* param){
|
||||||
if(t){
|
if(t){
|
||||||
shavs_algo=t;
|
shavs_algo=t;
|
||||||
}else{
|
}else{
|
||||||
|
fprintf_P(shavs_out_file, PSTR("\nERROR: could not find \"%s\"!"), param);
|
||||||
cli_putstr_P(PSTR("\r\nERROR: could not find \""));
|
cli_putstr_P(PSTR("\r\nERROR: could not find \""));
|
||||||
cli_putstr(param);
|
cli_putstr(param);
|
||||||
cli_putstr_P(PSTR("\"!"));
|
cli_putstr_P(PSTR("\"!"));
|
||||||
|
@ -184,6 +184,7 @@ int32_t getLength(void){
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
void shavs_test1(void){ /* KAT tests */
|
void shavs_test1(void){ /* KAT tests */
|
||||||
|
@ -191,7 +192,7 @@ void shavs_test1(void){ /* KAT tests */
|
||||||
int32_t expect_input=0;
|
int32_t expect_input=0;
|
||||||
|
|
||||||
if(!shavs_algo){
|
if(!shavs_algo){
|
||||||
cli_putstr_P(PSTR("\r\nERROR: select algorithm first!"));
|
fputs_P(PSTR("\r\nERROR: select algorithm first!"), shavs_out_file);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
char c;
|
char c;
|
||||||
|
@ -199,9 +200,7 @@ void shavs_test1(void){ /* KAT tests */
|
||||||
shavs_ctx.buffersize_B=pgm_read_word(&(shavs_algo->blocksize_b))/8;
|
shavs_ctx.buffersize_B=pgm_read_word(&(shavs_algo->blocksize_b))/8;
|
||||||
uint8_t buffer[shavs_ctx.buffersize_B+5];
|
uint8_t buffer[shavs_ctx.buffersize_B+5];
|
||||||
shavs_ctx.buffer = buffer;
|
shavs_ctx.buffer = buffer;
|
||||||
cli_putstr_P(PSTR("\r\nbuffer_size = 0x"));
|
fprintf_P(shavs_out_file, PSTR("\nbuffer_size = 0x%04"PRIx16" bytes"));
|
||||||
cli_hexdump_rev(&(shavs_ctx.buffersize_B), 2);
|
|
||||||
cli_putstr_P(PSTR(" bytes"));
|
|
||||||
for(;;){
|
for(;;){
|
||||||
shavs_ctx.blocks = 0;
|
shavs_ctx.blocks = 0;
|
||||||
memset(buffer, 0, shavs_ctx.buffersize_B);
|
memset(buffer, 0, shavs_ctx.buffersize_B);
|
||||||
|
@ -211,8 +210,7 @@ void shavs_test1(void){ /* KAT tests */
|
||||||
}
|
}
|
||||||
|
|
||||||
#if DEBUG
|
#if DEBUG
|
||||||
cli_putstr_P(PSTR("\r\nLen == "));
|
fprintf_P(shavs_out_file, PSTR("\nLen == %"PRIu32), length)
|
||||||
cli_hexdump_rev(&length, 4);
|
|
||||||
#endif
|
#endif
|
||||||
if(length==0){
|
if(length==0){
|
||||||
expect_input=2;
|
expect_input=2;
|
||||||
|
@ -220,59 +218,49 @@ void shavs_test1(void){ /* KAT tests */
|
||||||
expect_input=((length + 7) >> 2) & (~1L);
|
expect_input=((length + 7) >> 2) & (~1L);
|
||||||
}
|
}
|
||||||
#if DEBUG
|
#if DEBUG
|
||||||
cli_putstr_P(PSTR("\r\nexpected_input == "));
|
fprintf_P(shavs_out_file, PSTR("\r\nexpected_input == %"PRId32), expected_input);
|
||||||
cli_hexdump_rev(&expect_input, 4);
|
|
||||||
if(expect_input==0)
|
|
||||||
cli_putstr_P(PSTR("\r\nexpected_input == 0 !!!"));
|
|
||||||
#endif
|
#endif
|
||||||
shavs_ctx.buffer_idx = 0;
|
shavs_ctx.buffer_idx = 0;
|
||||||
shavs_ctx.in_byte = 0;
|
shavs_ctx.in_byte = 0;
|
||||||
shavs_ctx.blocks = 0;
|
shavs_ctx.blocks = 0;
|
||||||
uint8_t ret;
|
uint8_t ret;
|
||||||
#if DEBUG
|
#if DEBUG
|
||||||
cli_putstr_P(PSTR("\r\n HFAL init"));
|
fprintf_P(shavs_out_file, PSTR("\n HFAL init\n (2) expected_input == "), expected_input);
|
||||||
cli_putstr_P(PSTR("\r\n (2) expected_input == "));
|
|
||||||
cli_hexdump_rev(&expect_input, 4);
|
|
||||||
#endif
|
#endif
|
||||||
ret = hfal_hash_init(shavs_algo, &(shavs_ctx.ctx));
|
ret = hfal_hash_init(shavs_algo, &(shavs_ctx.ctx));
|
||||||
if(ret){
|
if(ret){
|
||||||
cli_putstr_P(PSTR("\r\n HFAL init returned with: "));
|
fprintf_P(shavs_out_file, PSTR("\r\n HFAL init returned with: %"PRIx8), ret);
|
||||||
cli_hexdump(&ret, 1);
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
#if DEBUG
|
#if DEBUG
|
||||||
cli_putstr_P(PSTR("\r\n (3) expected_input == "));
|
fprintf_P(shavs_out_file, PSTR("\r\n (3) expected_input == %"PRId32"\n"), expected_input)
|
||||||
cli_hexdump_rev(&expect_input, 4);
|
|
||||||
cli_putstr_P(PSTR("\r\n"));
|
|
||||||
#endif
|
#endif
|
||||||
while((c=cli_getc_cecho())!='M' && c!='m'){
|
while((c=cli_getc_cecho())!='M' && c!='m'){
|
||||||
if(!isblank(c)){
|
if(!isblank(c)){
|
||||||
cli_putstr_P(PSTR("\r\nERROR: wrong input (1) [0x"));
|
fprintf_P(shavs_out_file, PSTR("\nERROR: wrong input (1) [0x%"PRIx8"]!\n"), c);
|
||||||
cli_hexdump(&c, 1);
|
|
||||||
cli_putstr_P(PSTR("]!\r\n"));
|
|
||||||
hfal_hash_free(&(shavs_ctx.ctx));
|
hfal_hash_free(&(shavs_ctx.ctx));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if((c=cli_getc_cecho())!='s' && c!='S'){
|
if((c=cli_getc_cecho())!='s' && c!='S'){
|
||||||
cli_putstr_P(PSTR("\r\nERROR: wrong input (2)!\r\n"));
|
fputs_P(PSTR("\nERROR: wrong input (2)!\n"), shavs_out_file);
|
||||||
hfal_hash_free(&(shavs_ctx.ctx));
|
hfal_hash_free(&(shavs_ctx.ctx));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if((c=cli_getc_cecho())!='g' && c!='G'){
|
if((c=cli_getc_cecho())!='g' && c!='G'){
|
||||||
cli_putstr_P(PSTR("\r\nERROR: wrong input (3)!\r\n"));
|
fputs_P(PSTR("\nERROR: wrong input (3)!\n"), shavs_out_file);
|
||||||
hfal_hash_free(&(shavs_ctx.ctx));
|
hfal_hash_free(&(shavs_ctx.ctx));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
while((c=cli_getc_cecho())!='='){
|
while((c=cli_getc_cecho())!='='){
|
||||||
if(!isblank(c)){
|
if(!isblank(c)){
|
||||||
cli_putstr_P(PSTR("\r\nERROR: wrong input (4)!\r\n"));
|
fputs_P(PSTR("\nERROR: wrong input (4)!\n"), shavs_out_file);
|
||||||
hfal_hash_free(&(shavs_ctx.ctx));
|
hfal_hash_free(&(shavs_ctx.ctx));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
#if DEBUG
|
#if DEBUG
|
||||||
cli_putstr_P(PSTR("\r\nparsing started"));
|
fputs_P(PSTR("\r\nparsing started"), shavs_out_file);
|
||||||
#endif
|
#endif
|
||||||
shavs_ctx.buffer_idx = 0;
|
shavs_ctx.buffer_idx = 0;
|
||||||
shavs_ctx.in_byte = 0;
|
shavs_ctx.in_byte = 0;
|
||||||
|
@ -280,18 +268,14 @@ void shavs_test1(void){ /* KAT tests */
|
||||||
while(expect_input>0){
|
while(expect_input>0){
|
||||||
c=cli_getc_cecho();
|
c=cli_getc_cecho();
|
||||||
#if DEBUG
|
#if DEBUG
|
||||||
cli_putstr_P(PSTR("\r\n\t("));
|
fprintf_P(shavs_out_file, PSTR("\n\t(%"PRId32") "), expected_input);
|
||||||
cli_hexdump_rev(&expect_input, 4);
|
|
||||||
cli_putstr_P(PSTR(") "));
|
|
||||||
_delay_ms(500);
|
_delay_ms(500);
|
||||||
#endif
|
#endif
|
||||||
if(buffer_add(c)==0){
|
if(buffer_add(c)==0){
|
||||||
--expect_input;
|
--expect_input;
|
||||||
}else{
|
}else{
|
||||||
if(!isblank((uint16_t)c)){
|
if(!isblank((uint16_t)c)){
|
||||||
cli_putstr_P(PSTR("\r\nERROR: wrong input (5) ("));
|
fprintf_P(shavs_out_file, PSTR("\nERROR: wrong input (5) (%c)!\n"), c);
|
||||||
cli_putc(c);
|
|
||||||
cli_putstr_P(PSTR(")!\r\n"));
|
|
||||||
hfal_hash_free(&(shavs_ctx.ctx));
|
hfal_hash_free(&(shavs_ctx.ctx));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue