wickr-crypto-c
Data Structures | Functions
Wickr_stream_iv

Data Structures

struct  wickr_stream_iv
 A deterministic random IV generator using a 64 byte secure random seed and HMAC-SHA512. More...
 

Functions

wickr_stream_iv_twickr_stream_iv_create (const wickr_crypto_engine_t engine, wickr_cipher_t cipher)
 
wickr_stream_iv_twickr_stream_iv_copy (const wickr_stream_iv_t *iv)
 
void wickr_stream_iv_destroy (wickr_stream_iv_t **iv)
 
wickr_buffer_twickr_stream_iv_generate (wickr_stream_iv_t *iv)
 

Detailed Description

Function Documentation

◆ wickr_stream_iv_copy()

wickr_stream_iv_t* wickr_stream_iv_copy ( const wickr_stream_iv_t iv)

Copy a stream iv generator

Parameters
ivthe stream iv generator to copy
Returns
a newly allocated stream iv generator set holding a deep copy of the properties of 'source'

◆ wickr_stream_iv_create()

wickr_stream_iv_t* wickr_stream_iv_create ( const wickr_crypto_engine_t  engine,
wickr_cipher_t  cipher 
)

Create a stream iv generator using an engine and cipher

Parameters
enginesee 'wickr_stream_iv' property documentation
ciphersee 'wickr_stream_iv' property documentation
Returns
a newly allocated stream iv generator

◆ wickr_stream_iv_destroy()

void wickr_stream_iv_destroy ( wickr_stream_iv_t **  iv)

Destroy a stream iv generator

Parameters
iva pointer to a stream iv generator to destroy. Will destroy the sub properties of '*iv' as well

◆ wickr_stream_iv_generate()

wickr_buffer_t* wickr_stream_iv_generate ( wickr_stream_iv_t iv)

Generate a new unique IV. gen_count will be increamented after calling this method, so subsequent calls will output unique values

Parameters
ivthe stream iv generator to use for IV generation
Returns
an IV of length 'cipher'->iv_len generated using HMAC(gen_count, seed)