sliscp_light256.h 950 Bytes
Newer Older
lwc-tester committed
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38
/* Reference implementation of the sliscp_light256 permutation
   Written by:
   Kalikinkar Mandal <kmandal@uwaterloo.ca>
*/

#ifndef SLISCP_LIGHT256_H
#define SLISCP_LIGHT256_H

#include<math.h>
#include<stdlib.h>
#include<stdint.h>


#define STATEBYTES		32 //NUM OF WORDS = 256/8 = 32
#define SIMECKBYTES		8 // number of words = 64/8 = 8
#define SIMECKROUND    		8
#define NUMSTEPSFULL            18


typedef unsigned long long u64;

uint8_t rotl8 ( const uint8_t x, const uint8_t y, const uint8_t shift );

void  sliscp_print_data(const uint8_t *x, const uint32_t xlen );

void  simeck_print_data(const uint8_t *y, const uint8_t ylen );

void simeck64_box( uint8_t *output, const uint8_t *input, const uint8_t rc );

void sliscp_permutation256r18 ( uint8_t *input );

void sliscp_print_state256 ( const uint8_t *state );

void sliscp_permutation256r18_ALLZERO ( uint8_t *state );

void sliscp_permutation256r18_ALLONE ( uint8_t *state );

#endif