xtea.h File Reference

Go to the source code of this file.

Typedefs

typedef uint32_t XTeaKeyBlock_t [4]

Functions

void XTeaCrypt (uint32_t *w, CONST uint32_t *v, CONST XTeaKeyBlock_t k)
 Encrypt a 64bit block with XTEA algorythm.
void XTeaDecrypt (uint32_t *w, CONST uint32_t *v, CONST XTeaKeyBlock_t k)
 Decrypt a 64bit block with XTEA algorythm.
void XTeaCryptStr (char *dst, CONST char *src, uint16_t len, CONST char *pass)
 Encrypt a string with XTEA algorythm.
void XTeaDecryptStr (char *dst, CONST char *src, uint16_t len, CONST char *pass)
 Decrypt a string with XTEA algorythm.

Typedef Documentation

Definition at line 55 of file xtea.h.


Function Documentation

void XTeaCrypt ( uint32_t w,
CONST uint32_t v,
CONST XTeaKeyBlock_t  k 
)

Encrypt a 64bit block with XTEA algorythm.

w Destination pointer to 2x32 bit encrypted block. v Source pointer of 2x32 bit plain text block. k Pointer to 128 bit (4*32bit) key block.

Definition at line 67 of file xtea.c.

References ROUNDS, and XTDELTA.

Referenced by XTeaCryptStr().

void XTeaDecrypt ( uint32_t w,
CONST uint32_t v,
CONST XTeaKeyBlock_t  k 
)

Decrypt a 64bit block with XTEA algorythm.

w Destination pointer to 2x32 bit decrypted block. v Source pointer of 2x32 bit encrypted block. k Pointer to 128 bit (4*32bit) key block.

Definition at line 91 of file xtea.c.

References XTDELTA, and XTSUM.

Referenced by XTeaDecryptStr().

void XTeaCryptStr ( char *  dst,
CONST char *  src,
uint16_t  len,
CONST char *  pass 
)

Encrypt a string with XTEA algorythm.

Respect that the strings or buffers of src and dst strings have to have a length of multiple of 8 as it is a 64 bit based algorhythm.

dst Target buffer to place the encrypted string into. src Source buffer to get the clear text string from. len Length of the string to encrypt. pass Buffer of 64 bytes used as passphrase.

Definition at line 120 of file xtea.c.

References CONST, memcpy(), strlen(), and XTeaCrypt().

void XTeaDecryptStr ( char *  dst,
CONST char *  src,
uint16_t  len,
CONST char *  pass 
)

Decrypt a string with XTEA algorythm.

Respect that the strings or buffers of src and dst strings have to have a length of multiple of 8 as it is a 64 bit based algorhythm.

dst Target buffer to place the decrypted string into. src Source buffer to get the encrypted string from. len Length of the string to decrypt. pass Buffer of 64 bytes used as passphrase.

Definition at line 152 of file xtea.c.

References CONST, memcpy(), strlen(), and XTeaDecrypt().


© 2000-2010 by contributors - visit http://www.ethernut.de/