From adf5b1ebab7c0058a2b31b552f9477a05a0810c3 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Rapha=C3=ABl=20Couturier?= Date: Mon, 29 Jul 2019 13:02:21 +0200 Subject: [PATCH] new --- .../EnhancedOneRound/test_substitution.cpp | 29 ++++++++++++++----- 1 file changed, 21 insertions(+), 8 deletions(-) diff --git a/OneRoundIoT/EnhancedOneRound/test_substitution.cpp b/OneRoundIoT/EnhancedOneRound/test_substitution.cpp index 48ea63f..978876b 100644 --- a/OneRoundIoT/EnhancedOneRound/test_substitution.cpp +++ b/OneRoundIoT/EnhancedOneRound/test_substitution.cpp @@ -206,7 +206,8 @@ int main(int argc, char** argv) { uchar Sbox1[256]; - uchar Sbox2[256]; + uchar Sbox2[256]; + uchar Sbox3[256]; uchar Temp[256]; @@ -214,27 +215,36 @@ int main(int argc, char** argv) { double time=0; - rc4key(DK, Sbox1, 8); + rc4key(DK, Sbox1, 16); - rc4key(&DK[8], Sbox2, 8); + rc4key(&DK[16], Sbox2, 16); + rc4key(&DK[32], Sbox3, 16); + + + for(int i=0;i<256;i++) + cout<<(int)Sbox1[i]<<" "; + cout<