FFmpeg
|
#include <string.h>
#include "camellia.h"
#include "error.h"
#include "intreadwrite.h"
#include "mem.h"
#include "attributes.h"
Go to the source code of this file.
Data Structures | |
struct | AVCAMELLIA |
Macros | |
#define | LR32(x, c) ((x) << (c) | (x) >> (32 - (c))) |
#define | RR32(x, c) ((x) >> (c) | (x) << (32 - (c))) |
#define | MASK8 0xff |
#define | MASK32 0xffffffff |
#define | MASK64 0xffffffffffffffff |
#define | Sigma1 0xA09E667F3BCC908B |
#define | Sigma2 0xB67AE8584CAA73B2 |
#define | Sigma3 0xC6EF372FE94F82BE |
#define | Sigma4 0x54FF53A5F1D36F1C |
#define | Sigma5 0x10E527FADE682D1D |
#define | Sigma6 0xB05688C2B3E6C1FD |
Functions | |
static void | LR128 (uint64_t d[2], const uint64_t K[2], int x) |
static uint64_t | F (uint64_t F_IN, uint64_t KE) |
static uint64_t | FL (uint64_t FL_IN, uint64_t KE) |
static uint64_t | FLINV (uint64_t FLINV_IN, uint64_t KE) |
static void | generate_round_keys (AVCAMELLIA *cs, uint64_t Kl[2], uint64_t Kr[2], uint64_t Ka[2], uint64_t Kb[2]) |
static void | camellia_encrypt (AVCAMELLIA *cs, uint8_t *dst, const uint8_t *src) |
static void | camellia_decrypt (AVCAMELLIA *cs, uint8_t *dst, const uint8_t *src, uint8_t *iv) |
static void | computeSP (void) |
struct AVCAMELLIA * | av_camellia_alloc (void) |
Allocate an AVCAMELLIA context To free the struct: av_free(ptr) More... | |
av_cold int | av_camellia_init (AVCAMELLIA *cs, const uint8_t *key, int key_bits) |
Initialize an AVCAMELLIA context. More... | |
void | av_camellia_crypt (AVCAMELLIA *cs, 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... | |
Variables | |
static uint64_t | SP [8][256] |
static const uint8_t | SBOX1 [256] |
static const uint8_t | SBOX2 [256] |
static const uint8_t | SBOX3 [256] |
static const uint8_t | SBOX4 [256] |
const int | av_camellia_size = sizeof(AVCAMELLIA) |
static const uint8_t | shifts [2][12] |
static const uint8_t | vars [2][12] |
Definition at line 30 of file camellia.c.
Definition at line 31 of file camellia.c.
#define MASK8 0xff |
Definition at line 33 of file camellia.c.
#define MASK32 0xffffffff |
Definition at line 34 of file camellia.c.
#define MASK64 0xffffffffffffffff |
Definition at line 35 of file camellia.c.
#define Sigma1 0xA09E667F3BCC908B |
Definition at line 37 of file camellia.c.
#define Sigma2 0xB67AE8584CAA73B2 |
Definition at line 38 of file camellia.c.
#define Sigma3 0xC6EF372FE94F82BE |
Definition at line 39 of file camellia.c.
#define Sigma4 0x54FF53A5F1D36F1C |
Definition at line 40 of file camellia.c.
#define Sigma5 0x10E527FADE682D1D |
Definition at line 41 of file camellia.c.
#define Sigma6 0xB05688C2B3E6C1FD |
Definition at line 42 of file camellia.c.
|
static |
Definition at line 131 of file camellia.c.
Referenced by generate_round_keys().
|
static |
Definition at line 147 of file camellia.c.
Referenced by av_camellia_init(), camellia_decrypt(), and camellia_encrypt().
|
static |
Definition at line 154 of file camellia.c.
Referenced by camellia_decrypt(), and camellia_encrypt().
|
static |
Definition at line 166 of file camellia.c.
Referenced by camellia_decrypt(), and camellia_encrypt().
|
static |
Definition at line 188 of file camellia.c.
Referenced by av_camellia_init().
|
static |
Definition at line 236 of file camellia.c.
Referenced by av_camellia_crypt().
|
static |
Definition at line 281 of file camellia.c.
Referenced by av_camellia_crypt().
|
static |
Definition at line 331 of file camellia.c.
Referenced by av_camellia_init().
|
static |
Definition at line 44 of file camellia.c.
Referenced by computeSP(), F(), and get_tlm().
|
static |
Definition at line 53 of file camellia.c.
Referenced by computeSP().
|
static |
Definition at line 72 of file camellia.c.
Referenced by computeSP().
|
static |
Definition at line 91 of file camellia.c.
Referenced by computeSP().
|
static |
Definition at line 110 of file camellia.c.
Referenced by computeSP().
|
static |
Definition at line 178 of file camellia.c.
Referenced by ff_vvc_amvr_shift(), generate_round_keys(), last_significant_coeff_xy_prefix(), rv34_decode_cbp(), and xcorr_coeff().
|
static |
Definition at line 183 of file camellia.c.
Referenced by addroi_config_input(), generate_kernel(), generate_round_keys(), init_axis_color(), init_cqt(), init_volume(), ssim360_end1(), ssim360_end1x(), ssim360_tape(), ssim_end1(), and ssim_end1x().