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, const u8 A, u32 x, u32 y)
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?