permutations.c 657 Bytes
Newer Older
Martin Schläffer 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 11 12

const uint64_t constants[12] = {
    0x0101010100000000ull, 0x0101010000000001ull, 0x0101000100000100ull,
    0x0101000000000101ull, 0x0100010100010000ull, 0x0100010000010001ull,
    0x0100000100010100ull, 0x0100000000010101ull, 0x0001010101000000ull,
    0x0001010001000001ull, 0x0001000101000100ull, 0x0001000001000101ull};

#endif

Enrico Pozzobon committed
13
#if !ASCON_INLINE_PERM && ASCON_UNROLL_LOOPS
Martin Schläffer committed
14

Enrico Pozzobon committed
15 16 17
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
18 19 20

#endif

Enrico Pozzobon committed
21 22 23
#if !ASCON_INLINE_PERM && !ASCON_UNROLL_LOOPS

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

#endif