From 2fc83aa9aca1ce84b3c425a670cdf6a3a8886b34 Mon Sep 17 00:00:00 2001 From: Richard van der Hoff Date: Mon, 5 Sep 2016 19:49:36 +0100 Subject: Sign megolm messages Add ed25519 keys to the inbound and outbound sessions, and use them to sign and verify megolm messages. We just stuff the ed25519 public key in alongside the megolm session key (and add a version byte), to save adding more boilerplate to the JS/python/etc layers. --- include/olm/message.h | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'include/olm/message.h') diff --git a/include/olm/message.h b/include/olm/message.h index 5eb504d..61012c9 100644 --- a/include/olm/message.h +++ b/include/olm/message.h @@ -37,7 +37,8 @@ extern "C" { size_t _olm_encode_group_message_length( uint32_t chain_index, size_t ciphertext_length, - size_t mac_length + size_t mac_length, + size_t signature_length ); /** @@ -49,7 +50,8 @@ size_t _olm_encode_group_message_length( * output: where to write the output. Should be at least * olm_encode_group_message_length() bytes long. * ciphertext_ptr: returns the address that the ciphertext - * should be written to, followed by the MAC. + * should be written to, followed by the MAC and the + * signature. * * Returns the size of the message, up to the MAC. */ @@ -76,7 +78,7 @@ struct _OlmDecodeGroupMessageResults { */ void _olm_decode_group_message( const uint8_t *input, size_t input_length, - size_t mac_length, + size_t mac_length, size_t signature_length, /* output structure: updated with results */ struct _OlmDecodeGroupMessageResults *results -- cgit v1.2.3