Nut/OS  4.10.3
API Reference
xtea.h File Reference
This graph shows which files directly or indirectly include this file:

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 54 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 69 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 93 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 122 of file xtea.c.

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

Here is the call graph for this function:

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 154 of file xtea.c.

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

Here is the call graph for this function: