![]() |
Can you solve this keygen problem?
Code:
bool check_key(uint64_t x) {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! |
Quote:
Code:
#include <stdlib.h> |
Thank you for the solution. It was interesting to see how you solved it.
The list of keys is actually very small. I will post them here if nobody finds them first. |
There are only 63 valid keys (shown below). I won't post my generator, since you pretty much solved it already.
Actually, 0x0000000000000000 (the all-zero key) is also accepted by the loop, but the check routine explicitly disallows this as a solution at the end. I would not say that 64 keys out of a 2^64 input space is "a lot". The challenge was deliberately created to have only a few solutions. Code:
aaaaaaaaaaaaaaaa |
Quote:
|
Posting the code, since you expressed interest in it. Here we have the "encoder" which encodes a 6-bit integer (between 1 and 63) into the full serial. Note that we skip i=0 (and start at i=1) because the all-zero key is rejected by the routine, even though it is technically valid. There are no other valid keys.
I will spend some time thinking of a new challenge that is not so easy for UniSoft to solve next time :) Code:
uint64_t generate(uint64_t x) { |
| All times are GMT +8. The time now is 21:46. |
Powered by vBulletin® Version 3.8.8
Copyright ©2000 - 2026, vBulletin Solutions, Inc.
Always Your Best Friend: Aaron, JMI, ahmadmansoor, ZeNiX