Exetools  

Go Back   Exetools > General > General Discussion

Notices

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #1  
Old 01-13-2018, 23: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
Lightbulb Can you solve this keygen problem?

Code:
bool check_key(uint64_t x) {
  uint64_t r = x;
  for (size_t i = 0; i < 64; ++i) {
    for (size_t j = 0; j < 6; ++j) {
      r ^= (((x >> (1 << j)) & (i >> j) & 1) << i);
    }
  }
  return (x && r == 0);
}
The objective is to find valid 64-bit input keys that make the function return 'true'.

1. How many valid input keys are there?
2. Can you make a generator to enumerate all valid keys?

Z3 (or other SMT/SAT) tools are not allowed as solutions!
Reply With Quote
 


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
XP Startup - Must be simple because I can't solve it! hobferret General Discussion 13 07-09-2005 07:44


All times are GMT +8. The time now is 17:34.


Always Your Best Friend: Aaron, JMI, ahmadmansoor, ZeNiX, chessgod101
( Since 1998 )