GNUnet 0.28.1-dev.2-13-g57ceb9dfb
 
Loading...
Searching...
No Matches
GSC_KeyExchangeInfo Struct Reference

Information about the status of a key exchange with another peer. More...

Collaboration diagram for GSC_KeyExchangeInfo:
[legend]

Data Fields

struct GSC_KeyExchangeInfonext
 DLL.
 
struct GSC_KeyExchangeInfoprev
 DLL.
 
struct GNUNET_PeerIdentity peer
 Identity of the peer.
 
struct GNUNET_MQ_Handlemq
 Message queue for sending messages to peer.
 
struct GNUNET_MQ_Enveloperesend_env
 Env for resending messages.
 
struct GNUNET_MessageStreamTokenizermst
 Our message stream tokenizer (for encrypted payload).
 
enum GSC_KX_Role role
 Own role in the key exchange.
 
struct GNUNET_ShortHashCode ss_R
 
struct GNUNET_ShortHashCode ss_e
 
struct GNUNET_ShortHashCode ss_I
 
struct GNUNET_CRYPTO_HpkePrivateKey sk_e
 Initiator secret key.
 
struct GNUNET_CRYPTO_HpkePublicKey pk_e
 Initiator ephemeral key.
 
struct GNUNET_HashCode ih_hash
 Hash over the entire InitiatorHello we are currently answering, or all zeroes if there is none.
 
struct GNUNET_HashCode rh_hash
 Hash over the entire ResponderHello we are currently answering, or all zeroes if there is none.
 
struct GNUNET_HashContexttranscript_hash_ctx
 The transcript hash context.
 
struct GNUNET_ShortHashCode early_secret_key
 ES - Early Secret Key TODO uniform naming: _key?
 
struct GNUNET_ShortHashCode early_traffic_secret
 ETS - Early traffic secret TODO.
 
struct GNUNET_ShortHashCode handshake_secret
 HS - Handshake secret TODO.
 
struct GNUNET_ShortHashCode rhts
 RHTS - Responder handshake secret TODO.
 
struct GNUNET_ShortHashCode ihts
 IHTS - Initiator handshake secret TODO.
 
struct GNUNET_ShortHashCode master_secret
 Master secret key TODO.
 
struct GNUNET_ShortHashCode current_ats
 *ATS - our current application traffic secret by epoch
 
struct GNUNET_ShortHashCode their_ats [10]
 *ATS - other peers application traffic secret by epoch
 
uint64_t current_epoch
 Our currently used epoch for sending.
 
struct GNUNET_TIME_Absolute current_epoch_expiration
 Expiration time of our current epoch.
 
uint64_t their_max_epoch
 Highest seen (or used) epoch of responder resp initiator.
 
uint64_t replay_max [10]
 Highest sequence number we have successfully deprotected in each epoch; the right edge of that epoch's anti-replay window.
 
uint64_t replay_bitmap [10]
 Anti-replay window for each epoch: bit k is set if the record with sequence number ‘replay_max[i] - k’ has been deprotected.
 
uint64_t current_sqn
 Our current sequence number.
 
struct GNUNET_TIME_Absolute timeout
 When should the session time out (if there are no Acks to HEARTBEATs)?
 
struct GNUNET_TIME_Absolute last_notify_timeout
 Last time we notified monitors.
 
struct GNUNET_SCHEDULER_Taskresend_task
 Task for resending messages during handshake.
 
struct GNUNET_TIME_Relative resend_delay
 How long to wait before the next retransmission of the handshake message in resend_env.
 
unsigned int resend_tries_left
 Resend tries left.
 
struct GNUNET_SCHEDULER_Taskheartbeat_task
 ID of task used for sending keep-alive pings.
 
int has_excess_bandwidth
 GNUNET_YES if this peer currently has excess bandwidth.
 
int association_up
 GNUNET_YES once application traffic keys are installed for this peer, i.e.
 
enum GNUNET_CORE_KxState status
 What is our connection state?
 
enum GNUNET_CORE_PeerClass class
 Peer class of the other peer TODO still needed?
 

Detailed Description

Information about the status of a key exchange with another peer.

Definition at line 231 of file gnunet-service-core_kx.c.

Field Documentation

◆ next

struct GSC_KeyExchangeInfo* GSC_KeyExchangeInfo::next

DLL.

Definition at line 236 of file gnunet-service-core_kx.c.

Referenced by GSC_KX_handle_client_monitor_peers().

◆ prev

struct GSC_KeyExchangeInfo* GSC_KeyExchangeInfo::prev

DLL.

Definition at line 241 of file gnunet-service-core_kx.c.

◆ peer

◆ mq

◆ resend_env

◆ mst

struct GNUNET_MessageStreamTokenizer* GSC_KeyExchangeInfo::mst

Our message stream tokenizer (for encrypted payload).

Definition at line 261 of file gnunet-service-core_kx.c.

Referenced by handle_encrypted_message(), handle_transport_notify_connect(), and handle_transport_notify_disconnect().

◆ role

enum GSC_KX_Role GSC_KeyExchangeInfo::role

