From d00ca8d9b73b5c74b7659a2d254012c7e526280a Mon Sep 17 00:00:00 2001 From: Bart Polot Date: Mon, 27 Apr 2015 19:14:00 +0000 Subject: - added basic axolotl support --- src/cadet/cadet_protocol.h | 42 ++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 42 insertions(+) (limited to 'src/cadet/cadet_protocol.h') diff --git a/src/cadet/cadet_protocol.h b/src/cadet/cadet_protocol.h index dacf3d884..dc91af304 100644 --- a/src/cadet/cadet_protocol.h +++ b/src/cadet/cadet_protocol.h @@ -237,6 +237,48 @@ struct GNUNET_CADET_Encrypted }; +/** + * Axolotl tunnel message. + */ +struct GNUNET_CADET_AX +{ + /** + * Type: GNUNET_MESSAGE_TYPE_CADET_AXOLOTL_DATA + */ + struct GNUNET_MessageHeader header; + + /** + * ID of the connection. + */ + struct GNUNET_CADET_Hash cid; + + /** + * ID of the packet (hop by hop). + */ + uint32_t pid GNUNET_PACKED; + + /** + * Number of hops to live. + */ + uint32_t ttl GNUNET_PACKED; + + /** + * Initialization Vector for payload encryption. + */ + uint32_t iv GNUNET_PACKED; + + /** + * MAC of the encrypted message, used to verify message integrity. + * Everything after this value will be encrypted and authenticated. + */ + struct GNUNET_CADET_Hash hmac; + + /** + * Encrypted content follows. + */ +}; + + /** * Message to create a Channel. */ -- cgit v1.2.3