Outer layer of an encapsulated message send over multiple hops. More...
Data Fields | |
| struct GNUNET_MessageHeader | header |
| Type is GNUNET_MESSAGE_TYPE_TRANSPORT_DV_BOX. | |
| uint32_t | without_fc |
| Flag if the payload is a control message. | |
| uint16_t | total_hops |
| Number of total hops this messages travelled. | |
| uint16_t | num_hops |
| Number of hops this messages includes. | |
| struct GNUNET_CRYPTO_HpkeEncapsulation | ephemeral_key |
| Ephemeral key setup by the sender for target, used to encrypt the payload. | |
| struct GNUNET_CRYPTO_AeadNonce | iv |
| We use an IV here as the ephemeral_key is reused for EPHEMERAL_VALIDITY time to avoid re-signing it all the time. | |
| struct GNUNET_CRYPTO_AeadMac | mac |
| HMAC over the ciphertext of the encrypted, variable-size body that follows. | |
| uint16_t | orig_size |
| Size this msg had initially. | |
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 890 of file gnunet-service-transport.c.
| struct GNUNET_MessageHeader TransportDVBoxMessage::header |
Type is GNUNET_MESSAGE_TYPE_TRANSPORT_DV_BOX.
Definition at line 895 of file gnunet-service-transport.c.
Referenced by check_dv_box(), decaps_dv_box_cont(), encapsulate_for_dv(), forward_dv_box(), and handle_dv_box().
| uint32_t TransportDVBoxMessage::without_fc |
Flag if the payload is a control message.
In NBO.
Definition at line 900 of file gnunet-service-transport.c.
Referenced by encapsulate_for_dv(), and forward_dv_box().
| 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 908 of file gnunet-service-transport.c.
Referenced by check_dv_box(), encapsulate_for_dv(), forward_dv_box(), and handle_dv_box().
| 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 915 of file gnunet-service-transport.c.
Referenced by check_dv_box(), encapsulate_for_dv(), forward_dv_box(), and handle_dv_box().
| 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 921 of file gnunet-service-transport.c.
Referenced by decaps_dv_box_cont(), encapsulate_for_dv(), and handle_dv_box().
| struct GNUNET_CRYPTO_AeadNonce TransportDVBoxMessage::iv |
We use an IV here as the ephemeral_key is reused for EPHEMERAL_VALIDITY time to avoid re-signing it all the time.
Intermediaries must not change this value.
Definition at line 928 of file gnunet-service-transport.c.
Referenced by decaps_dv_box_cont(), and encapsulate_for_dv().
| struct GNUNET_CRYPTO_AeadMac TransportDVBoxMessage::mac |
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 935 of file gnunet-service-transport.c.
Referenced by decaps_dv_box_cont(), and encapsulate_for_dv().
| 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 942 of file gnunet-service-transport.c.
Referenced by check_dv_box(), and encapsulate_for_dv().