Own role in the key exchange.

Are we supposed to initiate or receive the handshake?

Definition at line 273 of file gnunet-service-core_kx.c.

Referenced by handle_initiator_done(), handle_initiator_hello(), handle_responder_hello(), handle_responder_hello_cont(), restart_kx(), send_initiator_hello(), and send_responder_hello().

◆ ss_R

◆ ss_e

struct GNUNET_ShortHashCode GSC_KeyExchangeInfo::ss_e

◆ ss_I

struct GNUNET_ShortHashCode GSC_KeyExchangeInfo::ss_I

◆ sk_e

struct GNUNET_CRYPTO_HpkePrivateKey GSC_KeyExchangeInfo::sk_e

Initiator secret key.

Definition at line 283 of file gnunet-service-core_kx.c.

Referenced by cleanup_handshake_secrets(), handle_responder_hello(), and send_initiator_hello().

◆ pk_e

struct GNUNET_CRYPTO_HpkePublicKey GSC_KeyExchangeInfo::pk_e

Initiator ephemeral key.

Definition at line 288 of file gnunet-service-core_kx.c.

Referenced by handle_initiator_hello_cont(), send_initiator_hello(), and send_responder_hello().

◆ ih_hash

struct GNUNET_HashCode GSC_KeyExchangeInfo::ih_hash

Hash over the entire InitiatorHello we are currently answering, or all zeroes if there is none.

A retransmitted flight is byte-identical to the one that was lost (GNUNET_MQ_send_copy() of resend_env), so this is what tells a retransmission apart from a genuinely new exchange. Only meaningful while we are the responder.

Definition at line 297 of file gnunet-service-core_kx.c.

Referenced by handle_initiator_hello(), and reset_handshake().

◆ rh_hash

struct GNUNET_HashCode GSC_KeyExchangeInfo::rh_hash

Hash over the entire ResponderHello we are currently answering, or all zeroes if there is none.

Counterpart of ih_hash; only meaningful while we are the initiator.

Definition at line 304 of file gnunet-service-core_kx.c.

Referenced by handle_responder_hello(), and reset_handshake().

◆ transcript_hash_ctx

struct GNUNET_HashContext* GSC_KeyExchangeInfo::transcript_hash_ctx

The transcript hash context.

It is fed data from the handshake to be implicitly validated and used to derive key material.

Definition at line 311 of file gnunet-service-core_kx.c.

Referenced by handle_initiator_done(), handle_initiator_hello(), handle_initiator_hello_cont(), handle_responder_hello(), handle_responder_hello_cont(), handle_transport_notify_disconnect(), reset_handshake(), send_initiator_hello(), and send_responder_hello().

◆ early_secret_key

struct GNUNET_ShortHashCode GSC_KeyExchangeInfo::early_secret_key

ES - Early Secret Key TODO uniform naming: _key?

Definition at line 317 of file gnunet-service-core_kx.c.

Referenced by cleanup_handshake_secrets(), handle_initiator_hello_cont(), handle_responder_hello(), send_initiator_hello(), and send_responder_hello().

◆ early_traffic_secret

struct GNUNET_ShortHashCode GSC_KeyExchangeInfo::early_traffic_secret

ETS - Early traffic secret TODO.

Definition at line 323 of file gnunet-service-core_kx.c.

Referenced by cleanup_handshake_secrets(), handle_initiator_hello_cont(), and send_initiator_hello().

◆ handshake_secret

struct GNUNET_ShortHashCode GSC_KeyExchangeInfo::handshake_secret

HS - Handshake secret TODO.

Definition at line 329 of file gnunet-service-core_kx.c.

Referenced by cleanup_handshake_secrets(), handle_responder_hello_cont(), and send_responder_hello().

◆ rhts

struct GNUNET_ShortHashCode GSC_KeyExchangeInfo::rhts

RHTS - Responder handshake secret TODO.

Definition at line 335 of file gnunet-service-core_kx.c.

Referenced by cleanup_handshake_secrets(), handle_responder_hello_cont(), and send_responder_hello().

◆ ihts

struct GNUNET_ShortHashCode GSC_KeyExchangeInfo::ihts

IHTS - Initiator handshake secret TODO.

Definition at line 341 of file gnunet-service-core_kx.c.

Referenced by cleanup_handshake_secrets(), handle_initiator_done(), handle_responder_hello_cont(), and send_responder_hello().

◆ master_secret

struct GNUNET_ShortHashCode GSC_KeyExchangeInfo::master_secret

◆ current_ats

struct GNUNET_ShortHashCode GSC_KeyExchangeInfo::current_ats

*ATS - our current application traffic secret by epoch

Definition at line 352 of file gnunet-service-core_kx.c.

Referenced by check_rekey(), GSC_KX_encrypt_and_transmit(), handle_heartbeat(), handle_responder_hello_cont(), and send_responder_hello().

◆ their_ats

struct GNUNET_ShortHashCode GSC_KeyExchangeInfo::their_ats[10]

*ATS - other peers application traffic secret by epoch

Definition at line 357 of file gnunet-service-core_kx.c.

