In "Toy Project" Kao presents us with a tiny, yet perverse, piece of code to reverse. Given two 32-byte strings A and B, and the 32-bit integers x and y that were used to produce B from A with the following function:
void expand(u8 B[32], const u8 A[32], u32 x, u32 y) { u32 i; for(i=0; i < 32; ++i) { out[i] = (in[i] -x) ^ y; x = ROL(x, 1); y = ROL(y, 1); } }
Simple enough. How do we solve it?
Recommended Comments
Create an account or sign in to comment