FFmpeg
|
#include <string.h>
#include "config.h"
#include "aes.h"
#include "aes_internal.h"
#include "attributes.h"
#include "error.h"
#include "intreadwrite.h"
#include "macros.h"
#include "mem.h"
#include "thread.h"
Go to the source code of this file.
Macros | |
#define | ROT(x, s) (((x) << (s)) | ((x) >> (32-(s)))) |
Functions | |
struct AVAES * | av_aes_alloc (void) |
Allocate an AVAES context. More... | |
static void | addkey (av_aes_block *dst, const av_aes_block *src, const av_aes_block *round_key) |
static void | addkey_s (av_aes_block *dst, const uint8_t *src, const av_aes_block *round_key) |
static void | addkey_d (uint8_t *dst, const av_aes_block *src, const av_aes_block *round_key) |
static void | subshift (av_aes_block s0[2], int s, const uint8_t *box) |
static int | mix_core (uint32_t multbl[][256], int a, int b, int c, int d) |
static void | mix (av_aes_block state[2], uint32_t multbl[][256], int s1, int s3) |
static void | aes_crypt (AVAES *a, int s, const uint8_t *sbox, uint32_t multbl[][256]) |
static void | aes_encrypt (AVAES *a, uint8_t *dst, const uint8_t *src, int count, uint8_t *iv, int rounds) |
static void | aes_decrypt (AVAES *a, uint8_t *dst, const uint8_t *src, int count, uint8_t *iv, int rounds) |
void | av_aes_crypt (AVAES *a, uint8_t *dst, const uint8_t *src, int count, uint8_t *iv, int decrypt) |
Encrypt or decrypt a buffer using a previously initialized context. More... | |
static void | init_multbl2 (uint32_t tbl[][256], const int c[4], const uint8_t *log8, const uint8_t *alog8, const uint8_t *sbox) |
static av_cold void | aes_init_static (void) |
int | av_aes_init (AVAES *a, const uint8_t *key, int key_bits, int decrypt) |
Initialize an AVAES context. More... | |
Variables | |
const int | av_aes_size = sizeof(AVAES) |
static const uint8_t | rcon [10] |
static uint8_t | sbox [256] |
static uint8_t | inv_sbox [256] |
static uint32_t | enc_multbl [4][256] |
static uint32_t | dec_multbl [4][256] |
static AVOnce | aes_static_init = AV_ONCE_INIT |
|
inlinestatic |
Definition at line 62 of file aes.c.
Referenced by aes_crypt().
|
inlinestatic |
Definition at line 69 of file aes.c.
Referenced by aes_decrypt(), and aes_encrypt().
|
inlinestatic |
Definition at line 76 of file aes.c.
Referenced by aes_decrypt(), and aes_encrypt().
|
static |
Definition at line 83 of file aes.c.
Referenced by aes_crypt(), and av_aes_init().
|
inlinestatic |
|
inlinestatic |
Definition at line 117 of file aes.c.
Referenced by aes_crypt(), and av_aes_init().
|
inlinestatic |
Definition at line 126 of file aes.c.
Referenced by aes_decrypt(), and aes_encrypt().
|
static |
Definition at line 139 of file aes.c.
Referenced by av_aes_init().
|
static |
Definition at line 155 of file aes.c.
Referenced by av_aes_init().
|
static |
Definition at line 177 of file aes.c.
Referenced by aes_init_static().
|
static |
Definition at line 204 of file aes.c.
Referenced by av_aes_init().
|
static |
Definition at line 42 of file aes.c.
Referenced by av_aes_init().
|
static |
Definition at line 46 of file aes.c.
Referenced by aes_crypt(), aes_encrypt(), aes_init_static(), av_aes_init(), and init_multbl2().
|
static |
Definition at line 47 of file aes.c.
Referenced by aes_decrypt(), and aes_init_static().
|
static |
Definition at line 52 of file aes.c.
Referenced by aes_encrypt(), and aes_init_static().
|
static |
Definition at line 53 of file aes.c.
Referenced by aes_decrypt(), aes_init_static(), and av_aes_init().
|
static |
Definition at line 202 of file aes.c.
Referenced by av_aes_init().