27 #include "key_exchange.h" 42 #define OLDEST_PACKET_VERSION 2 48 #define CURRENT_PACKET_VERSION 4 55 ERROR_KEY_EXCHANGE_FAILED,
60 PACKET_SIGNATURE_UNKNOWN,
61 PACKET_SIGNATURE_VALID,
62 PACKET_SIGNATURE_INVALID
63 } wickr_packet_signature_status;
286 wickr_decode_error error);
409 const wickr_node_array_t *recipients,
434 wickr_header_keygen_func header_keygen_func,
wickr_key_exchange_set_t * key_exchange_set
Definition: protocol.h:269
wickr_packet_t * wickr_packet_create(uint8_t version, wickr_buffer_t *content, wickr_ecdsa_result_t *signature)
a packet decoding result
Definition: protocol.h:334
wickr_parse_result_t * wickr_parse_result_create_success(wickr_key_exchange_set_t *key_exchange_set, wickr_key_exchange_t *key_exchange, wickr_cipher_result_t *enc_payload)
wickr_decode_error err
Definition: protocol.h:335
Representation of public and private Elliptic Curve Keypair information as buffers.
Definition: eckey.h:90
wickr_key_exchange_t * wickr_key_exchange_create_with_packet_key(const wickr_crypto_engine_t *engine, const wickr_identity_chain_t *sender, const wickr_node_t *receiver, wickr_ec_key_t *packet_exchange_key, const wickr_cipher_key_t *packet_key, const wickr_buffer_t *psk, uint8_t version)
Public key exchange protected data. After a shared secret is generated using a public key with identi...
Definition: key_exchange.h:53
wickr_cipher_result_t * enc_payload
Definition: protocol.h:271
void wickr_decode_result_destroy(wickr_decode_result_t **result)
wickr_packet_signature_status signature_status
Definition: protocol.h:268
wickr_parse_result_t * wickr_parse_result_copy(const wickr_parse_result_t *source)
wickr_decode_error err
Definition: protocol.h:267
result from parsing an inbound packet
Definition: protocol.h:266
wickr_packet_t * wickr_packet_create_from_buffer(const wickr_buffer_t *buffer)
Represents an array of bytes and the length of the allocation associated with those bytes.
Definition: buffer.h:51
wickr_decode_result_t * wickr_decode_result_copy(const wickr_decode_result_t *result)
wickr_packet_t * wickr_packet_create_from_components(const wickr_crypto_engine_t *engine, const wickr_cipher_key_t *header_key, const wickr_cipher_key_t *payload_key, wickr_ec_key_t *exchange_key, const wickr_payload_t *payload, const wickr_node_array_t *recipients, const wickr_identity_chain_t *sender_signing_identity, uint8_t version)
wickr_cipher_key_t * payload_key
Definition: protocol.h:336
Represents a cipher that can be used in the crypto_engine. This meta object holds parameters for the ...
Definition: cipher.h:56
Represents a message destination at a point in time.
Definition: node.h:85
Elliptic Curve Digital Signature Algorithm Result.
Definition: ecdsa.h:54
wickr_payload_t * decrypted_payload
Definition: protocol.h:337
wickr_packet_t * wickr_packet_copy(const wickr_packet_t *source)
A collection of key exchanges for a set of recipients. The data protected inside 'exchange_ciphertext...
Definition: key_exchange.h:169
void wickr_packet_destroy(wickr_packet_t **packet)
wickr_ecdsa_result_t * signature
Definition: protocol.h:191
wickr_key_exchange_t * wickr_key_exchange_create_with_data(const wickr_crypto_engine_t *engine, const wickr_identity_chain_t *sender, const wickr_node_t *receiver, wickr_ec_key_t *packet_exchange_key, const wickr_buffer_t *data_to_wrap, wickr_cipher_t exchange_cipher, const wickr_buffer_t *psk, uint8_t version)
uint8_t version
Definition: protocol.h:189
wickr_key_exchange_t * key_exchange
Definition: protocol.h:270
An encrypted packet made with the Wickr protocol.
Definition: protocol.h:188
void wickr_parse_result_destroy(wickr_parse_result_t **result)
wickr_buffer_t * wickr_packet_serialize(const wickr_packet_t *packet)
wickr_decode_result_t * wickr_decode_result_from_parse_result(const wickr_packet_t *packet, const wickr_crypto_engine_t *engine, const wickr_parse_result_t *parse_result, wickr_buffer_t *receiver_dev_id, wickr_ec_key_t *receiver_decode_key, wickr_identity_chain_t *receiver_signing_identity, const wickr_identity_chain_t *sender_signing_identity)
wickr_decode_result_t * wickr_decode_result_create_failure(wickr_decode_error decode_error)
The encrypted body content of a Wickr packet.
Definition: payload.h:46
wickr_decode_result_t * wickr_decode_result_create_success(wickr_payload_t *decrypted_payload, wickr_cipher_key_t *payload_key)
wickr_parse_result_t * wickr_parse_result_from_packet(const wickr_crypto_engine_t *engine, const wickr_packet_t *packet, const wickr_buffer_t *receiver_node_id, wickr_header_keygen_func header_keygen_func, const wickr_identity_chain_t *sender_signing_identity)
wickr_buffer_t * content
Definition: protocol.h:190
wickr_parse_result_t * wickr_parse_result_create_failure(wickr_packet_signature_status signature_status, wickr_decode_error error)
Represents a root -> node relationship as well as it's signature status.
Definition: identity.h:110
Interface to a set of cryptographic operations used throughout the library. Currently the default imp...
Definition: crypto_engine.h:53