Lightweight Cryptography Primitives
 All Data Structures Files Functions Variables Typedefs Macros Pages
Functions
internal-cham.h File Reference

CHAM block cipher. More...

Go to the source code of this file.

Functions

void cham128_128_encrypt (const unsigned char *key, unsigned char *output, const unsigned char *input)
 Encrypts a 128-bit block with CHAM-128-128. More...
 
void cham64_128_encrypt (const unsigned char *key, unsigned char *output, const unsigned char *input)
 Encrypts a 64-bit block with CHAM-64-128. More...
 

Detailed Description

CHAM block cipher.

Function Documentation

void cham128_128_encrypt ( const unsigned char *  key,
unsigned char *  output,
const unsigned char *  input 
)

Encrypts a 128-bit block with CHAM-128-128.

Parameters
keyPoints to the 16 bytes of the key.
outputOutput buffer which must be at least 16 bytes in length.
inputInput buffer which must be at least 16 bytes in length.

The input and output buffers can be the same buffer for in-place encryption.

void cham64_128_encrypt ( const unsigned char *  key,
unsigned char *  output,
const unsigned char *  input 
)

Encrypts a 64-bit block with CHAM-64-128.

Parameters
keyPoints to the 16 bytes of the key.
outputOutput buffer which must be at least 8 bytes in length.
inputInput buffer which must be at least 8 bytes in length.

The input and output buffers can be the same buffer for in-place encryption.