X-Git-Url: https://git.cryptolib.org/?a=blobdiff_plain;ds=inline;f=nessie_common.c;h=020d5ab6efcde622604a686db6f66cb88df428ec;hb=4d76909e4282baf1420ee309e270384246b241b8;hp=7adac8232dabf199c987e5b0d497057c464a66b6;hpb=b567660a247f4d4a15de45db334add3581a7524d;p=avr-crypto-lib.git diff --git a/nessie_common.c b/nessie_common.c index 7adac82..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,10 +159,15 @@ 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("\r\n")); }