INNER CODE UNIT · C++
vIdxMax
ph4r05/Whitebox-crypto-AES · BGEAttack.cpp:582
long int vIdxMax = (long int) pow(2.0,vectSpaceDim);
for(long int vIdx = 1; vIdx < vIdxMax ; vIdx++){
// Reset matrix
for(int x=0; x<64; x++){
AtildMat.put(x/8, x%8, 0);
}
// Construct vector from subspace of solutions
for(int d=0; d<vectSpaceDim; d++){
if ((vIdx & (1<<d)) == 0) continue; // vIdx does not permit to use Atild[d] vector
for(int x=0; x<64; x++){
AtildMat.put(x/8, x%8, Atild[d].get(x));
}
}
// Check if this matrix is OK
NTL::inv(determinant, AtildMatInv, AtildMat); // construct inverse - thats what we are looking for