GNUnet  0.11.x
Data Fields
CadetTunnelAxolotl Struct Reference

Axolotl data, according to https://github.com/trevp/axolotl/wiki . More...

Collaboration diagram for CadetTunnelAxolotl:
[legend]

Data Fields

struct CadetTunnelSkippedKeyskipped_head
 A (double linked) list of stored message keys and associated header keys for "skipped" messages, i.e. More...
 
struct CadetTunnelSkippedKeyskipped_tail
 Skipped messages' keys DLL, tail. More...
 
struct GNUNET_CRYPTO_SymmetricSessionKey RK
 32-byte root key which gets updated by DH ratchet. More...
 
struct GNUNET_CRYPTO_SymmetricSessionKey HKs
 32-byte header key (currently used for sending). More...
 
struct GNUNET_CRYPTO_SymmetricSessionKey HKr
 32-byte header key (currently used for receiving) More...
 
struct GNUNET_CRYPTO_SymmetricSessionKey NHKs
 32-byte next header key (for sending), used once the ratchet advances. More...
 
struct GNUNET_CRYPTO_SymmetricSessionKey NHKr
 32-byte next header key (for receiving). More...
 
struct GNUNET_CRYPTO_SymmetricSessionKey CKs
 32-byte chain keys (used for forward-secrecy) for sending messages. More...
 
struct GNUNET_CRYPTO_SymmetricSessionKey CKr
 32-byte chain keys (used for forward-secrecy) for receiving messages. More...
 
struct GNUNET_CRYPTO_EcdhePrivateKey kx_0
 ECDH for key exchange (A0 / B0). More...
 
struct GNUNET_CRYPTO_EcdhePrivateKey DHRs
 ECDH Ratchet key (our private key in the current DH). More...
 
