#include <linux/module.h>
#include <linux/init.h>
#include <linux/types.h>
#include <linux/errno.h>
#include "rtl_crypto.h"
#include <asm/byteorder.h>
Go to the source code of this file.
|
#define | AES_MIN_KEY_SIZE 16 |
|
#define | AES_MAX_KEY_SIZE 32 |
|
#define | AES_BLOCK_SIZE 16 |
|
#define | rotl generic_rotl32 |
|
#define | rotr generic_rotr32 |
|
#define | u32_in(x) le32_to_cpu(*(const u32 *)(x)) |
|
#define | u32_out(to, from) (*(u32 *)(to) = cpu_to_le32(from)) |
|
#define | E_KEY ctx->E |
|
#define | D_KEY ctx->D |
|
#define | ff_mult(a, b) (a && b ? f_mult(a, b) : 0) |
|
#define | f_rn(bo, bi, n, k) |
|
#define | i_rn(bo, bi, n, k) |
|
#define | ls_box(x) |
|
#define | f_rl(bo, bi, n, k) |
|
#define | i_rl(bo, bi, n, k) |
|
#define | star_x(x) (((x) & 0x7f7f7f7f) << 1) ^ ((((x) & 0x80808080) >> 7) * 0x1b) |
|
#define | imix_col(y, x) |
|
#define | loop4(i) |
|
#define | loop6(i) |
|
#define | loop8(i) |
|
#define | f_nround(bo, bi, k) |
|
#define | f_lround(bo, bi, k) |
|
#define | i_nround(bo, bi, k) |
|
#define | i_lround(bo, bi, k) |
|
#define AES_BLOCK_SIZE 16 |
Definition at line 66 of file aes.c.
#define AES_MAX_KEY_SIZE 32 |
Definition at line 64 of file aes.c.
#define AES_MIN_KEY_SIZE 16 |
Definition at line 63 of file aes.c.
#define f_lround |
( |
|
bo, |
|
|
|
bi, |
|
|
|
k |
|
) |
| |
Value:
Definition at line 336 of file aes.c.
#define f_nround |
( |
|
bo, |
|
|
|
bi, |
|
|
|
k |
|
) |
| |
Value:
Definition at line 329 of file aes.c.
#define f_rl |
( |
|
bo, |
|
|
|
bi, |
|
|
|
n, |
|
|
|
k |
|
) |
| |
Value:
fl_tab[1][
byte(
bi[(
n + 1) & 3],1)] ^ \
fl_tab[2][
byte(
bi[(
n + 2) & 3],2)] ^ \
fl_tab[3][
byte(
bi[(
n + 3) & 3],3)] ^ *(
k +
n)
Definition at line 145 of file aes.c.
#define f_rn |
( |
|
bo, |
|
|
|
bi, |
|
|
|
n, |
|
|
|
k |
|
) |
| |
Value:
ft_tab[1][
byte(
bi[(
n + 1) & 3],1)] ^ \
ft_tab[2][
byte(
bi[(
n + 2) & 3],2)] ^ \
ft_tab[3][
byte(
bi[(
n + 3) & 3],3)] ^ *(
k +
n)
Definition at line 127 of file aes.c.
#define ff_mult |
( |
|
a, |
|
|
|
b |
|
) |
| (a && b ? f_mult(a, b) : 0) |
#define i_lround |
( |
|
bo, |
|
|
|
bi, |
|
|
|
k |
|
) |
| |
Value:
Definition at line 389 of file aes.c.
#define i_nround |
( |
|
bo, |
|
|
|
bi, |
|
|
|
k |
|
) |
| |
Value:
Definition at line 382 of file aes.c.
#define i_rl |
( |
|
bo, |
|
|
|
bi, |
|
|
|
n, |
|
|
|
k |
|
) |
| |
Value:
il_tab[1][
byte(
bi[(
n + 3) & 3],1)] ^ \
il_tab[2][
byte(
bi[(
n + 2) & 3],2)] ^ \
il_tab[3][
byte(
bi[(
n + 1) & 3],3)] ^ *(
k +
n)
Definition at line 151 of file aes.c.
#define i_rn |
( |
|
bo, |
|
|
|
bi, |
|
|
|
n, |
|
|
|
k |
|
) |
| |
Value:
it_tab[1][
byte(
bi[(
n + 3) & 3],1)] ^ \
it_tab[2][
byte(
bi[(
n + 2) & 3],2)] ^ \
it_tab[3][
byte(
bi[(
n + 1) & 3],3)] ^ *(
k +
n)
Definition at line 133 of file aes.c.
#define imix_col |
( |
|
y, |
|
|
|
x |
|
) |
| |
Value:
Definition at line 230 of file aes.c.
Value:
Definition at line 242 of file aes.c.
Value:
Definition at line 250 of file aes.c.
Value:
Definition at line 260 of file aes.c.
Value:( fl_tab[0][
byte(
x, 0)] ^ \
fl_tab[1][
byte(
x, 1)] ^ \
fl_tab[2][
byte(
x, 2)] ^ \
Definition at line 139 of file aes.c.
#define rotl generic_rotl32 |
Definition at line 82 of file aes.c.
#define rotr generic_rotr32 |
Definition at line 83 of file aes.c.
#define star_x |
( |
|
x | ) |
(((x) & 0x7f7f7f7f) << 1) ^ ((((x) & 0x80808080) >> 7) * 0x1b) |
Definition at line 94 of file aes.c.
Definition at line 95 of file aes.c.
MODULE_DESCRIPTION |
( |
"Rijndael (AES) Cipher Algorithm" |
| ) |
|
MODULE_LICENSE |
( |
"Dual BSD/GPL" |
| ) |
|