|
wickr-crypto-c
|
Data Structures | |
| struct | wickr_ephemeral_keypair |
| Represents a key pair used for message key exchanges within the Wickr Messaging Protocol. More... | |
Functions | |
| wickr_ephemeral_keypair_t * | wickr_ephemeral_keypair_create (uint64_t identifier, wickr_ec_key_t *ec_key, wickr_ecdsa_result_t *signature) |
| wickr_ephemeral_keypair_t * | wickr_ephemeral_keypair_copy (const wickr_ephemeral_keypair_t *source) |
| wickr_ephemeral_keypair_t * | wickr_ephemeral_keypair_generate_identity (const wickr_crypto_engine_t *engine, uint64_t identifier, const wickr_identity_t *identity) |
| bool | wickr_ephemeral_keypair_verify_owner (const wickr_ephemeral_keypair_t *keypair, const wickr_crypto_engine_t *engine, const wickr_identity_t *owner) |
| void | wickr_ephemeral_keypair_make_public (const wickr_ephemeral_keypair_t *keypair) |
| wickr_buffer_t * | wickr_ephemeral_keypair_serialize (const wickr_ephemeral_keypair_t *keypair) |
| wickr_ephemeral_keypair_t * | wickr_ephemeral_keypair_create_from_buffer (const wickr_buffer_t *buffer, const wickr_crypto_engine_t *engine) |
| void | wickr_ephemeral_keypair_destroy (wickr_ephemeral_keypair_t **keypair) |
| wickr_ephemeral_keypair_t* wickr_ephemeral_keypair_copy | ( | const wickr_ephemeral_keypair_t * | source | ) |
Copy an ephemeral keypair
| source | the ephemeral key pair to copy |
| wickr_ephemeral_keypair_t* wickr_ephemeral_keypair_create | ( | uint64_t | identifier, |
| wickr_ec_key_t * | ec_key, | ||
| wickr_ecdsa_result_t * | signature | ||
| ) |
Create an Ephemeral Keypair from components
| identifier | the numerical identifier of the keypair |
| ec_key | an Elliptic Curve public keypair |
| signature | a signature of the public key material in 'ec_key' by the owner of this key |
| wickr_ephemeral_keypair_t* wickr_ephemeral_keypair_create_from_buffer | ( | const wickr_buffer_t * | buffer, |
| const wickr_crypto_engine_t * | engine | ||
| ) |
Create an ephemeral keypair from a buffer that was created with 'wickr_ephemeral_keypair_serialize'
| buffer | the buffer that contains a serialized representation of an identity chain |
| engine | the crypto engine to use to import the key components of the ephemeral keypair |
| void wickr_ephemeral_keypair_destroy | ( | wickr_ephemeral_keypair_t ** | keypair | ) |
Destroy an ephemeral keypair
| keypair | a pointer to the key pair to destroy. All properties of '*keypair' will also be destroyed |
| wickr_ephemeral_keypair_t* wickr_ephemeral_keypair_generate_identity | ( | const wickr_crypto_engine_t * | engine, |
| uint64_t | identifier, | ||
| const wickr_identity_t * | identity | ||
| ) |
Generate a new ephemeral key pair given an owner identity.
This method will use the 'default_curve' property of the crypto engine provided as the curve for the resulting keypair
| engine | crypto engine supporting random Elliptic Curve generation, and ECDSA signatures |
| identifier | the identifier to assign to the generated output keypair |
| identity | the identity to sign the generated output key pair with |
| void wickr_ephemeral_keypair_make_public | ( | const wickr_ephemeral_keypair_t * | keypair | ) |
Destroy the private components of the keypair
| keypair | the key pair to make public |
| wickr_buffer_t* wickr_ephemeral_keypair_serialize | ( | const wickr_ephemeral_keypair_t * | keypair | ) |
Serialize an ephemeral keypair to bytes
| keypair | the ephemeral keypair to serialize |
| bool wickr_ephemeral_keypair_verify_owner | ( | const wickr_ephemeral_keypair_t * | keypair, |
| const wickr_crypto_engine_t * | engine, | ||
| const wickr_identity_t * | owner | ||
| ) |
Verify the owner of an ephemeral key pair is a particular identity
| keypair | the key pair to verify the owner of |
| engine | a crypto engine that supports verifying signatures generated with the curve associated with the 'sig_key' property of owner |
| owner | the proposed owner of this keypair |