#include <crypto/twofish.h>
#include <linux/bitops.h>
#include <linux/crypto.h>
#include <linux/errno.h>
#include <linux/init.h>
#include <linux/kernel.h>
#include <linux/module.h>
#include <linux/types.h>
Go to the source code of this file.
|
#define | CALC_S(a, b, c, d, i, w, x, y, z) |
|
#define | CALC_SB_2(i, a, b) |
|
#define | CALC_SB192_2(i, a, b) |
|
#define | CALC_SB256_2(i, a, b) |
|
#define | CALC_K_2(a, b, c, d, j) |
|
#define | CALC_K(a, j, k, l, m, n) |
|
#define | CALC_K192_2(a, b, c, d, j) |
|
#define | CALC_K192(a, j, k, l, m, n) |
|
#define | CALC_K256_2(a, b, j) |
|
#define | CALC_K256(a, j, k, l, m, n) |
|
#define CALC_K |
( |
|
a, |
|
|
|
j, |
|
|
|
k, |
|
|
|
l, |
|
|
|
m, |
|
|
|
n |
|
) |
| |
#define CALC_K192 |
( |
|
a, |
|
|
|
j, |
|
|
|
k, |
|
|
|
l, |
|
|
|
m, |
|
|
|
n |
|
) |
| |
#define CALC_K192_2 |
( |
|
a, |
|
|
|
b, |
|
|
|
c, |
|
|
|
d, |
|
|
|
j |
|
) |
| |
#define CALC_K256 |
( |
|
a, |
|
|
|
j, |
|
|
|
k, |
|
|
|
l, |
|
|
|
m, |
|
|
|
n |
|
) |
| |
#define CALC_K256_2 |
( |
|
a, |
|
|
|
b, |
|
|
|
j |
|
) |
| |
#define CALC_K_2 |
( |
|
a, |
|
|
|
b, |
|
|
|
c, |
|
|
|
d, |
|
|
|
j |
|
) |
| |
#define CALC_S |
( |
|
a, |
|
|
|
b, |
|
|
|
c, |
|
|
|
d, |
|
|
|
i, |
|
|
|
w, |
|
|
|
x, |
|
|
|
y, |
|
|
|
z |
|
) |
| |
Value:
tmp = poly_to_exp[
key[
i] - 1]; \
(
a) ^= exp_to_poly[
tmp + (
w)]; \
(
b) ^= exp_to_poly[
tmp + (
x)]; \
(
c) ^= exp_to_poly[
tmp + (
y)]; \
(
d) ^= exp_to_poly[
tmp + (z)]; \
}
Definition at line 482 of file twofish_common.c.
#define CALC_SB192_2 |
( |
|
i, |
|
|
|
a, |
|
|
|
b |
|
) |
| |
Value:ctx->s[0][
i] = mds[0][q0[q0[(
b) ^
sa] ^ se] ^ si]; \
ctx->s[1][
i] = mds[1][q0[q1[(
b) ^
sb] ^
sf] ^ sj]; \
ctx->s[2][
i] = mds[2][q1[q0[(
a) ^
sc] ^
sg] ^
sk]; \
ctx->s[3][
i] = mds[3][q1[q1[(
a) ^
sd] ^ sh] ^
sl];
Definition at line 505 of file twofish_common.c.
#define CALC_SB256_2 |
( |
|
i, |
|
|
|
a, |
|
|
|
b |
|
) |
| |
Value:ctx->s[0][
i] = mds[0][q0[q0[q1[(
b) ^
sa] ^ se] ^ si] ^
sm]; \
ctx->s[1][
i] = mds[1][q0[q1[q1[(
a) ^
sb] ^
sf] ^ sj] ^
sn]; \
ctx->s[2][
i] = mds[2][q1[q0[q0[(
a) ^
sc] ^
sg] ^
sk] ^ so]; \
ctx->s[3][
i] = mds[3][q1[q1[q0[(
b) ^
sd] ^ sh] ^
sl] ^
sp];
Definition at line 513 of file twofish_common.c.
#define CALC_SB_2 |
( |
|
i, |
|
|
|
a, |
|
|
|
b |
|
) |
| |
Value:ctx->s[0][
i] = mds[0][q0[(
a) ^
sa] ^ se]; \
ctx->s[1][
i] = mds[1][q0[(
b) ^
sb] ^
sf]; \
ctx->s[2][
i] = mds[2][q1[(
a) ^
sc] ^
sg]; \
ctx->s[3][
i] = mds[3][q1[(
b) ^
sd] ^ sh]
Definition at line 497 of file twofish_common.c.