diff options
author | Bart Polot <bart@net.in.tum.de> | 2015-04-27 19:15:14 +0000 |
---|---|---|
committer | Bart Polot <bart@net.in.tum.de> | 2015-04-27 19:15:14 +0000 |
commit | 647d16746685447837fc219214872e1e93e34313 (patch) | |
tree | c6f45df2db726dc3eec05577a4f2653a6bc190f5 /src/cadet/cadet_protocol.h | |
parent | 52a970cae9e0cb0d5a8aa1e9a62bfa8eff35bc68 (diff) | |
download | gnunet-647d16746685447837fc219214872e1e93e34313.tar.gz gnunet-647d16746685447837fc219214872e1e93e34313.zip |
- refactor axolotl encryption
Diffstat (limited to 'src/cadet/cadet_protocol.h')
-rw-r--r-- | src/cadet/cadet_protocol.h | 25 |
1 files changed, 18 insertions, 7 deletions
diff --git a/src/cadet/cadet_protocol.h b/src/cadet/cadet_protocol.h index ecc31a01d..bb23ce921 100644 --- a/src/cadet/cadet_protocol.h +++ b/src/cadet/cadet_protocol.h | |||
@@ -303,20 +303,31 @@ struct GNUNET_CADET_AX | |||
303 | uint32_t pid GNUNET_PACKED; | 303 | uint32_t pid GNUNET_PACKED; |
304 | 304 | ||
305 | /** | 305 | /** |
306 | * Number of hops to live. | 306 | * Reserved field for 64b alignment. |
307 | */ | 307 | */ |
308 | uint32_t ttl GNUNET_PACKED; | 308 | uint32_t reserved GNUNET_PACKED; |
309 | 309 | ||
310 | /** | 310 | /** |
311 | * Initialization Vector for payload encryption. | 311 | * MAC of the encrypted message, used to verify message integrity. |
312 | * Everything after this value will be encrypted with the header key | ||
313 | * and authenticated. | ||
312 | */ | 314 | */ |
313 | uint32_t iv GNUNET_PACKED; | 315 | struct GNUNET_CADET_Hash hmac; |
314 | 316 | ||
315 | /** | 317 | /** |
316 | * MAC of the encrypted message, used to verify message integrity. | 318 | * Number of messages sent with the current ratchet key. |
317 | * Everything after this value will be encrypted and authenticated. | ||
318 | */ | 319 | */ |
319 | struct GNUNET_CADET_Hash hmac; | 320 | uint32_t Ns; |
321 | |||
322 | /** | ||
323 | * Number of messages sent with the previous ratchet key. | ||
324 | */ | ||
325 | uint32_t PNs; | ||
326 | |||
327 | /** | ||
328 | * Current ratchet key. | ||
329 | */ | ||
330 | struct GNUNET_CRYPTO_EcdhePublicKey DHRs; | ||
320 | 331 | ||
321 | /** | 332 | /** |
322 | * Encrypted content follows. | 333 | * Encrypted content follows. |