permutations.c 572 Bytes
Newer Older
Christoph Dobraunig committed
1 2
#include "permutations.h"

Enrico Pozzobon committed
3
#if !ASCON_UNROLL_LOOPS
Martin Schläffer committed
4 5 6 7 8 9 10

const uint8_t constants[][2] = {{0xc, 0xc}, {0x9, 0xc}, {0xc, 0x9}, {0x9, 0x9},
                                {0x6, 0xc}, {0x3, 0xc}, {0x6, 0x9}, {0x3, 0x9},
                                {0xc, 0x6}, {0x9, 0x6}, {0xc, 0x3}, {0x9, 0x3}};

#endif

Enrico Pozzobon committed
11
#if !ASCON_INLINE_PERM && ASCON_UNROLL_LOOPS
Martin Schläffer committed
12

Enrico Pozzobon committed
13 14 15
void P12(state_t* s) { P12ROUNDS(s); }
void P8(state_t* s) { P8ROUNDS(s); }
void P6(state_t* s) { P6ROUNDS(s); }
Martin Schläffer committed
16 17 18

#endif

Enrico Pozzobon committed
19 20 21
#if !ASCON_INLINE_PERM && !ASCON_UNROLL_LOOPS

void P(state_t* s, int nr) { PROUNDS(s, nr); }
Martin Schläffer committed
22 23

#endif