All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Data Structures | Macros | Functions
sha1.h File Reference

Local implementation of the SHA1 hashing scheme. More...

+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  fr_sha1_ctx
 

Macros

#define SHA1_DIGEST_LENGTH   20
 

Functions

void fips186_2prf (uint8_t mk[20], uint8_t finalkey[160])
 
void fr_hmac_sha1 (uint8_t digest[SHA1_DIGEST_LENGTH], uint8_t const *text, size_t text_len, uint8_t const *key, size_t key_len)
 Calculate HMAC using SHA1. More...
 
void fr_sha1_final (uint8_t digest[20], fr_sha1_ctx *context)
 
void fr_sha1_final_no_len (uint8_t digest[20], fr_sha1_ctx *context)
 
void fr_sha1_init (fr_sha1_ctx *context)
 
void fr_sha1_transform (uint32_t state[5], uint8_t const buffer[64])
 
void fr_sha1_update (fr_sha1_ctx *context, uint8_t const *data, size_t len)
 

Detailed Description

Local implementation of the SHA1 hashing scheme.

Id:
65ec96a0508624313fc62b9bfef65611fb97c34e

Definition in file sha1.h.


Data Structure Documentation

struct fr_sha1_ctx

Definition at line 22 of file sha1.h.

Data Fields
uint8_t buffer[64]
uint32_t count[2]
uint32_t state[5]

Macro Definition Documentation

#define SHA1_DIGEST_LENGTH   20

Definition at line 18 of file sha1.h.

Function Documentation

void fips186_2prf ( uint8_t  mk[20],
uint8_t  finalkey[160] 
)

Definition at line 100 of file fips186prf.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void fr_hmac_sha1 ( uint8_t  digest[SHA1_DIGEST_LENGTH],
uint8_t const *  text,
size_t  text_len,
uint8_t const *  key,
size_t  key_len 
)

Calculate HMAC using SHA1.

Parameters
digestCaller digest to be filled in.
textPointer to data stream.
text_lenlength of data stream.
keyPointer to authentication key.
key_lenLength of authentication key.

Definition at line 28 of file hmacsha1.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void fr_sha1_final ( uint8_t  digest[20],
fr_sha1_ctx context 
)

Definition at line 132 of file sha1.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void fr_sha1_final_no_len ( uint8_t  digest[20],
fr_sha1_ctx context 
)

Definition at line 165 of file sha1.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void fr_sha1_init ( fr_sha1_ctx context)

Definition at line 94 of file sha1.c.

+ Here is the caller graph for this function:

void fr_sha1_transform ( uint32_t  state[5],
uint8_t const  buffer[64] 
)

Definition at line 36 of file sha1.c.

+ Here is the caller graph for this function:

void fr_sha1_update ( fr_sha1_ctx context,
uint8_t const *  data,
size_t  len 
)

Definition at line 106 of file sha1.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function: