YAARX: Yet Another ARX Toolkit  0.1
 All Data Structures Files Functions Variables Macros Pages
threefish.cc File Reference

Analysis of block cipher Threefish – common routines. More...

#include "common.hh"
#include "xdp-add-diff-set.hh"
#include "threefish.hh"

Functions

void threefish32_mix (uint32_t X[4], uint32_t rot_const_0, uint32_t rot_const_1)
 
void threefish32 (uint32_t nrounds, uint32_t rot_const[THREEFISH_MAX_NROUNDS][2], uint32_t X[4], uint32_t Y[4])
 
void threefish64_mix (uint64_t X[4], uint64_t rot_const_0, uint64_t rot_const_1)
 
void threefish64 (uint64_t nrounds, uint32_t rot_const[8][2], uint64_t X[4], uint64_t Y[4])
 
void threefish32_print_dset (diff_set_t DX[4])
 
void threefish32_print_prob (double P[4])
 
void threefish32_print_dset_trail (uint32_t nrounds, diff_set_t DT[THREEFISH_MAX_NROUNDS][4], double P[THREEFISH_MAX_NROUNDS][4])
 

Variables

uint32_t g_threefish32_rot_const [12][2]
 
uint32_t g_threefish64_rot_const [8][2]
 

Detailed Description

Analysis of block cipher Threefish – common routines.

Author
V.Velichkov, vesse.nosp@m.lin..nosp@m.velic.nosp@m.hkov.nosp@m.@uni..nosp@m.lu

Function Documentation

void threefish32 ( uint32_t  nrounds,
uint32_t  rot_const[THREEFISH_MAX_NROUNDS][2],
uint32_t  X[4],
uint32_t  Y[4] 
)

Threefish-256 with 32-bit word size Reference source code: http://www.schneier.com/code/threefish.zip

void threefish32_mix ( uint32_t  X[4],
uint32_t  rot_const_0,
uint32_t  rot_const_1 
)

The MIX primitive of 32-bit Threefish.

void threefish64 ( uint64_t  nrounds,
uint32_t  rot_const[8][2],
uint64_t  X[4],
uint64_t  Y[4] 
)

Threefish-256 with 64-bit word size Reference source code: http://www.schneier.com/code/threefish.zip

void threefish64_mix ( uint64_t  X[4],
uint64_t  rot_const_0,
uint64_t  rot_const_1 
)

The MIX primitive of 64-bit Threefish.

Variable Documentation

uint32_t g_threefish32_rot_const[12][2]
Initial value:
= {
{ 7, 9},
{26, 28},
{11, 20},
{ 3, 17},
{13, 19},
{24, 6},
{28, 12},
{ 3, 14},
{12, 6},
{ 7, 5},
{22, 18},
{ 6, 14}
}

Example rotation constants for 32-bit version of Threefish.

uint32_t g_threefish64_rot_const[8][2]
Initial value:
= {
{14, 16},
{52, 57},
{23, 40},
{ 5, 37},
{25, 33},
{46, 12},
{58, 22},
{32, 32},
}

Rotation constants for the 64-bit version of Threefish (the original version).