![]() |
Yet another key extraction challenge (C++)
The correct key will decrypt some fixed ciphertext into fixed plaintext. The known plaintext is apparently the digits of pi as hex digits.
Code:
#include <iostream> |
The keys are 0x45584554CF4F4C52 and 0x455845544F4F4C53.
SPOILERS AHEAD The key observation is that each round has the following transformation pattern: Code:
0...0 -> 0...0 k_n -> k' (with k_n being the key for round n and k' := a ^ b in the original algorithm)Some special care needs to be taken for rounds with zero shifts as these are effectively NOPs. |
Could you give a sample of the ciphertext encrypted?
|
The ciphertext here is 0x3141592653589793 ^ 0x1221777f1c3e4341.
Forward step is k[i][j] = k[i][0] = k[i-1][j] ^ k[i-1][0], where j = gamma[i]. Simplify and you will see the bit 0 on the current step is result of comparison of bits on the previous step. Reverse step was explained by @ArC: build the bitlogic operation table and use it to restore source bits. You need to know 2 steps to restore the bit value. |
Congrats ArC for getting the key(s).
I forgot to post my solution program here before: Code:
#include <iostream> |
| All times are GMT +8. The time now is 14:52. |
Powered by vBulletin® Version 3.8.8
Copyright ©2000 - 2026, vBulletin Solutions, Inc.
Always Your Best Friend: Aaron, JMI, ahmadmansoor, ZeNiX