Botan: src/block/noekeon_simd/noekeon_simd.cpp File Reference

Botan 1.10.12

- Main Page
- Related Pages
- Namespaces
- Classes
- Files

- File List
- File Members

Namespaces | Macros
noekeon_simd.cpp File Reference
`#include <botan/noekeon_simd.h>`
`#include <botan/internal/simd_32.h>`

Go to the source code of this file.

## Namespaces
| Botan

## Macros
#define | NOK_SIMD_GAMMA(A0, A1, A2, A3)
#define | NOK_SIMD_THETA(A0, A1, A2, A3, K0, K1, K2, K3)

## Macro Definition Documentation

#define NOK_SIMD_GAMMA | ( |  | A0,
|  |  | A1,
|  |  | A2,
|  |  | A3
| ) |  |

Value:
do \
{ \
A1 ^= A3.andc(~A2); \
A0 ^= A2 & A1; \
\
SIMD_32 T = A3; \
A3 = A0; \
A0 = T; \
\
A2 ^= A0 ^ A1 ^ A3; \
\
A1 ^= A3.andc(~A2); \
A0 ^= A2 & A1; \
} while(0)

Definition at line 47 of file noekeon_simd.cpp.

Referenced by Botan::Noekeon_SIMD::decrypt_n(), and Botan::Noekeon_SIMD::encrypt_n().

#define NOK_SIMD_THETA | ( |  | A0,
|  |  | A1,
|  |  | A2,
|  |  | A3,
|  |  | K0,
|  |  | K1,
|  |  | K2,
|  |  | K3
| ) |  |

Value:
do { \
SIMD_32 T = A0 ^ A2; \
SIMD_32 T_l8 = T; \
SIMD_32 T_r8 = T; \
T_l8.rotate_left(8); \
T_r8.rotate_right(8); \
T ^= T_l8; \
T ^= T_r8; \
A1 ^= T; \
A3 ^= T; \
\
A0 ^= K0; \
A1 ^= K1; \
A2 ^= K2; \
A3 ^= K3; \
\
T = A1 ^ A3; \
T_l8 = T; \
T_r8 = T; \
T_l8.rotate_left(8); \
T_r8.rotate_right(8); \
T ^= T_l8; \
T ^= T_r8; \
A0 ^= T; \
A2 ^= T; \
} while(0)

Definition at line 16 of file noekeon_simd.cpp.

Referenced by Botan::Noekeon_SIMD::decrypt_n(), and Botan::Noekeon_SIMD::encrypt_n().