Photo

Algorithmic Cryptanalysis

External Links

  • Libraries & Programs
  • Readings
  • IACR
  • Cryptographer's world
  • CRC Press
  • Book on CRC Press
  • Author's home page
  • Other Links
Mon Dec 17 04:19:51 2018

Algorithmic Cryptanalysis (View it on amazon.com)

A CRC Press Book by Antoine Joux

Program 9.1: Basic Walsh transform code

Creative Commons License
Algorithmic cryptanalysis codes by Antoine Joux are licensed under a Creative Commons Attribution-Noncommercial-Share Alike 3.0 Unported License.
#define TYPE int

/*In place Walsh transform*/
void Walsh(TYPE *Tab, TYPE size)
{ 
  TYPE i,i0,i1;  TYPE step;

  TYPE sum,diff;
  for (step=1;step<size;step<<=1) {

    for (i1=0;i1<size;i1+=2*step) {

      for (i0=0;i0<step;i0++) {
        i=i1+i0;

        sum=Tab[i]+Tab[i+step];diff=Tab[i]-Tab[i+step];

        Tab[i]=sum;Tab[i+step]=diff;
      }
    }
  }
}

Credits for page styles: Dynamic Drive CSS Library