1 /* LibTomCrypt, modular cryptographic library -- Tom St Denis
3 * LibTomCrypt is a library that provides various cryptographic
4 * algorithms in a highly modular and flexible manner.
6 * The library is free for all purposes without any express
12 @file pmac_shift_xor.c
13 PMAC implementation, internal function, by Tom St Denis
19 Internal function. Performs the state update (adding correct multiple)
20 @param pmac The PMAC state.
22 void pmac_shift_xor(pmac_state *pmac)
25 y = pmac_ntz(pmac->block_index++);
27 for (x = 0; x < pmac->block_len; x += sizeof(LTC_FAST_TYPE)) {
28 *(LTC_FAST_TYPE_PTR_CAST((unsigned char *)pmac->Li + x)) ^=
29 *(LTC_FAST_TYPE_PTR_CAST((unsigned char *)pmac->Ls[y] + x));
32 for (x = 0; x < pmac->block_len; x++) {
33 pmac->Li[x] ^= pmac->Ls[y][x];
40 /* ref: $Format:%D$ */
41 /* git commit: $Format:%H$ */
42 /* commit time: $Format:%ai$ */