Main Page | Data Structures | File List | Data Fields | Globals | Related Pages

hmac.c File Reference

#include "common.h"
#include <assert.h>
#include <stdlib.h>
#include <openssl/md5.h>
#include <openssl/sha.h>
#include <openssl/evp.h>
#include <strings.h>
#include <string.h>
#include "hmac.h"
#include "tiger.h"

Functions

void i2_hmac_md5 (const unsigned char *text, int text_len, const unsigned char *key, int key_len, uint8_t *digest)
 hmac_md5 implementation
void i2_hmac_sha1 (const unsigned char *text, int text_len, const unsigned char *key, int key_len, uint8_t *digest)
 hmac_sha1 implementation
void i2_des_mac (const uint8_t *msg, uint32_t mlen, const uint8_t *key, uint8_t *digest)
 Implementation of MAC_DES integrity algorithm, description: FIPS81 appendix F.
void i2_hmac_tiger (const uint8_t *text, int text_len, const uint8_t *key, int key_len, uint8_t *digest)
 HMAC_TIGER implementation based on RFC2104 rules. Digest length is 192 bits (24 bytes).

Function Documentation

void i2_des_mac const uint8_t *  msg,
uint32_t  mlen,
const uint8_t *  key,
uint8_t *  digest
 

Implementation of MAC_DES integrity algorithm, description: FIPS81 appendix F.

Parameters:
msg message
mlen message length
key integrity key - must be 8 bytes
digest MAC DES message digest

void i2_hmac_md5 const unsigned char *  text,
int  text_len,
const unsigned char *  key,
int  key_len,
uint8_t *  digest
 

hmac_md5 implementation

Parameters:
text pointer to data stream
text_len length of data stream
key pointer to authentication key
key_len length of authentication key
digest caller digest to be filled in

void i2_hmac_sha1 const unsigned char *  text,
int  text_len,
const unsigned char *  key,
int  key_len,
uint8_t *  digest
 

hmac_sha1 implementation

Parameters:
text pointer to data stream
text_len length of data stream
key pointer to authentication key
key_len length of authentication key
digest caller digest to be filled in

void i2_hmac_tiger const uint8_t *  text,
int  text_len,
const uint8_t *  key,
int  key_len,
uint8_t *  digest
 

HMAC_TIGER implementation based on RFC2104 rules. Digest length is 192 bits (24 bytes).

Parameters:
text message text
text_len length of the message text
key HMAC key
key_len HMAC key length
digest result digest


Project hosted by: SourceForge.net Logo