Information about the status of a key exchange with another peer. More...
Data Fields | |
| struct GSC_KeyExchangeInfo * | next |
| DLL. | |
| struct GSC_KeyExchangeInfo * | prev |
| DLL. | |
| struct GNUNET_PeerIdentity | peer |
| Identity of the peer. | |
| struct GNUNET_MQ_Handle * | mq |
| Message queue for sending messages to peer. | |
| struct GNUNET_MQ_Envelope * | resend_env |
| Env for resending messages. | |
| struct GNUNET_MessageStreamTokenizer * | mst |
| 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_HashContext * | transcript_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_Task * | resend_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_Task * | heartbeat_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? | |
Information about the status of a key exchange with another peer.
Definition at line 231 of file gnunet-service-core_kx.c.
| 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().
| struct GSC_KeyExchangeInfo* GSC_KeyExchangeInfo::prev |
DLL.
Definition at line 241 of file gnunet-service-core_kx.c.
| struct GNUNET_PeerIdentity GSC_KeyExchangeInfo::peer |
Identity of the peer.
Definition at line 246 of file gnunet-service-core_kx.c.
Referenced by abandon_exchange(), check_if_ack_or_heartbeat(), check_rekey(), deliver_message(), GSC_KX_handle_client_monitor_peers(), handle_encrypted_message(), handle_initiator_done(), handle_initiator_hello(), handle_initiator_hello_cont(), handle_responder_hello(), handle_responder_hello_cont(), handle_transport_notify_connect(), handle_transport_notify_disconnect(), monitor_notify_all(), resend_initiator_hello(), restart_kx(), send_heartbeat(), send_initiator_hello(), and send_responder_hello().
| struct GNUNET_MQ_Handle* GSC_KeyExchangeInfo::mq |
Message queue for sending messages to peer.
Definition at line 251 of file gnunet-service-core_kx.c.
Referenced by GSC_KX_encrypt_and_transmit(), GSC_NEIGHBOURS_get_queue_length(), handle_initiator_hello(), handle_responder_hello(), handle_responder_hello_cont(), handle_transport_notify_connect(), resend_initiator_done(), resend_initiator_hello(), resend_responder_hello(), send_initiator_hello(), and send_responder_hello().
| struct GNUNET_MQ_Envelope* GSC_KeyExchangeInfo::resend_env |
Env for resending messages.
Definition at line 256 of file gnunet-service-core_kx.c.
Referenced by check_if_ack_or_heartbeat(), handle_initiator_done(), handle_initiator_hello(), handle_responder_hello(), handle_responder_hello_cont(), handle_transport_notify_disconnect(), resend_initiator_done(), resend_initiator_hello(), resend_responder_hello(), reset_handshake(), send_initiator_hello(), and send_responder_hello().
| 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().
| 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().
| struct GNUNET_ShortHashCode GSC_KeyExchangeInfo::ss_R |
Definition at line 276 of file gnunet-service-core_kx.c.
Referenced by cleanup_handshake_secrets(), derive_es_ets(), handle_initiator_hello_cont(), and send_initiator_hello().
| struct GNUNET_ShortHashCode GSC_KeyExchangeInfo::ss_e |
Definition at line 277 of file gnunet-service-core_kx.c.
Referenced by cleanup_handshake_secrets(), handle_responder_hello_cont(), and send_responder_hello().
| struct GNUNET_ShortHashCode GSC_KeyExchangeInfo::ss_I |
Definition at line 278 of file gnunet-service-core_kx.c.
Referenced by cleanup_handshake_secrets(), handle_responder_hello_cont(), and send_responder_hello().
| 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().
| 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().
| 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().
| 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().
| 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().
| 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().
| 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().
| 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().
| 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().
| 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().
| struct GNUNET_ShortHashCode GSC_KeyExchangeInfo::master_secret |
Master secret key TODO.
Definition at line 347 of file gnunet-service-core_kx.c.
Referenced by cleanup_handshake_secrets(), handle_initiator_done(), handle_responder_hello_cont(), and send_responder_hello().
| 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().
| 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().
| uint64_t GSC_KeyExchangeInfo::current_epoch |
Our currently used epoch for sending.
Definition at line 362 of file gnunet-service-core_kx.c.
Referenced by abandon_exchange(), check_rekey(), GSC_KX_encrypt_and_transmit(), handle_heartbeat(), handle_initiator_done(), handle_responder_hello_cont(), and send_responder_hello().
| 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().
| 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().
| 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().
| 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().
| uint64_t GSC_KeyExchangeInfo::current_sqn |
Our current sequence number.
Definition at line 392 of file gnunet-service-core_kx.c.
Referenced by abandon_exchange(), check_rekey(), GSC_KX_encrypt_and_transmit(), handle_heartbeat(), handle_initiator_done(), handle_responder_hello_cont(), and send_responder_hello().
| 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().
| 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().
| struct GNUNET_SCHEDULER_Task* GSC_KeyExchangeInfo::resend_task |
Task for resending messages during handshake.
Definition at line 407 of file gnunet-service-core_kx.c.
Referenced by check_if_ack_or_heartbeat(), handle_initiator_done(), handle_responder_hello(), handle_transport_notify_disconnect(), resend_initiator_done(), resend_initiator_hello(), resend_responder_hello(), reset_handshake(), and schedule_resend().
| 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().
| 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().
| 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().
| 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().
| 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().
| enum GNUNET_CORE_KxState GSC_KeyExchangeInfo::status |
What is our connection state?
Definition at line 451 of file gnunet-service-core_kx.c.
Referenced by abandon_exchange(), check_if_ack_or_heartbeat(), GSC_KX_handle_client_monitor_peers(), handle_encrypted_message(), handle_initiator_done(), handle_initiator_hello(), handle_responder_hello(), handle_responder_hello_cont(), handle_transport_notify_disconnect(), monitor_notify_all(), restart_kx(), send_heartbeat(), send_initiator_hello(), and send_responder_hello().
| 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().