View Single Post
  #4  
Old 02-04-2018, 18:56
dila dila is offline
Friend
 
Join Date: Jan 2010
Posts: 60
Rept. Given: 12
Rept. Rcvd 32 Times in 14 Posts
Thanks Given: 35
Thanks Rcvd at 74 Times in 20 Posts
dila Reputation: 32
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
Reply With Quote