INNER CODE UNIT · C++
curS
ph4r05/Whitebox-crypto-AES · BGEAttack.cpp:1135
Sset_t & curS = Sr[r].S[i%4][i/4];
recoverPsi(curS);
// derive Q~
// +-------------------------------- Q^{-1} \ocirc L^{-1}; 1,2 part of commutative graph
// | +----- 3.rd part of commutative graph (on purpose, to be able to construct PSI)
// | |
// 1. Q~('00') = L^{-1}(Q^{-1}('00')) \oplus (Q \ocirc L)^{-1}('00') = ['00']
// 2. f = Q~ \ocirc \oplus_{PSI(f)} \ocirc Q~{-1}
//
// (1., 2.) ==>f('00') = Q~(PSI(f)) ==>
// Q~: x is PSI(f) for some f (we have 256 of them)
// Q~: y is f('00') --- || ---
boost::unordered_set<BYTE> keySet;
boost::unordered_set<BYTE> valSet;
for(j=0; j<GF256; j++){
x = curS.psi[j];
int y = curS.fctions[j].f[0];