GNUnet 0.22.0
TransportDVBoxMessage Struct Reference

Outer layer of an encapsulated message send over multiple hops. More...

Collaboration diagram for TransportDVBoxMessage:
[legend]

Data Fields

struct GNUNET_MessageHeader header
 Type is GNUNET_MESSAGE_TYPE_TRANSPORT_DV_BOX. More...
 
unsigned int without_fc
 Flag if the payload is a control message. More...
 
uint16_t total_hops
 Number of total hops this messages travelled. More...
 
uint16_t num_hops
 Number of hops this messages includes. More...
 
struct GNUNET_CRYPTO_HpkeEncapsulation ephemeral_key
 Ephemeral key setup by the sender for target, used to encrypt the payload. More...
 
struct GNUNET_ShortHashCode iv
 We use an IV here as the ephemeral_key is re-used for EPHEMERAL_VALIDITY time to avoid re-signing it all the time. More...
 
struct GNUNET_HashCode hmac
 HMAC over the ciphertext of the encrypted, variable-size body that follows. More...
 
uint16_t orig_size
 Size this msg had initially. More...
 

Detailed Description

Outer layer of an encapsulated message send over multiple hops.

The path given only includes the identities of the subsequent peers, i.e. it will be empty if we are the receiver. Each forwarding peer should scan the list from the end, and if it can, forward to the respective peer. The list should then be shortened by all the entries up to and including that peer. Each hop should also increment total_hops to allow the receiver to get a precise estimate on the number of hops the message travelled. Senders must provide a learned path that thus should work, but intermediaries know of a shortcut, they are allowed to send the message via that shortcut.

If a peer finds itself still on the list, it must drop the message.

The payload of the box can only be decrypted and verified by the ultimate receiver. Intermediaries do not learn the sender's identity and the path the message has taken. However, the first hop does learn the sender as total_hops would be zero and thus the predecessor must be the origin (so this is not really useful for anonymization).

Definition at line 766 of file gnunet-service-transport.c.

Field Documentation

◆ header

struct GNUNET_MessageHeader TransportDVBoxMessage::header

◆ without_fc

unsigned int TransportDVBoxMessage::without_fc

Flag if the payload is a control message.

In NBO.

Definition at line 776 of file gnunet-service-transport.c.

Referenced by encapsulate_for_dv(), and forward_dv_box().

◆ total_hops

uint16_t TransportDVBoxMessage::total_hops

Number of total hops this messages travelled.

In NBO. origin sets this to zero, to be incremented at each hop. Peers should limit the total_hops value they accept from other peers.

Definition at line 784 of file gnunet-service-transport.c.

Referenced by encapsulate_for_dv(), forward_dv_box(), and handle_dv_box().

◆ num_hops

uint16_t TransportDVBoxMessage::num_hops

Number of hops this messages includes.

In NBO. Reduced by one or more at each hop. Peers should limit the num_hops value they accept from other peers.

Definition at line 791 of file gnunet-service-transport.c.

Referenced by check_dv_box(), encapsulate_for_dv(), forward_dv_box(), and handle_dv_box().

◆ ephemeral_key

struct GNUNET_CRYPTO_HpkeEncapsulation TransportDVBoxMessage::ephemeral_key

Ephemeral key setup by the sender for target, used to encrypt the payload.

Intermediaries must not change this value.

Definition at line 797 of file gnunet-service-transport.c.

Referenced by encapsulate_for_dv(), and handle_dv_box().

◆ iv

struct GNUNET_ShortHashCode TransportDVBoxMessage::iv

We use an IV here as the ephemeral_key is re-used for EPHEMERAL_VALIDITY time to avoid re-signing it all the time.

Intermediaries must not change this value.

Definition at line 804 of file gnunet-service-transport.c.

Referenced by gnunet-chk.AESKey::__init__(), encapsulate_for_dv(), and handle_dv_box().

◆ hmac

struct GNUNET_HashCode TransportDVBoxMessage::hmac

HMAC over the ciphertext of the encrypted, variable-size body that follows.

Verified via DH of target and ephemeral_key. Intermediaries must not change this value.

Definition at line 811 of file gnunet-service-transport.c.

Referenced by encapsulate_for_dv(), and handle_dv_box().

◆ orig_size

uint16_t TransportDVBoxMessage::orig_size

Size this msg had initially.

This is needed to calculate the hmac at the target. The header size can not be used for that, because the box size is getting smaller at each hop.

Definition at line 818 of file gnunet-service-transport.c.

Referenced by encapsulate_for_dv(), and handle_dv_box().


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