From: couturie Date: Mon, 25 Sep 2017 07:26:52 +0000 (+0200) Subject: new X-Git-Url: https://bilbo.iut-bm.univ-fcomte.fr/and/gitweb/Cipher_code.git/commitdiff_plain/70b995d30a4c75869c4223dbb931802246f52d94?ds=inline new --- diff --git a/IDA/test_mat2.cpp b/IDA/test_mat2.cpp index e61ecac..e09acbd 100644 --- a/IDA/test_mat2.cpp +++ b/IDA/test_mat2.cpp @@ -158,6 +158,38 @@ void buildFullRankIDA(Cube& IDAmat, Cube &invIDAmat, int q, int n, cout<& IDAmat, int q, int n, int k, byte* DK) { + + byte Sbox[256]; + byte RM1[q*n*k]; + + + rc4key(DK, Sbox, 8); + prga(Sbox, q*n*k, RM1); + Cube rm1(RM1,1,1,q*n*k); + rm1.reshape(n,k,q); + + cout<<"rm1"< sub(n,k); + sub.submat(0,0,n-1,k-1)=rm1.slice(i); + + + IDAmat.slice(i)=sub; + + + } + cout< IDAmat(n,n,q); Cube invIDAmat(n,n,q); buildFullRankIDA(IDAmat, invIDAmat, q, n, &DK[0]); - +*/ + + + + Cube IDAmat(n,k,q); + buildKRankIDA(Cube& IDAmat, q, n, k, &DK[0]); // rc4key(&DK[8], sc, 16);