30 #if defined(ASCON_BACKEND_C64) || defined(ASCON_BACKEND_C64_DIRECT_XOR)
32 #define ROUND_CONSTANT(round) \
33 (~(uint64_t)(((0x0F - (round)) << 4) | (round)))
37 static const uint64_t RC[12] = {
51 uint64_t t0, t1, t2, t3, t4;
52 #if defined(ASCON_BACKEND_C64_DIRECT_XOR)
66 while (first_round < 12) {
68 x2 ^= RC[first_round];
76 x0 ^= x4; x4 ^= x3; x2 ^= x1;
77 t0 = ~x0; t1 = ~x1; t2 = ~x2; t3 = ~x3; t4 = ~x4;
78 t0 &= x1; t1 &= x2; t2 &= x3; t3 &= x4; t4 &= x0;
79 x0 ^= t1; x1 ^= t2; x2 ^= t3; x3 ^= t4; x4 ^= t0;
80 x1 ^= x0; x0 ^= x4; x3 ^= x2;
93 #if defined(ASCON_BACKEND_C64_DIRECT_XOR)
#define rightRotate39_64(a)
#define rightRotate61_64(a)
#define rightRotate41_64(a)
#define rightRotate1_64(a)
#define rightRotate10_64(a)
#define be_store_word64(ptr, x)
#define rightRotate19_64(a)
#define rightRotate6_64(a)
#define rightRotate7_64(a)
#define rightRotate28_64(a)
#define rightRotate17_64(a)
#define be_load_word64(ptr)
#define ROUND_CONSTANT(round)
Direct access to the ASCON permutation primitive.
void ascon_permute(ascon_state_t *state, uint8_t first_round)
Permutes the ASCON state with a specified number of rounds.
ascon_state_t state
[snippet_key]
Structure of the internal state of the ASCON permutation.