X-Git-Url: https://git.cryptolib.org/?a=blobdiff_plain;f=test_src%2Fmain-skipjack-test.c;h=bb08986d8240c891527a4a07f825bbc04adae652;hb=17332291e15183d71d88ed868275e3cb53917180;hp=a7f1165c697fa97bd0ccac0e9cea178b657ed47a;hpb=2159c273c9d3361571a6ff1ab63d9bc76582fbab;p=avr-crypto-lib.git diff --git a/test_src/main-skipjack-test.c b/test_src/main-skipjack-test.c index a7f1165..bb08986 100644 --- a/test_src/main-skipjack-test.c +++ b/test_src/main-skipjack-test.c @@ -1,6 +1,6 @@ /* main-skipjack-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 @@ -112,11 +112,23 @@ void testdecrypt(uint8_t* block, uint8_t* key){ } void testrun_skipjack(void){ - uint8_t key[]={ 0x00, 0x99, 0x88, 0x77, 0x66, - 0x55, 0x44, 0x33, 0x22, 0x11}; - uint8_t data[]={ 0x33, 0x22, 0x11, 0x00, 0xdd, 0xcc, 0xbb, 0xaa}; - testencrypt(data,key); - testdecrypt(data,key); + uint8_t key[2][10]={ + { 0x00, 0x99, 0x88, 0x77, 0x66, + 0x55, 0x44, 0x33, 0x22, 0x11 }, + { 0x11, 0x22, 0x33, 0x44, 0x55, + 0x66, 0x77, 0x88, 0x99, 0x00 } + }; + + uint8_t data[2][8]={ + { 0x33, 0x22, 0x11, 0x00, + 0xdd, 0xcc, 0xbb, 0xaa }, + { 0xaa, 0xbb, 0xcc, 0xdd, + 0x00, 0x11, 0x22, 0x33 } + }; + testencrypt(data[0],key[0]); + testdecrypt(data[0],key[0]); + testencrypt(data[1],key[1]); + testdecrypt(data[1],key[1]); }