struct GNUNET_CRYPTO_EcdhePublicKey DHRr
 ECDH Ratchet key (other peer's public key in the current DH). More...
 
struct GNUNET_CRYPTO_EcdhePublicKey last_ephemeral
 Last ephemeral public key received from the other peer, for duplicate detection. More...
 
struct GNUNET_TIME_Absolute ratchet_expiration
 Time when the current ratchet expires and a new one is triggered (if ratchet_allowed is GNUNET_YES). More...
 
unsigned int skipped
 Number of elements in skipped_head <-> skipped_tail. More...
 
uint32_t Ns
 Message number (reset to 0 with each new ratchet, next message to send). More...
 
uint32_t Nr
 Message number (reset to 0 with each new ratchet, next message to recv). More...
 
uint32_t PNs
 Previous message numbers (# of msgs sent under prev ratchet) More...
 
int ratchet_flag
 True (GNUNET_YES) if we have to send a new ratchet key in next msg. More...
 
int ratchet_allowed
 True (GNUNET_YES) if we have received a message from the other peer that uses the keys from our last ratchet step. More...
 
unsigned int ratchet_counter
 Number of messages recieved since our last ratchet advance. More...
 

Detailed Description

Axolotl data, according to https://github.com/trevp/axolotl/wiki .

Definition at line 119 of file gnunet-service-cadet_tunnels.c.

Field Documentation

◆ skipped_head

struct CadetTunnelSkippedKey* CadetTunnelAxolotl::skipped_head

A (double linked) list of stored message keys and associated header keys for "skipped" messages, i.e.

messages that have not been received despite the reception of more recent messages, (head).

Definition at line 126 of file gnunet-service-cadet_tunnels.c.

Referenced by cleanup_ax(), delete_skipped_key(), GCT_handle_kx(), store_skipped_key(), and try_old_ax_keys().

◆ skipped_tail

struct CadetTunnelSkippedKey* CadetTunnelAxolotl::skipped_tail

Skipped messages' keys DLL, tail.

Definition at line 131 of file gnunet-service-cadet_tunnels.c.

Referenced by delete_skipped_key(), store_ax_keys(), and store_skipped_key().

◆ RK

struct GNUNET_CRYPTO_SymmetricSessionKey CadetTunnelAxolotl::RK

32-byte root key which gets updated by DH ratchet.

Definition at line 136 of file gnunet-service-cadet_tunnels.c.

Referenced by GCT_handle_kx(), GCT_handle_kx_auth(), send_kx_auth(), t_ax_decrypt_and_validate(), t_ax_encrypt(), and update_ax_by_kx().

◆ HKs

struct GNUNET_CRYPTO_SymmetricSessionKey CadetTunnelAxolotl::HKs

32-byte header key (currently used for sending).

Definition at line 141 of file gnunet-service-cadet_tunnels.c.

Referenced by GCT_send(), t_ax_encrypt(), t_h_encrypt(), and update_ax_by_kx().

◆ HKr

struct GNUNET_CRYPTO_SymmetricSessionKey CadetTunnelAxolotl::HKr

32-byte header key (currently used for receiving)

Definition at line 146 of file gnunet-service-cadet_tunnels.c.

Referenced by store_skipped_key(), t_ax_decrypt_and_validate(), t_h_decrypt(), and update_ax_by_kx().

◆ NHKs

struct GNUNET_CRYPTO_SymmetricSessionKey CadetTunnelAxolotl::NHKs

32-byte next header key (for sending), used once the ratchet advances.

We are sure that the sender has this key as well only after ratchet_allowed is GNUNET_YES.

Definition at line 153 of file gnunet-service-cadet_tunnels.c.

Referenced by t_ax_encrypt(), and update_ax_by_kx().

◆ NHKr

struct GNUNET_CRYPTO_SymmetricSessionKey CadetTunnelAxolotl::NHKr

32-byte next header key (for receiving).

To be tried when decrypting with HKr fails and thus the sender may have advanced the ratchet.

Definition at line 160 of file gnunet-service-cadet_tunnels.c.

Referenced by t_ax_decrypt_and_validate(), and update_ax_by_kx().

◆ CKs

struct GNUNET_CRYPTO_SymmetricSessionKey CadetTunnelAxolotl::CKs

32-byte chain keys (used for forward-secrecy) for sending messages.

Updated for every message.

Definition at line 166 of file gnunet-service-cadet_tunnels.c.

Referenced by t_ax_encrypt(), and update_ax_by_kx().

◆ CKr

struct GNUNET_CRYPTO_SymmetricSessionKey CadetTunnelAxolotl::CKr

32-byte chain keys (used for forward-secrecy) for receiving messages.

Updated for every message. If messages are skipped, the respective derived MKs (and the current ) are kept in the skipped_head DLL.

Definition at line 174 of file gnunet-service-cadet_tunnels.c.

Referenced by store_skipped_key(), t_ax_decrypt(), t_ax_decrypt_and_validate(), and update_ax_by_kx().

◆ kx_0

struct GNUNET_CRYPTO_EcdhePrivateKey CadetTunnelAxolotl::kx_0

ECDH for key exchange (A0 / B0).

Definition at line 179 of file gnunet-service-cadet_tunnels.c.

Referenced by cleanup_ax(), GCT_create_tunnel(), GCT_handle_kx(), GCT_handle_kx_auth(), send_kx(), send_kx_auth(), and update_ax_by_kx().

◆ DHRs

struct GNUNET_CRYPTO_EcdhePrivateKey CadetTunnelAxolotl::DHRs

ECDH Ratchet key (our private key in the current DH).

Definition at line 184 of file gnunet-service-cadet_tunnels.c.

Referenced by cleanup_ax(), GCT_handle_kx(), GCT_send(), new_ephemeral(), send_kx(), send_kx_auth(), t_ax_decrypt_and_validate(), and t_ax_encrypt().

◆ DHRr

struct GNUNET_CRYPTO_EcdhePublicKey CadetTunnelAxolotl::DHRr

ECDH Ratchet key (other peer's public key in the current DH).

Definition at line 189 of file gnunet-service-cadet_tunnels.c.

Referenced by GCT_handle_kx(), t_ax_decrypt_and_validate(), t_ax_encrypt(), and update_ax_by_kx().

◆ last_ephemeral

struct GNUNET_CRYPTO_EcdhePublicKey CadetTunnelAxolotl::last_ephemeral

Last ephemeral public key received from the other peer, for duplicate detection.

Definition at line 195 of file gnunet-service-cadet_tunnels.c.

Referenced by GCT_handle_kx(), send_kx_auth(), and update_ax_by_kx().

◆ ratchet_expiration

struct GNUNET_TIME_Absolute CadetTunnelAxolotl::ratchet_expiration

Time when the current ratchet expires and a new one is triggered (if ratchet_allowed is GNUNET_YES).

Definition at line 201 of file gnunet-service-cadet_tunnels.c.

Referenced by t_ax_encrypt(), and update_ax_by_kx().

◆ skipped

unsigned int CadetTunnelAxolotl::skipped

Number of elements in skipped_head <-> skipped_tail.

Definition at line 206 of file gnunet-service-cadet_tunnels.c.

Referenced by cleanup_ax(), delete_skipped_key(), store_ax_keys(), and store_skipped_key().

◆ Ns

uint32_t CadetTunnelAxolotl::Ns

Message number (reset to 0 with each new ratchet, next message to send).

Definition at line 211 of file gnunet-service-cadet_tunnels.c.

Referenced by GCT_send(), and t_ax_encrypt().

◆ Nr

uint32_t CadetTunnelAxolotl::Nr

Message number (reset to 0 with each new ratchet, next message to recv).

Definition at line 216 of file gnunet-service-cadet_tunnels.c.

Referenced by store_ax_keys(), store_skipped_key(), and t_ax_decrypt_and_validate().

◆ PNs

uint32_t CadetTunnelAxolotl::PNs

Previous message numbers (# of msgs sent under prev ratchet)

Definition at line 221 of file gnunet-service-cadet_tunnels.c.

Referenced by GCT_send(), and t_ax_encrypt().

◆ ratchet_flag

int CadetTunnelAxolotl::ratchet_flag

True (GNUNET_YES) if we have to send a new ratchet key in next msg.

Definition at line 226 of file gnunet-service-cadet_tunnels.c.

Referenced by t_ax_encrypt(), and update_ax_by_kx().

◆ ratchet_allowed

int CadetTunnelAxolotl::ratchet_allowed

True (GNUNET_YES) if we have received a message from the other peer that uses the keys from our last ratchet step.

This implies that we are again allowed to advance the ratchet, otherwise we have to wait until the other peer sees our current ephemeral key and advances first.

GNUNET_NO if we have advanced the ratched but lack any evidence that the other peer has noticed this.

Definition at line 238 of file gnunet-service-cadet_tunnels.c.

Referenced by t_ax_decrypt_and_validate(), and t_ax_encrypt().

◆ ratchet_counter

unsigned int CadetTunnelAxolotl::ratchet_counter

Number of messages recieved since our last ratchet advance.

If this counter = 0, we cannot send a new ratchet key in the next message.

If this counter > 0, we could (but don't have to) send a new key.

Once the ratchet_counter is larger than ratchet_messages (or ratchet_expiration time has past), and ratchet_allowed is GNUNET_YES, we advance the ratchet.

Definition at line 252 of file gnunet-service-cadet_tunnels.c.

Referenced by t_ax_encrypt().


The documentation for this struct was generated from the following file: