|
![](/i/fill.gif) |
I've seen a simple encryption like this:
uint64_t poor_encrypt(uint64_t x)
{
x = x ^ SECRET1;
x = x * SECRET2;
x = x ^ SECRET3;
return x;
}
the decryption is just the reverse:
uint64_t poor_decrypt(uint64_t x)
{
x = x ^ SECRET3;
x = x * INVERSE_OF_SECRET2;
x = x ^ SECRET1;
return x;
}
How many "x, encrypt(x)" pairs are necessary to reveal the 3 secret
constants? I think, 3 pairs should be enough, but am I right?
x=0x29ad711fdc0d4f4b enc(x)=0x2453938ddf924a49
x=0x44626112006ce11b enc(x)=0xe1ba98b582ec7899
x=0xc747d38561de6e54 enc(x)=0xa7d31873bc59182c
If you got the 3 secret values, you can reveal this pair, too:
x=0x51265200dfaaaa11 enc(x)=0x87461422********
Lars R.
Post a reply to this message
|
![](/i/fill.gif) |