Dvdes-631 //free\\ -
We start from the expected ciphertext:
(gdb) b *sym.check_key+0x12f # breakpoint just before the final compare (gdb) r dvdes-631
If we with the correct value (found later) the final ciphertext matches the constant, and the function returns 1 . All other keys produce a different ciphertext. We start from the expected ciphertext: (gdb) b *sym
(Exact values omitted for brevity – they are printed by the script.) This gives us that must have been used during encryption
At the end of the loop L || R equals the original plaintext 0x0123456789ABCDEF . This gives us that must have been used during encryption.
// 3) Run a simplified DES‑like Feistel network on a fixed 64‑bit block uint64_t block = 0x0123456789ABCDEFULL; // hard‑coded plaintext uint32_t L = block >> 32; uint32_t R = block & 0xffffffff;
$ r2 -AA dvdes-631 [0x004006a0]> aaa [0x004006a0]> pdf @ sym.main