|
wickr-crypto-c
|
Data Structures | |
| struct | wickr_root_keys |
| Root level crypto keys for signatures, local encryption, and remote encryption. More... | |
Functions | |
| wickr_root_keys_t * | wickr_root_keys_create (wickr_ec_key_t *node_signature_root, wickr_cipher_key_t *node_storage_root, wickr_cipher_key_t *remote_storage_root) |
| wickr_root_keys_t * | wickr_root_keys_generate (const wickr_crypto_engine_t *engine) |
| wickr_root_keys_t * | wickr_root_keys_create_from_buffer (const wickr_crypto_engine_t *engine, const wickr_buffer_t *buffer) |
| wickr_buffer_t * | wickr_root_keys_serialize (const wickr_root_keys_t *keys) |
| wickr_cipher_result_t * | wickr_root_keys_export (const wickr_root_keys_t *keys, const wickr_crypto_engine_t *engine, const wickr_cipher_key_t *export_key) |
| wickr_storage_keys_t * | wickr_root_keys_localize (const wickr_root_keys_t *keys, const wickr_crypto_engine_t *engine, const wickr_dev_info_t *dev_info) |
| wickr_root_keys_t * | wickr_root_keys_copy (const wickr_root_keys_t *source) |
| void | wickr_root_keys_destroy (wickr_root_keys_t **keys) |
| wickr_root_keys_t* wickr_root_keys_copy | ( | const wickr_root_keys_t * | source | ) |
Copy a root key set
| source | the root key set to copy |
| wickr_root_keys_t* wickr_root_keys_create | ( | wickr_ec_key_t * | node_signature_root, |
| wickr_cipher_key_t * | node_storage_root, | ||
| wickr_cipher_key_t * | remote_storage_root | ||
| ) |
Create a root key set from components
| node_signature_root | see 'wickr_root_keys' property documentation |
| node_storage_root | see 'wickr_root_keys' property documentation |
| remote_storage_root | see 'wickr_root_keys' property documentation |
| wickr_root_keys_t* wickr_root_keys_create_from_buffer | ( | const wickr_crypto_engine_t * | engine, |
| const wickr_buffer_t * | buffer | ||
| ) |
Create a root key set from the serialized output of 'wickr_root_keys_serialize'
| engine | a crypto engine to validate the decoded EC keys |
| buffer | a buffer containing serialized root keys |
| void wickr_root_keys_destroy | ( | wickr_root_keys_t ** | keys | ) |
Destroy a root key set
| keys | a pointer to a root key set to destroy. Will destroy the sub properties of '*keys' as well |
| wickr_cipher_result_t* wickr_root_keys_export | ( | const wickr_root_keys_t * | keys, |
| const wickr_crypto_engine_t * | engine, | ||
| const wickr_cipher_key_t * | export_key | ||
| ) |
Serialize and encrypt root keys
| keys | the keys to serialize and encrypt |
| engine | a crypto engine capable of encrypting data using 'export_key' |
| export_key | the key to use for encryption of the serialized keys |
| wickr_root_keys_t* wickr_root_keys_generate | ( | const wickr_crypto_engine_t * | engine | ) |
Generate a random set of root keys
| engine | a crypto engine supporting random EC and cipher key generation |
| wickr_storage_keys_t* wickr_root_keys_localize | ( | const wickr_root_keys_t * | keys, |
| const wickr_crypto_engine_t * | engine, | ||
| const wickr_dev_info_t * | dev_info | ||
| ) |
Convert a root key set into a storage key set for a local device
Currently the local storage key is created by taking SHA256(keys->node_storage_root || dev_info->system_salt)
| keys | the keys to convert |
| engine | a crypto engine to use for conversion |
| dev_info | the device to localize the keys to |
| wickr_buffer_t* wickr_root_keys_serialize | ( | const wickr_root_keys_t * | keys | ) |
Serialize root keys into a buffer
| keys | the keys to serialize |