]> git.cryptolib.org Git - avr-crypto-lib.git/blobdiff - noekeon.c
updated Makefile
[avr-crypto-lib.git] / noekeon.c
index f5f52994b8e04681cfa96db2d89fc8ab225f696f..f48d1e6a9b282b4da6a038a356495087d57ff6da 100644 (file)
--- a/noekeon.c
+++ b/noekeon.c
@@ -1,6 +1,6 @@
 /* noekeon.c */
 /*
-    This file is part of the Crypto-avr-lib/microcrypt-lib.
+    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
@@ -32,7 +32,7 @@
        #include <avr/pgmspace.h>
 #endif
 #include "noekeon.h"
-// #include "uart.h"
+// #include "cli.h"
 
 #define ROUND_NR 16
 
@@ -93,9 +93,9 @@ void noekeon_round(uint32_t* key, uint32_t* state, uint8_t const1, uint8_t const
        ((uint8_t*)state)[RC_POS] ^= const1;
        theta(key, state);
        ((uint8_t*)state)[RC_POS] ^= const2;
+       pi1(state);
        gamma(state);
        pi2(state);
-       pi1(state);
 }
 
 uint8_t rc_tab[]
@@ -172,8 +172,8 @@ void noekeon_dec(void* buffer, const void* key){
        changendian(dkey);
        
        theta((uint32_t*)nullv, (uint32_t*)dkey);
-//     uart_putstr_P(PSTR("\r\nTheta: "));
-//     uart_hexdump(dkey, 16);
+//     cli_putstr_P(PSTR("\r\nTheta: "));
+//     cli_hexdump(dkey, 16);
        
        for(i=ROUND_NR-1; i>=0; --i){
 #ifdef __AVR__