X-Git-Url: https://git.cryptolib.org/?a=blobdiff_plain;f=nessie_common.c;h=020d5ab6efcde622604a686db6f66cb88df428ec;hb=37d550b5d03ebe6cc51c6e7bbc897f9520ea7422;hp=2f663a6a1377151482d3bcfbf1c5f94d9e37568f;hpb=d4b9cfc34ce9f08df95df2933627e4e04337d36d;p=avr-crypto-lib.git diff --git a/nessie_common.c b/nessie_common.c index 2f663a6..020d5ab 100644 --- a/nessie_common.c +++ b/nessie_common.c @@ -1,3 +1,21 @@ +/* nessie_common.c */ +/* + This file is part of the Crypto-avr-lib/microcrypt-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 . +*/ /** * * author: Daniel Otte @@ -105,7 +123,7 @@ void nessie_print_header(char* name, uint16_t i; uart_putstr_P(PSTR("\r\n\r\n" "********************************************************************************\r\n" - "* micro-cryt - crypto primitives for microcontrolles by Daniel Otte *\r\n" + "* micro-crypt - crypto primitives for microcontrolles by Daniel Otte *\r\n" "********************************************************************************\r\n" "\r\n")); uart_putstr_P(PSTR("Primitive Name: ")); @@ -141,12 +159,17 @@ void nessie_print_header(char* name, uart_putstr_P(PSTR(" bits")); } if(ivsize_b){ - uart_putstr_P(PSTR("\r\nIV size: ")); - utoa(ivsize_b, str, 10); - uart_putstr(str); - uart_putstr_P(PSTR(" bits")); + if(ivsize_b==(uint16_t)-1){ + uart_putstr_P(PSTR("\r\nNo initial value (IV) mode")); + } + { + uart_putstr_P(PSTR("\r\nIV size: ")); + utoa(ivsize_b, str, 10); + uart_putstr(str); + uart_putstr_P(PSTR(" bits")); + } } - uart_putstr_P(PSTR(" bits")); + uart_putstr_P(PSTR("\r\n")); } void nessie_print_footer(void){