Jump to content
Tuts 4 You

Kaos Toy Project and Algebraic Cryptanalysis


Teddy Rogers

About This File

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?


User Feedback

Recommended Comments

There are no comments to display.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...