GNUnet 0.22.2
TCPBox Struct Reference

TCP message box. More...

Collaboration diagram for TCPBox:
[legend]

Data Fields

struct GNUNET_MessageHeader header
 Type is GNUNET_MESSAGE_TYPE_COMMUNICATOR_TCP_BOX. More...
 
struct GNUNET_ShortHashCode hmac
 HMAC for the following encrypted message. More...
 

Detailed Description

TCP message box.

Always sent encrypted!

Definition at line 255 of file gnunet-communicator-tcp.c.

Field Documentation

◆ header

struct GNUNET_MessageHeader TCPBox::header

Type is GNUNET_MESSAGE_TYPE_COMMUNICATOR_TCP_BOX.

Warning: the header size EXCLUDES the size of the struct TCPBox. We usually never do this, but here the payload may truly be 64k after the TCPBox (as we have no MTU)!!

Definition at line 263 of file gnunet-communicator-tcp.c.

Referenced by mq_send().

◆ hmac

struct GNUNET_ShortHashCode TCPBox::hmac

HMAC for the following encrypted message.

Yes, we MUST use mac-then-encrypt here, as we want to hide the message sizes on the wire (zero plaintext design!). Using CTR mode, padding oracle attacks do not apply. Besides, due to the use of ephemeral keys (hopefully with effective replay protection from monotonic time!) the attacker is limited in using the oracle.

Definition at line 273 of file gnunet-communicator-tcp.c.

Referenced by mq_send(), and try_handle_plaintext().


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