PandA-2024.02
|
#include "aes.h"
Go to the source code of this file.
Macros | |
#define | F(x) (((x)<<1) ^ ((((x)>>7) & 1) * 0x1b)) |
#define | FD(x) (((x) >> 1) ^ (((x) & 1) ? 0x8d : 0)) |
#define | BACK_TO_TABLES |
#define | rj_sbox(x) sbox[(x)] |
Functions | |
uint8_t | rj_xtime (uint8_t x) |
void | aes_subBytes (uint8_t *buf) |
void | aes_addRoundKey (uint8_t *buf, uint8_t *key) |
void | aes_addRoundKey_cpy (uint8_t *buf, uint8_t *key, uint8_t *cpk) |
void | aes_shiftRows (uint8_t *buf) |
void | aes_mixColumns (uint8_t *buf) |
void | aes_expandEncKey (uint8_t *k, uint8_t *rc) |
void | aes256_encrypt_ecb (aes256_context *ctx, uint8_t k[32], uint8_t buf[16]) |
Variables | |
const uint8_t | sbox [256] |
Definition at line 7 of file aes.c.
Referenced by __attribute__(), aes_expandEncKey(), and main().
Definition at line 8 of file aes.c.
Referenced by getFunctionType(), and HWCallInjection::InternalExec().
Definition at line 48 of file aes.c.
Referenced by aes_expandEncKey(), and aes_subBytes().
void aes256_encrypt_ecb | ( | aes256_context * | ctx, |
uint8_t | k[32], | ||
uint8_t | buf[16] | ||
) |
Definition at line 176 of file aes.c.
References aes_addRoundKey(), aes_addRoundKey_cpy(), aes_expandEncKey(), aes_mixColumns(), aes_shiftRows(), aes_subBytes(), aes256_context::deckey, aes256_context::enckey, and aes256_context::key.
Referenced by main(), and run_benchmark().
void aes_addRoundKey | ( | uint8_t * | buf, |
uint8_t * | key | ||
) |
Definition at line 110 of file aes.c.
Referenced by aes256_encrypt_ecb().
void aes_addRoundKey_cpy | ( | uint8_t * | buf, |
uint8_t * | key, | ||
uint8_t * | cpk | ||
) |
Definition at line 118 of file aes.c.
Referenced by aes256_encrypt_ecb().
void aes_expandEncKey | ( | uint8_t * | k, |
uint8_t * | rc | ||
) |
Definition at line 153 of file aes.c.
References 15_onnx_build::exp2, F, and rj_sbox.
Referenced by aes256_encrypt_ecb().
void aes_mixColumns | ( | uint8_t * | buf | ) |
Definition at line 139 of file aes.c.
References rj_xtime().
Referenced by aes256_encrypt_ecb().
void aes_shiftRows | ( | uint8_t * | buf | ) |
Definition at line 127 of file aes.c.
Referenced by aes256_encrypt_ecb().
void aes_subBytes | ( | uint8_t * | buf | ) |
Definition at line 102 of file aes.c.
References rj_sbox.
Referenced by aes256_encrypt_ecb().
uint8_t rj_xtime | ( | uint8_t | x | ) |
Definition at line 96 of file aes.c.
Referenced by aes_mixColumns().