View Single Post
  #6  
Old 02-08-2018, 19:28
UniSoft's Avatar
UniSoft UniSoft is offline
Family
 
Join Date: May 2010
Location: Shenzhen, China
Posts: 124
Rept. Given: 23
Rept. Rcvd 259 Times in 42 Posts
Thanks Given: 23
Thanks Rcvd at 405 Times in 73 Posts
UniSoft Reputation: 200-299 UniSoft Reputation: 200-299 UniSoft Reputation: 200-299
Quote:
Originally Posted by dila View Post
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))
Reply With Quote
The Following User Says Thank You to UniSoft For This Useful Post:
dila (02-09-2018)