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

hmac.h File Reference

#include "common.h"

Go to the source code of this file.

Defines

#define MD5DIGEST_SIZE   16
#define SHA1DIGEST_SIZE   20
#define TIGERDIGEST_SIZE   24
#define DESMACDIGEST_SIZE   8

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_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).
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.


Define Documentation

#define DESMACDIGEST_SIZE   8
 

#define MD5DIGEST_SIZE   16
 

#define SHA1DIGEST_SIZE   20
 

#define TIGERDIGEST_SIZE   24
 


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