INNER CODE UNIT · C++
hash
ph4r05/Whitebox-crypto-AES · BGEAttack.cpp:1108
std::string & hash = Sr[r].S[i%4][i/4].fctions[j].hash;
// By iterating c1 over GF256 we constructed vector space, with 256 elements, thus each function
// should be different. We are checking, whether this assumption is OK and vector space is correct.
if (Sr[r].S[i%4][i/4].fmap.count(hash)!=0){
cerr << "Sr["<<r<<"].["<<(i%4)<<"]["<<(i/4)<<"] set already contains hash[" << hash << "]; for j=" << j << std::endl;
assert(Sr[r].S[i%4][i/4].fmap.count(hash)!=0);
}
Sr[r].S[i%4][i/4].fmap.insert(fctionMap_elem_t(hash, j));
}
}
//
// Now we have Sr[r] generated (set S for whole round r)
// According to the paper, we now have to construct isomorphism
// \phi S --> GF(2)^8