Referenced by handle_encrypted_message(), handle_initiator_done(), and handle_responder_hello_cont().

◆ current_epoch

uint64_t GSC_KeyExchangeInfo::current_epoch

◆ current_epoch_expiration

struct GNUNET_TIME_Absolute GSC_KeyExchangeInfo::current_epoch_expiration

Expiration time of our current epoch.

Definition at line 367 of file gnunet-service-core_kx.c.

Referenced by check_if_ack_or_heartbeat(), check_rekey(), handle_heartbeat(), handle_initiator_done(), and handle_responder_hello_cont().

◆ their_max_epoch

uint64_t GSC_KeyExchangeInfo::their_max_epoch

Highest seen (or used) epoch of responder resp initiator.

Definition at line 373 of file gnunet-service-core_kx.c.

Referenced by abandon_exchange(), handle_encrypted_message(), handle_initiator_done(), and handle_responder_hello_cont().

◆ replay_max

uint64_t GSC_KeyExchangeInfo::replay_max[10]

Highest sequence number we have successfully deprotected in each epoch; the right edge of that epoch's anti-replay window.

See RFC 9147, Section 4.5.1.

Definition at line 380 of file gnunet-service-core_kx.c.

Referenced by replay_check(), replay_commit(), replay_reset(), and replay_reset_all().

◆ replay_bitmap

uint64_t GSC_KeyExchangeInfo::replay_bitmap[10]

Anti-replay window for each epoch: bit k is set if the record with sequence number ‘replay_max[i] - k’ has been deprotected.

Bit 0 is ‘replay_max[i]’ itself. See RFC 9147, Section 4.5.1.

Definition at line 387 of file gnunet-service-core_kx.c.

Referenced by replay_check(), replay_commit(), replay_reset(), and replay_reset_all().

◆ current_sqn

uint64_t GSC_KeyExchangeInfo::current_sqn

◆ timeout

struct GNUNET_TIME_Absolute GSC_KeyExchangeInfo::timeout

When should the session time out (if there are no Acks to HEARTBEATs)?

Definition at line 397 of file gnunet-service-core_kx.c.

Referenced by GSC_KX_handle_client_monitor_peers(), monitor_notify_all(), send_heartbeat(), and update_timeout().

◆ last_notify_timeout

struct GNUNET_TIME_Absolute GSC_KeyExchangeInfo::last_notify_timeout

Last time we notified monitors.

Definition at line 402 of file gnunet-service-core_kx.c.

Referenced by monitor_notify_all(), and update_timeout().

◆ resend_task

◆ resend_delay

struct GNUNET_TIME_Relative GSC_KeyExchangeInfo::resend_delay

How long to wait before the next retransmission of the handshake message in resend_env.

Doubles with every retransmission, capped at RESEND_TIMEOUT_MAX. See RFC 9147, Section 5.8.

Definition at line 414 of file gnunet-service-core_kx.c.

Referenced by schedule_resend(), and start_resend().

◆ resend_tries_left

unsigned int GSC_KeyExchangeInfo::resend_tries_left

Resend tries left.

Definition at line 419 of file gnunet-service-core_kx.c.

Referenced by resend_initiator_done(), resend_initiator_hello(), resend_responder_hello(), and start_resend().

◆ heartbeat_task

struct GNUNET_SCHEDULER_Task* GSC_KeyExchangeInfo::heartbeat_task

ID of task used for sending keep-alive pings.

TODO still needed?

Definition at line 425 of file gnunet-service-core_kx.c.

Referenced by abandon_exchange(), handle_initiator_done(), handle_transport_notify_disconnect(), send_heartbeat(), and update_timeout().

◆ has_excess_bandwidth

int GSC_KeyExchangeInfo::has_excess_bandwidth

GNUNET_YES if this peer currently has excess bandwidth.

TODO still needed?

Definition at line 431 of file gnunet-service-core_kx.c.

Referenced by GSC_NEIGHBOURS_check_excess_bandwidth().

◆ association_up

int GSC_KeyExchangeInfo::association_up

GNUNET_YES once application traffic keys are installed for this peer, i.e.

once we have an association in the sense of RFC 9147.

This is deliberately not derived from status. RFC 9147, Section 5.11 requires that a peer which starts a new handshake over an existing association does not destroy that association until it has "demonstrated reachability [...] by completing a complete handshake including delivering a verifiable Finished message" – so a handshake can be in flight while an association is up, and the record layer has to keep deprotecting records for the old epoch throughout. status tracks the handshake, this tracks the association.

Definition at line 446 of file gnunet-service-core_kx.c.

Referenced by abandon_exchange(), GSC_KX_encrypt_and_transmit(), handle_encrypted_message(), handle_initiator_done(), handle_responder_hello_cont(), and send_heartbeat().

◆ status

◆ class

enum GNUNET_CORE_PeerClass GSC_KeyExchangeInfo::class

Peer class of the other peer TODO still needed?

Definition at line 457 of file gnunet-service-core_kx.c.

Referenced by check_if_ack_or_heartbeat(), and handle_initiator_done().


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