tea.h File Reference

TEA Tiny Encription Algorith functions (interface). More...

#include <cfg/compiler.h>

Go to the source code of this file.


Defines

#define TEA_KEY_LEN   16
 TEA key size.
#define TEA_BLOCK_LEN   8
 TEA block length.
#define DELTA   0x9E3779B9
 Magic value. (Golden number * 2^31).
#define ROUNDS   32
 Number of rounds.

Functions

void tea_enc (void *_v, void *_k)
 TEA encryption function.
void tea_dec (void *_v, void *_k)
 TEA decryption function.

Detailed Description

TEA Tiny Encription Algorith functions (interface).

Version:
Id
tea.h 1202 2008-03-20 14:40:42Z asterix
Author:
Francesco Sacchi <batt@develer.com>
Documentation for TEA is available at http://www.cl.cam.ac.uk/ftp/users/djw3/tea.ps.

Definition in file tea.h.


Function Documentation

void tea_dec ( void *  _v,
void *  _k 
)

TEA decryption function.

This function decrypts v with k and returns the decrypted data in v.

Parameters:
_v Array of two long values containing the data block.
_k Array of four long values containing the key.

Definition at line 124 of file tea.c.

void tea_enc ( void *  _v,
void *  _k 
)

TEA encryption function.

This function encrypts v with k and returns the encrypted data in v.

Parameters:
_v Array of two long values containing the data block.
_k Array of four long values containing the key.

Definition at line 95 of file tea.c.