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

Tests if Speck is a Markov cipher and other tests. More...

#include "common.hh"
#include "speck.hh"

Macros

#define LEFT   0
 
#define RIGHT   1
 
#define SAME_KEY   1
 

Functions

void speck_round_equiv (const WORD_T key[2], const WORD_T plaintext[2], WORD_T ciphertext[2])
 
double speck_round_xdp_keys_plaintexts (const WORD_T dx[2], const WORD_T dy[2])
 
double speck_round_xdp_keys (const WORD_T x_fixed[2], const WORD_T dx[2], const WORD_T dy[2])
 
void test_speck_markov_property ()
 
int main (int argc, char *argv[])
 

Detailed Description

Tests if Speck is a Markov cipher and other tests.

Author
V.Velichkov, vesse.nosp@m.lin..nosp@m.velic.nosp@m.hkov.nosp@m.@uni..nosp@m.lu
Date
2012-2016

Function Documentation

int main ( int  argc,
char *  argv[] 
)

Main function.

void speck_round_equiv ( const WORD_T  key[2],
const WORD_T  plaintext[2],
WORD_T  ciphertext[2] 
)

One round of Speck (equivalent representation)

double speck_round_xdp_keys ( const WORD_T  x_fixed[2],
const WORD_T  dx[2],
const WORD_T  dy[2] 
)

Probability of one round of Speck computed over the round keys.

double speck_round_xdp_keys_plaintexts ( const WORD_T  dx[2],
const WORD_T  dy[2] 
)

Probability of one round of Speck computed over the round keys and the plaintexts.