This file contains the code for implementing encryption and decryption for AES (Rijndael) for block and key sizes of 16, 24 and 32 bytes. It can optionally be replaced by code written in assembler using NASM. For further details see the file aesopt.h. More...
#include "aesopt.h"
Go to the source code of this file.
Defines | |
#define | l_copy(y, x) |
#define | locals(y, x) x##0,x##1,x##2,x##3,y##0,y##1,y##2,y##3 |
#define | round(rm, y, x, k) rm(y,x,k,0); rm(y,x,k,1); rm(y,x,k,2); rm(y,x,k,3) |
#define | si(y, x, k, c) (s(y,c) = word_in(x, c) ^ (k)[c]) |
#define | so(y, x, c) word_out(y, c, s(x,c)) |
#define | state_in(y, x, k) si(y,x,k,0); si(y,x,k,1); si(y,x,k,2); si(y,x,k,3) |
#define | state_out(y, x) so(y,x,0); so(y,x,1); so(y,x,2); so(y,x,3) |
This file contains the code for implementing encryption and decryption for AES (Rijndael) for block and key sizes of 16, 24 and 32 bytes. It can optionally be replaced by code written in assembler using NASM. For further details see the file aesopt.h.
Definition in file aescrypt.c.
#define l_copy | ( | y, | |||
x | ) |
#define locals | ( | y, | |||
x | ) | x##0,x##1,x##2,x##3,y##0,y##1,y##2,y##3 |
Definition at line 58 of file aescrypt.c.
#define round | ( | rm, | |||
y, | |||||
x, | |||||
k | ) | rm(y,x,k,0); rm(y,x,k,1); rm(y,x,k,2); rm(y,x,k,3) |
Definition at line 65 of file aescrypt.c.
#define si | ( | y, | |||
x, | |||||
k, | |||||
c | ) | (s(y,c) = word_in(x, c) ^ (k)[c]) |
Definition at line 52 of file aescrypt.c.
#define so | ( | y, | |||
x, | |||||
c | ) | word_out(y, c, s(x,c)) |
Definition at line 53 of file aescrypt.c.
#define state_in | ( | y, | |||
x, | |||||
k | ) | si(y,x,k,0); si(y,x,k,1); si(y,x,k,2); si(y,x,k,3) |
Definition at line 63 of file aescrypt.c.
#define state_out | ( | y, | |||
x | ) | so(y,x,0); so(y,x,1); so(y,x,2); so(y,x,3) |
Definition at line 64 of file aescrypt.c.