From 6237ce3043a2b2d4d2486f940c537bc65d2b5ae9 Mon Sep 17 00:00:00 2001 From: Bart Polot Date: Mon, 27 Apr 2015 19:14:04 +0000 Subject: [PATCH] - data struct for axolotl internal state --- src/cadet/gnunet-service-cadet_tunnel.c | 37 +++++++++++++++++++++++++ 1 file changed, 37 insertions(+) diff --git a/src/cadet/gnunet-service-cadet_tunnel.c b/src/cadet/gnunet-service-cadet_tunnel.c index c91549ace..1e7e77ea3 100644 --- a/src/cadet/gnunet-service-cadet_tunnel.c +++ b/src/cadet/gnunet-service-cadet_tunnel.c @@ -135,6 +135,43 @@ struct CadetTunnelKXCtx struct GNUNET_SCHEDULER_Task * finish_task; }; + +struct CadetTunnelSkippedKey +{ + struct CadetTunnelSkippedKey *next; + struct CadetTunnelSkippedKey *prev; + + struct GNUNET_TIME_Absolute timestamp; + + struct GNUNET_CRYPTO_SymmetricSessionKey HK; + struct GNUNET_CRYPTO_SymmetricSessionKey MK; +}; + +struct CadetTunnelAxolotl +{ + struct CadetTunnelSkippedKey *head; + struct CadetTunnelSkippedKey *tail; + + uint skipped; + + struct GNUNET_CRYPTO_SymmetricSessionKey RK; + struct GNUNET_CRYPTO_SymmetricSessionKey HKs; + struct GNUNET_CRYPTO_SymmetricSessionKey HKr; + struct GNUNET_CRYPTO_SymmetricSessionKey NHKs; + struct GNUNET_CRYPTO_SymmetricSessionKey NHKr; + struct GNUNET_CRYPTO_SymmetricSessionKey CKs; + struct GNUNET_CRYPTO_SymmetricSessionKey CKr; + + struct GNUNET_CRYPTO_EcdhePublicKey DHRs; + struct GNUNET_CRYPTO_EcdhePublicKey DHRr; + + uint32_t Ns; + uint32_t Nr; + uint32_t PNs; + + int ratchet_flag; +}; + /** * Struct containing all information regarding a tunnel to a peer. */ -- 2.25.1