#include <linux/init.h>
#include <linux/types.h>
#include <linux/crypto.h>
#include <linux/module.h>
#include <linux/scatterlist.h>
#include <asm/byteorder.h>
#include <crypto/scatterwalk.h>
#include <crypto/vmac.h>
#include <crypto/internal/hash.h>
Go to the source code of this file.
|
#define | UINT64_C(x) x##ULL |
|
#define | pe64_to_cpup le64_to_cpup /* Prefer little endian */ |
|
#define | INDEX_HIGH 0 |
|
#define | INDEX_LOW 1 |
|
#define | ADD128(rh, rl, ih, il) |
|
#define | MUL32(i1, i2) ((u64)(u32)(i1)*(u32)(i2)) |
|
#define | PMUL64(rh, rl, i1, i2) |
|
#define | MUL64(rh, rl, i1, i2) |
|
#define | nh_16(mp, kp, nw, rh, rl) |
|
#define | a0 (*(((u32 *)alo)+INDEX_LOW)) |
|
#define | a1 (*(((u32 *)alo)+INDEX_HIGH)) |
|
#define | a2 (*(((u32 *)ahi)+INDEX_LOW)) |
|
#define | a3 (*(((u32 *)ahi)+INDEX_HIGH)) |
|
#define | k0 (*(((u32 *)kl)+INDEX_LOW)) |
|
#define | k1 (*(((u32 *)kl)+INDEX_HIGH)) |
|
#define | k2 (*(((u32 *)kh)+INDEX_LOW)) |
|
#define | k3 (*(((u32 *)kh)+INDEX_HIGH)) |
|
#define | poly_step(ah, al, kh, kl, mh, ml) poly_step_func(&(ah), &(al), &(kh), &(kl), &(mh), &(ml)) |
|
#define | nh_16_2(mp, kp, nw, rh, rl, rh2, rl2) |
|
#define | nh_vmac_nhbytes(mp, kp, nw, rh, rl) nh_16(mp, kp, nw, rh, rl) |
|
#define | nh_vmac_nhbytes_2(mp, kp, nw, rh, rl, rh2, rl2) |
|
#define ADD128 |
( |
|
rh, |
|
|
|
rl, |
|
|
|
ih, |
|
|
|
il |
|
) |
| |
Value:
(rl) += (_il); \
if ((rl) < (_il)) \
(rh)++; \
(rh) += (ih); \
} while (0)
Definition at line 66 of file vmac.c.
#define MUL32 |
( |
|
i1, |
|
|
|
i2 |
|
) |
| ((u64)(u32)(i1)*(u32)(i2)) |
#define MUL64 |
( |
|
rh, |
|
|
|
rl, |
|
|
|
i1, |
|
|
|
i2 |
|
) |
| |
Value:
u64 _i1 = (i1), _i2 = (i2);
\
rh =
MUL32(_i1>>32, _i2>>32); \
ADD128(rh, rl, (m1 >> 32), (m1 << 32)); \
ADD128(rh, rl, (m2 >> 32), (m2 << 32)); \
} while (0)
Definition at line 86 of file vmac.c.
#define nh_16 |
( |
|
mp, |
|
|
|
kp, |
|
|
|
nw, |
|
|
|
rh, |
|
|
|
rl |
|
) |
| |
Value:
rh = rl = t = 0; \
for (i = 0; i < nw; i += 2) { \
m2 =
MUL32(t1 >> 32, t2); \
m1 =
MUL32(t1, t2 >> 32); \
ADD128(rh, rl,
MUL32(t1 >> 32, t2 >> 32), \
} \
ADD128(rh, rl, (t >> 32), (t << 32)); \
} while (0)
Definition at line 216 of file vmac.c.
#define nh_16_2 |
( |
|
mp, |
|
|
|
kp, |
|
|
|
nw, |
|
|
|
rh, |
|
|
|
rl, |
|
|
|
rh2, |
|
|
|
rl2 |
|
) |
| |
Value:do { \
nh_16(
mp, kp, nw, rh, rl); \
nh_16(
mp, ((kp)+2), nw, rh2, rl2); \
} while (0)
Definition at line 303 of file vmac.c.
#define nh_vmac_nhbytes |
( |
|
mp, |
|
|
|
kp, |
|
|
|
nw, |
|
|
|
rh, |
|
|
|
rl |
|
) |
| nh_16(mp, kp, nw, rh, rl) |
#define nh_vmac_nhbytes_2 |
( |
|
mp, |
|
|
|
kp, |
|
|
|
nw, |
|
|
|
rh, |
|
|
|
rl, |
|
|
|
rh2, |
|
|
|
rl2 |
|
) |
| |
Value:do { \
nh_vmac_nhbytes(
mp, kp, nw, rh, rl); \
nh_vmac_nhbytes(
mp, ((kp)+2), nw, rh2, rl2); \
} while (0)
Definition at line 314 of file vmac.c.
#define pe64_to_cpup le64_to_cpup /* Prefer little endian */ |
#define PMUL64 |
( |
|
rh, |
|
|
|
rl, |
|
|
|
i1, |
|
|
|
i2 |
|
) |
| |
Value: \
u64 _i1 = (i1), _i2 = (i2);
\
rh =
MUL32(_i1>>32, _i2>>32); \
ADD128(rh, rl, (m >> 32), (m << 32)); \
} while (0)
Definition at line 77 of file vmac.c.
#define poly_step |
( |
|
ah, |
|
|
|
al, |
|
|
|
kh, |
|
|
|
kl, |
|
|
|
mh, |
|
|
|
ml |
|
) |
| poly_step_func(&(ah), &(al), &(kh), &(kl), &(mh), &(ml)) |
#define UINT64_C |
( |
|
x | ) |
x##ULL |
module_exit |
( |
vmac_module_exit |
| ) |
|
module_init |
( |
vmac_module_init |
| ) |
|