From 70b995d30a4c75869c4223dbb931802246f52d94 Mon Sep 17 00:00:00 2001 From: couturie Date: Mon, 25 Sep 2017 09:26:52 +0200 Subject: [PATCH] new --- IDA/test_mat2.cpp | 41 +++++++++++++++++++++++++++++++++++++++-- 1 file changed, 39 insertions(+), 2 deletions(-) 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); -- 2.39.5