]> git.cryptolib.org Git - avr-crypto-lib.git/blobdiff - nessie_common.c
insereated GPLv3 stub
[avr-crypto-lib.git] / nessie_common.c
index 2f663a6a1377151482d3bcfbf1c5f94d9e37568f..020d5ab6efcde622604a686db6f66cb88df428ec 100644 (file)
@@ -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 <http://www.gnu.org/licenses/>.
+*/
 /**
  * 
  * 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){