INNER CODE UNIT · C++
freeVariables
ph4r05/Whitebox-crypto-AES · BGEAttack.cpp:489
int freeVariables = 64 - rank;
// Return set of orthogonal vectors that solve this homogenous equation in case of singular system of
// equations. Subspace generated by aforementioned vectors then solves equation.
//
// We have <freeVariables> free variables. Thus dimension of subspace that solves given system
// has dimension = freeVaraibles.
//
// Return set of orthogonal vectors that span space that solves system. Each vector in this set
// has only one free variable set to 1, others are set to zero. One vector has 64 elements.
// If freeVariables=8 then we will return 8 vectors with 64 elements.
//
// Find orthogonal subspace that solves system
for(int k=0; k<freeVariables; k++){
vec_GF2 curV(INIT_SIZE, 64); // current vector
// Exactly one free variable will be turned to 1 in base