Quote:
Originally Posted by dila
I created a key extraction challenge using this method. Maybe it can be solved?
Code:
bool check(const std::string& key) {
uint64_t b = 0;
for(size_t i = 0; i < key.length(); ++i) {
uint64_t a = 0;
for(size_t j = 0; j < key.length(); ++j) {
uint64_t d=uint64_t(key[j]);
a += uint64_t(key[j]) << (i * j);
}
b += (a % 127) << (i * 8);
}
return (b == 0x000b762957335657);
}
I don't think shifting in the opposite direction will work though @evlncrn8
|
I don't think that this can be solved in opposite direction...
I think only simple brootforce, maximum 7 characters (2nd-8th), 1st character you calculate like ([sum of all characters] % 127) == (b & 0x7F))