ccRTP 2.1.2
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Functions
macSkein.cpp File Reference
#include <crypto/macSkein.h>
#include <stdlib.h>
Include dependency graph for macSkein.cpp:

Go to the source code of this file.

Functions

void macSkein (uint8_t *key, int32_t key_length, const uint8_t *data, uint32_t data_length, uint8_t *mac, int32_t mac_length, SkeinSize_t skeinSize)
 Compute Skein MAC. More...
 
void macSkein (uint8_t *key, int32_t key_length, const uint8_t *data[], uint32_t data_length[], uint8_t *mac, int32_t mac_length, SkeinSize_t skeinSize)
 Compute Skein MAC over several data cunks. More...
 
void * createSkeinMacContext (uint8_t *key, int32_t key_length, int32_t mac_length, SkeinSize_t skeinSize)
 Create and initialize a Skein MAC context. More...
 
void macSkeinCtx (void *ctx, const uint8_t *data, uint32_t data_length, uint8_t *mac)
 Compute Skein MAC. More...
 
void macSkeinCtx (void *ctx, const uint8_t *data[], uint32_t data_length[], uint8_t *mac)
 Compute Skein MAC over several data cunks. More...
 
void freeSkeinMacContext (void *ctx)
 Free Skein MAC context. More...
 

Function Documentation

void* createSkeinMacContext ( uint8_t *  key,
int32_t  key_length,
int32_t  mac_length,
SkeinSize_t  skeinSize 
)

Create and initialize a Skein MAC context.

An application uses this context to hash several data with on Skein MAC Context with the same key, key length and mac length

Parameters
keyThe MAC key.
key_lengthLenght of the MAC key in bytes
mac_lengthInteger that contains the length of the MAC in bits (not bytes).
skeinSizeThe Skein size to use.
Returns
Returns a pointer to the initialized context

Definition at line 51 of file macSkein.cpp.

void freeSkeinMacContext ( void *  ctx)

Free Skein MAC context.

Parameters
ctxa pointer to Skein MAC context

Definition at line 85 of file macSkein.cpp.

void macSkein ( uint8_t *  key,
int32_t  key_length,
const uint8_t *  data,
uint32_t  data_length,
uint8_t *  mac,
int32_t  mac_length,
SkeinSize_t  skeinSize 
)

Compute Skein MAC.

This functions takes one data chunk and computes its Skein MAC.

Parameters
keyThe MAC key.
key_lengthLneght of the MAC key in bytes
dataPoints to the data chunk.
data_lengthLength of the data in bytes
macPoints to a buffer that receives the computed digest.
mac_lengthInteger that contains the length of the MAC in bits (not bytes).
skeinSizeThe Skein size to use.

Definition at line 21 of file macSkein.cpp.

void macSkein ( uint8_t *  key,
int32_t  key_length,
const uint8_t *  data[],
uint32_t  data_length[],
uint8_t *  mac,
int32_t  mac_length,
SkeinSize_t  skeinSize 
)

Compute Skein MAC over several data cunks.

This functions takes several data chunk and computes the Skein MAC.

Parameters
keyThe MAC key.
key_lengthLneght of the MAC key in bytes
dataPoints to an array of pointers that point to the data chunks. A NULL pointer in an array element terminates the data chunks.
data_lengthPoints to an array of integers that hold the length of each data chunk.
macPoints to a buffer that receives the computed digest.
mac_lengthInteger that contains the length of the MAC in bits (not bytes).
skeinSizeThe Skein size to use.

Definition at line 34 of file macSkein.cpp.

void macSkeinCtx ( void *  ctx,
const uint8_t *  data,
uint32_t  data_length,
uint8_t *  mac 
)

Compute Skein MAC.

This functions takes one data chunk and computes its Skein MAC.

Parameters
ctxPointer to initialized Skein MAC context
dataPoints to the data chunk.
data_lengthLength of the data in bytes
macPoints to a buffer that receives the computed digest.

Definition at line 61 of file macSkein.cpp.

void macSkeinCtx ( void *  ctx,
const uint8_t *  data[],
uint32_t  data_length[],
uint8_t *  mac 
)

Compute Skein MAC over several data cunks.

This functions takes several data chunk and computes the SHA1 HAMAC.

Parameters
ctxPointer to initialized Skein MAC context
dataPoints to an array of pointers that point to the data chunks. A NULL pointer in an array element terminates the data chunks.
data_lengthPoints to an array of integers that hold the length of each data chunk.
macPoints to a buffer that receives the computed digest.

Definition at line 71 of file macSkein.cpp.