]> git.cryptolib.org Git - avr-crypto-lib.git/blobdiff - test_src/main-serpent-test.c
renaming to AVR-Crypto-Lib
[avr-crypto-lib.git] / test_src / main-serpent-test.c
index 5c450b64df58282e38797b46216f5d4a8a279fdc..ea48b749cf62ec5ebd08a9fb3494122a7fcd84b5 100644 (file)
@@ -1,6 +1,6 @@
 /* main-serpent-test.c */
 /*
-    This file is part of the Crypto-avr-lib/microcrypt-lib.
+    This file is part of the 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
@@ -62,6 +62,19 @@ void testrun_nessie_serpent(void){
        nessie_bc_run();
 }
 
+void testrun_test_serpent(void){
+       uint8_t key[32];
+       serpent_ctx_t ctx;
+       uint8_t i;
+       memset(key, 0, 16);
+       serpent_init(key, 128, &ctx);
+       for(i=0; i<33; ++i){
+               uart_putstr_P(PSTR("\r\n subkekey "));  
+               uart_hexdump(&i, 1);
+               uart_putstr_P(PSTR(" : "));     
+               uart_hexdump(ctx.k[i], 16);
+       }
+}
 
 void testrun_performance_serpent(void){
        uint64_t t;
@@ -114,7 +127,7 @@ int main (void){
        uart_putstr_P(PSTR(")\r\nloaded and running\r\n"));
 
        PGM_P    u   = PSTR("nessie\0test\0performance\0");
-       void_fpt v[] = {testrun_nessie_serpent, testrun_nessie_serpent, testrun_performance_serpent};
+       void_fpt v[] = {testrun_nessie_serpent, testrun_test_serpent, testrun_performance_serpent};
 
        while(1){ 
                if (!getnextwordn(str,20)){DEBUG_S("DBG: W1\r\n"); goto error;}