Kao’s “Toy Project” and Algebraic Cryptanalysis

Author Dcoder
Author email
Description 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?
Image no image available
Size 496.05kB
Date Sunday 04 March 2012 - 07:32:34
Downloads 843
0/5 : Not rated