#include "pch.h"
#include "config.h"
#include "camellia.h"
#include "misc.h"
#include "cpu.h"
Go to the source code of this file.
|
#define | SLOW_ROUND(lh, ll, rh, rl, kh, kl) |
|
#define | ROUND(lh, ll, rh, rl, kh, kl) |
|
#define | DOUBLE_ROUND(lh, ll, rh, rl, k0, k1, k2, k3) |
|
#define | EFI(i) (1-(i)) |
|
#define | CALC_ADDR2(base, i, j) ((byte *)(base)+8*(i)+4*(j)+((-16*(i))&m)) |
|
#define | CALC_ADDR(base, i) CALC_ADDR2(base, i, 0) |
|
#define | PREPARE_KS_ROUNDS |
|
#define | KS_ROUND_0(i) |
|
#define | KS_ROUND(i, r, which) |
|
#define | KS(i, j) ks[i*4 + EFI(j/2)*2 + EFI(j%2)] |
|
#define | FL(klh, kll, krh, krl) |
|
#define CALC_ADDR |
( |
|
base, |
|
|
|
i |
|
) |
| CALC_ADDR2(base, i, 0) |
#define CALC_ADDR2 |
( |
|
base, |
|
|
|
i, |
|
|
|
j |
|
) |
| ((byte *)(base)+8*(i)+4*(j)+((-16*(i))&m)) |
#define DOUBLE_ROUND |
( |
|
lh, |
|
|
|
ll, |
|
|
|
rh, |
|
|
|
rl, |
|
|
|
k0, |
|
|
|
k1, |
|
|
|
k2, |
|
|
|
k3 |
|
) |
| |
Value:
#define ROUND(lh, ll, rh, rl, kh, kl)
Definition at line 59 of file camellia.cpp.
#define FL |
( |
|
klh, |
|
|
|
kll, |
|
|
|
krh, |
|
|
|
krl |
|
) |
| |
Value: lh ^= (ll | kll); \
rh ^= (rl | krl); \
T rotlFixed(T x, unsigned int y)
Performs a left rotate.
#define KS |
( |
|
i, |
|
|
|
j |
|
) |
| ks[i*4 + EFI(j/2)*2 + EFI(j%2)] |
#define KS_ROUND |
( |
|
i, |
|
|
|
r, |
|
|
|
which |
|
) |
| |
Value: if (which & (1<<
int(r<64))) *(
word64*)(
void*)
CALC_ADDR(ks32, i+
EFI(r<64)) = (kwr << (r%64)) | (kwl >> (64 - (r%64)));
\ if (which & (1<<
int(r>64))) *(
word64*)(
void*)
CALC_ADDR(ks32, i+
EFI(r>64)) = (kwl << (r%64)) | (kwr >> (64 - (r%64)))
if(a.IndicesBefore(b, len, lenIndices))
bool IsAlignedOn(const void *ptr, unsigned int alignment)
Determines whether ptr is aligned to a minimum value.
unsigned long long word64
#define CRYPTOPP_ASSERT(exp)
#define CALC_ADDR(base, i)
Value:
bool IsAlignedOn(const void *ptr, unsigned int alignment)
Determines whether ptr is aligned to a minimum value.
unsigned long long word64
#define CRYPTOPP_ASSERT(exp)
#define CALC_ADDR(base, i)
#define PREPARE_KS_ROUNDS |
Value:
unsigned long long word64
#define ROUND |
( |
|
lh, |
|
|
|
ll, |
|
|
|
rh, |
|
|
|
rl, |
|
|
|
kh, |
|
|
|
kl |
|
) |
| |
Value:
T rotrFixed(T x, unsigned int y)
Performs a right rotate.
Definition at line 49 of file camellia.cpp.
#define SLOW_ROUND |
( |
|
lh, |
|
|
|
ll, |
|
|
|
rh, |
|
|
|
rl, |
|
|
|
kh, |
|
|
|
kl |
|
) |
| |
Value: zl ^= zr; \
rh ^= zl; \
}
T rotlFixed(T x, unsigned int y)
Performs a left rotate.
#define CRYPTOPP_GET_BYTE_AS_BYTE(x, y)
T rotrFixed(T x, unsigned int y)
Performs a right rotate.
Definition at line 29 of file camellia.cpp.