wickr-crypto-c
|
Data Structures | |
struct | wickr_key_exchange_set |
A collection of key exchanges for a set of recipients. The data protected inside 'exchange_ciphertext' for each recipient is derived by each recipient node using their individualized key exchange. See Wickr white paper 'Prepare Packet Header' section for more information. More... | |
wickr_key_exchange_set_t* wickr_key_exchange_set_copy | ( | const wickr_key_exchange_set_t * | source | ) |
Copy a key exchange set
source | the key exchange set to copy |
wickr_key_exchange_set_t* wickr_key_exchange_set_create | ( | wickr_ec_key_t * | sender_pub, |
wickr_exchange_array_t * | exchanges | ||
) |
Create a key exchange set from components
sender_pub | see 'wickr_key_exchange_set' property documentation property documentation |
exchanges | see 'wickr_key_exchange_set' property documentation property documentation |
wickr_key_exchange_set_t* wickr_key_exchange_set_create_from_buffer | ( | const wickr_crypto_engine_t * | engine, |
const wickr_buffer_t * | buffer | ||
) |
Create a key exchange set from bytes
engine | a crypto engine to use for importing key information within the exchange set |
buffer | the buffer containing a serialized representation of a 'wickr_key_exchange_set' |
wickr_key_exchange_set_t* wickr_key_exchange_set_create_from_cipher | ( | const wickr_crypto_engine_t * | engine, |
const wickr_cipher_result_t * | cipher_result, | ||
const wickr_cipher_key_t * | header_key | ||
) |
Decrypt-Then-Deserialize a packet key exchange set
NOTE: This is a low level function that should not be called directly from this API if it can be avoided. Please use the 'wickr_ctx' API instead since it is a higher level and safer set of functions
engine | a crypto engine capable of decryption using header_key |
cipher_result | an encrypted key exchange set |
header_key | the key to use for decryption |
void wickr_key_exchange_set_destroy | ( | wickr_key_exchange_set_t ** | exchange_set | ) |
Destroy a key exchange set
exchange_set | a pointer to the key exchange set to destroy. All properties of '*exchange_set' will also be destroyed |
wickr_cipher_result_t* wickr_key_exchange_set_encrypt | ( | const wickr_key_exchange_set_t * | exchange_set, |
const wickr_crypto_engine_t * | engine, | ||
const wickr_cipher_key_t * | header_key | ||
) |
Serialize-Then-Encrypt a packet key exchange set
The packet key exchange set is serialized using protocol buffers (message.pb-c.h)
NOTE: This is a low level function that should not be called directly from this API if it can be avoided. Please use the 'wickr_ctx' API instead since it is a higher level and safer set of functions
exchange_set | the key_exchange_set to encrypt |
engine | a crypto engine capable of encryption using header_key |
header_key | the key to encrypt the key exchange set with |
wickr_key_exchange_t* wickr_key_exchange_set_find | ( | const wickr_key_exchange_set_t * | exchange_set, |
const wickr_buffer_t * | identifier | ||
) |
Find a particular exchange in the exchange set
exchange_set | the exchange set to search |
identifier | the identifier of the exchange to find |
wickr_buffer_t* wickr_key_exchange_set_serialize | ( | const wickr_key_exchange_set_t * | exchange_set | ) |
Serialize a key exchange set using protocol buffers
exchange_set | the exchange set to serialize into bytes |