FFmpeg
Macros | Functions
xtea.c File Reference

XTEA 32-bit implementation. More...

#include "avutil.h"
#include "common.h"
#include "intreadwrite.h"
#include "mem.h"
#include "xtea.h"

Macros

#define DSTEP(SUM, K0, K1)
 
#define ESTEP(SUM, K0, K1)
 

Functions

AVXTEAav_xtea_alloc (void)
 Allocate an AVXTEA context.
 
void av_xtea_init (AVXTEA *ctx, const uint8_t key[16])
 Initialize an AVXTEA context. More...
 
void av_xtea_le_init (AVXTEA *ctx, const uint8_t key[16])
 Initialize an AVXTEA context. More...
 
void av_xtea_crypt (AVXTEA *ctx, uint8_t *dst, const uint8_t *src, int count, uint8_t *iv, int decrypt)
 Encrypt or decrypt a buffer using a previously initialized context, in big endian format. More...
 
void av_xtea_le_crypt (AVXTEA *ctx, uint8_t *dst, const uint8_t *src, int count, uint8_t *iv, int decrypt)
 Encrypt or decrypt a buffer using a previously initialized context, in little endian format. More...
 

Detailed Description

XTEA 32-bit implementation.

Author
Samuel Pitoiset

Macro Definition Documentation

§ DSTEP

#define DSTEP (   SUM,
  K0,
  K1 
)
Value:
v1 -= (((v0 << 4) ^ (v0 >> 5)) + v0) ^ (SUM + K0); \
v0 -= (((v1 << 4) ^ (v1 >> 5)) + v1) ^ (SUM - 0x9E3779B9U + K1)

§ ESTEP

#define ESTEP (   SUM,
  K0,
  K1 
)
Value:
v0 += (((v1 << 4) ^ (v1 >> 5)) + v1) ^ (SUM + K0);\
v1 += (((v0 << 4) ^ (v0 >> 5)) + v0) ^ (SUM + 0x9E3779B9U + K1)