TODO: More...
#include "platform.h"#include "gnunet_common.h"#include "gnunet_util_lib.h"#include "gnunet-service-core_kx.h"#include "gnunet_transport_core_service.h"#include "gnunet-service-core_sessions.h"#include "gnunet-service-core.h"#include "gnunet_constants.h"#include "gnunet_protocols.h"#include "gnunet_pils_service.h"Go to the source code of this file.
Data Structures | |
| struct | GSC_KeyExchangeInfo |
| Information about the status of a key exchange with another peer. More... | |
| struct | ResponderHelloCls |
Macros | |
| #define | DEBUG_KX 0 |
| Enable expensive (and possibly problematic for privacy!) logging of KX. | |
| #define | DECRYPTION_FAILURES_LOG_LEVEL GNUNET_ERROR_TYPE_DEBUG |
| Enable expensive logging of decryption failures. | |
| #define | RESEND_MAX_TRIES 5 |
| Number of times we retransmit a handshake flight before giving up on it and starting a fresh exchange. | |
| #define | AEAD_KEY_BYTES crypto_aead_xchacha20poly1305_ietf_KEYBYTES |
| libsodium has very long symbol names | |
| #define | AEAD_NONCE_BYTES crypto_aead_xchacha20poly1305_ietf_NPUBBYTES |
| libsodium has very long symbol names | |
| #define | AEAD_TAG_BYTES crypto_aead_xchacha20poly1305_ietf_ABYTES |
| libsodium has very long symbol names | |
| #define | RESEND_TIMEOUT GNUNET_TIME_relative_multiply (GNUNET_TIME_UNIT_SECONDS, 1) |
| Initial handshake retransmission timer. | |
| #define | RESEND_TIMEOUT_MAX GNUNET_TIME_relative_multiply (GNUNET_TIME_UNIT_SECONDS, 60) |
| Ceiling for the handshake retransmission timer (RFC 9147, Section 5.8). | |
| #define | REPLAY_WINDOW_SIZE 64 |
| Size of the per-epoch anti-replay window, in records. | |
| #define | HEARTBEAT_PROBE_FREQUENCY GNUNET_TIME_relative_multiply (GNUNET_TIME_UNIT_SECONDS, 30) |
| How long we wait for the Ack to a heartbeat before sending another one. | |
| #define | MAX_UNANSWERED_HEARTBEATS 3 |
| How many heartbeats in a row may go unanswered before we give up on the association. | |
| #define | MIN_HEARTBEAT_FREQUENCY GNUNET_TIME_relative_multiply (GNUNET_TIME_UNIT_SECONDS, 5) |
| What is the minimum frequency for a HEARTBEAT message? | |
| #define | HEARTBEAT_FREQUENCY GNUNET_TIME_relative_multiply (GNUNET_TIME_UNIT_HOURS, 12) |
| How often do we send a heartbeat? | |
| #define | MAX_EPOCHS 10 |
| Maximum number of epochs we keep on hand. | |
| #define | EPOCH_EXPIRATION GNUNET_TIME_relative_multiply (GNUNET_TIME_UNIT_HOURS, 12) |
| How often do we rekey/switch to a new epoch? | |
| #define | REKEY_TOLERANCE GNUNET_TIME_relative_multiply (GNUNET_TIME_UNIT_MINUTES, 5) |
| What time difference do we tolerate? | |
| #define | EARLY_DATA_STR "early data" |
| String for expanding early transport secret (See https://lsd.gnunet.org/lsd0012/draft-schanzen-cake.html) | |
| #define | R_HS_TRAFFIC_STR "r hs traffic" |
| String for expanding RHTS (See https://lsd.gnunet.org/lsd0012/draft-schanzen-cake.html) | |
| #define | I_HS_TRAFFIC_STR "i hs traffic" |
| String for expanding IHTS (See https://lsd.gnunet.org/lsd0012/draft-schanzen-cake.html) | |
| #define | R_AP_TRAFFIC_STR "r ap traffic" |
| String for expanding RATS (See https://lsd.gnunet.org/lsd0012/draft-schanzen-cake.html) | |
| #define | I_AP_TRAFFIC_STR "i ap traffic" |
| String for expanding IATS (See https://lsd.gnunet.org/lsd0012/draft-schanzen-cake.html) | |
| #define | DERIVED_STR "derived" |
| String for expanding derived keys (Handshake and Early) (See https://lsd.gnunet.org/lsd0012/draft-schanzen-cake.html) | |
| #define | R_FINISHED_STR "r finished" |
| String for expanding fk_R used for ResponderFinished field (See https://lsd.gnunet.org/lsd0012/draft-schanzen-cake.html) | |
| #define | I_FINISHED_STR "i finished" |
| String for expanding fk_I used for InitiatorFinished field (See https://lsd.gnunet.org/lsd0012/draft-schanzen-cake.html) | |
| #define | CAKE_LABEL "cake10" |
| Labeled expand label for CAKE. | |
| #define | KEY_STR "key" |
| String for expanding derived keys (Handshake and Early) (See https://lsd.gnunet.org/lsd0012/draft-schanzen-cake.html) | |
| #define | TRAFFIC_UPD_STR "traffic upd" |
| String for expanding derived keys (Handshake and Early) (See https://lsd.gnunet.org/lsd0012/draft-schanzen-cake.html) | |
| #define | IV_STR "iv" |
| String for expanding derived keys (Handshake and Early) (See https://lsd.gnunet.org/lsd0012/draft-schanzen-cake.html) | |
Enumerations | |
| enum | GSC_KX_Role { ROLE_INITIATOR = 0 , ROLE_RESPONDER = 1 } |
| Indicates whether a peer is in the initiating or receiving role. More... | |
Functions | |
| static void | buffer_clear (void *buf, size_t len) |
| static void | cleanup_handshake_secrets (struct GSC_KeyExchangeInfo *kx) |
| static void | replay_reset (struct GSC_KeyExchangeInfo *kx, uint64_t epoch) |
| Forget the anti-replay window of epoch. | |
| static void | replay_reset_all (struct GSC_KeyExchangeInfo *kx) |
| Forget every anti-replay window (all of MAX_EPOCHS). | |
| static enum GNUNET_GenericReturnValue | replay_check (const struct GSC_KeyExchangeInfo *kx, uint64_t epoch, uint64_t sqn) |
| Would a record with sequence number sqn in epoch be a replay? | |
| static void | replay_commit (struct GSC_KeyExchangeInfo *kx, uint64_t epoch, uint64_t sqn) |
| Record that a record with sequence number sqn in epoch has been deprotected successfully, sliding the window right if needed. | |
| static void | snapshot_transcript (const struct GNUNET_HashContext *ts_hash, struct GNUNET_HashCode *snapshot) |
| static void | monitor_notify_all (struct GSC_KeyExchangeInfo *kx) |
| Inform all monitors about the KX state of the given peer. | |
| static void | restart_kx (struct GSC_KeyExchangeInfo *kx) |
| static void | send_heartbeat (void *cls) |
| Task triggered when a neighbour entry is about to time out (and we should prevent this by sending an Ack in response to a heartbeat). | |
| static void | update_timeout (struct GSC_KeyExchangeInfo *kx) |
| We've seen a valid message from the other peer. | |
| static void | send_initiator_hello (struct GSC_KeyExchangeInfo *kx) |
| Send initiator hello. | |
| static int | deliver_message (void *cls, const struct GNUNET_MessageHeader *m) |
| Deliver P2P message to interested clients. | |
| static void | schedule_resend (struct GSC_KeyExchangeInfo *kx, GNUNET_SCHEDULER_TaskCallback cb) |
| Arm resend_task for the next retransmission of the flight in resend_env and back the timer off for the one after that. | |
| static void | start_resend (struct GSC_KeyExchangeInfo *kx, GNUNET_SCHEDULER_TaskCallback cb) |
| Start a handshake flight: kx will retransmit it RESEND_MAX_TRIES times, starting after RESEND_TIMEOUT and backing off from there. | |
| static void | reset_handshake (struct GSC_KeyExchangeInfo *kx) |
| Discard the state of the handshake kx is in the middle of, so that a new one can be started. | |
| static void | abandon_exchange (struct GSC_KeyExchangeInfo *kx) |
| Give up on the exchange kx is in and on the session it may have established, and return it to a state in which a fresh handshake can be run. | |
| static void * | handle_transport_notify_connect (void *cls, const struct GNUNET_PeerIdentity *peer_id, struct GNUNET_MQ_Handle *mq) |
| Function called by transport to notify us that a peer connected to us (on the network level). | |
| static void | derive_es_ets (const struct GNUNET_HashCode *transcript, const struct GNUNET_ShortHashCode *ss_R, struct GNUNET_ShortHashCode *es, struct GNUNET_ShortHashCode *ets) |
| TODO propose a new scheme: don't choose an initiator and responder based on hashing the peer ids, but: let each peer be their own initiator (and responder) when opening a channel towards another peer. | |
| static void | derive_sn (const struct GNUNET_ShortHashCode *secret, unsigned char *sn, size_t sn_len) |
| static void | derive_hs (const struct GNUNET_ShortHashCode *es, const struct GNUNET_ShortHashCode *ss_e, struct GNUNET_ShortHashCode *handshake_secret) |
| Derive the handshake secret. | |
| static void | derive_ihts (const struct GNUNET_HashCode *transcript, const struct GNUNET_ShortHashCode *hs, struct GNUNET_ShortHashCode *ihts) |
| Derive the initiator handshake secret. | |
| static void | derive_rhts (const struct GNUNET_HashCode *transcript, const struct GNUNET_ShortHashCode *hs, struct GNUNET_ShortHashCode *rhts) |
| Derive the responder handshake secret. | |
| static void | derive_ms (const struct GNUNET_ShortHashCode *hs, const struct GNUNET_ShortHashCode *ss_I, struct GNUNET_ShortHashCode *ms) |
| Derive the master secret. | |
| static void | generate_per_record_nonce (uint64_t seq, const uint8_t write_iv[crypto_aead_xchacha20poly1305_ietf_NPUBBYTES], uint8_t per_record_write_iv[crypto_aead_xchacha20poly1305_ietf_NPUBBYTES]) |
| Generate per record nonce as per https://www.rfc-editor.org/rfc/rfc8446#section-5.3 using per key nonce and sequence number. | |
| static void | derive_per_message_secrets (const struct GNUNET_ShortHashCode *ts, uint64_t seq, unsigned char key[crypto_aead_xchacha20poly1305_ietf_KEYBYTES], unsigned char nonce[crypto_aead_xchacha20poly1305_ietf_NPUBBYTES]) |
| key = HKDF-Expand [I,R][A,H]TS, "key", 32) nonce = HKDF-Expand ([I,R][A,H]TS, "iv", 24) | |
| static void | derive_next_ats (const struct GNUNET_ShortHashCode *old_ats, struct GNUNET_ShortHashCode *new_ats) |
| Derive the next application secret. | |
| static void | derive_initial_ats (const struct GNUNET_HashCode *transcript, const struct GNUNET_ShortHashCode *ms, enum GSC_KX_Role role, struct GNUNET_ShortHashCode *initial_ats) |
| Derive the initiator application secret. | |
| static void | generate_responder_finished (const struct GNUNET_HashCode *transcript, const struct GNUNET_ShortHashCode *ms, struct GNUNET_HashCode *result) |
| Generate the responder finished field. | |
| static void | generate_initiator_finished (const struct GNUNET_HashCode *transcript, const struct GNUNET_ShortHashCode *ms, struct GNUNET_HashCode *result) |
| Generate the initiator finished field. | |
| static void | resend_responder_hello (void *cls) |
| void | send_responder_hello (struct GSC_KeyExchangeInfo *kx) |
| static void | handle_initiator_hello_cont (struct GSC_KeyExchangeInfo *kx, const struct InitiatorHello *ihm_e, const struct GNUNET_ShortHashCode *ss_R) |
| Finish handling the InitiatorHello ihm_e now that ss_R, the shared secret decapsulated with our peer identity's private key, is available. | |
| static int | check_initiator_hello (void *cls, const struct InitiatorHello *m) |
| static void | handle_initiator_hello (void *cls, const struct InitiatorHello *ihm_e) |
| Handle the InitiatorHello message. | |
| static void | resend_initiator_done (void *cls) |
| static void | handle_responder_hello_cont (struct ResponderHelloCls *rh_ctx, const struct GNUNET_ShortHashCode *ss_I) |
| Finish handling a ResponderHello now that ss_I, the shared secret decapsulated with our peer identity's private key, is available. | |
| static int | check_responder_hello (void *cls, const struct ResponderHello *m) |
| static void | handle_responder_hello (void *cls, const struct ResponderHello *rhm_e) |
| Handle Responder Hello message. | |
| static int | check_initiator_done (void *cls, const struct InitiatorDone *m) |
| static void | handle_initiator_done (void *cls, const struct InitiatorDone *idm_e) |
| Handle InitiatorDone message. | |
| static int | check_encrypted_message (void *cls, const struct EncryptedMessage *m) |
| Check an incoming encrypted message before handling it. | |
| static void | handle_heartbeat (struct GSC_KeyExchangeInfo *kx, const struct Heartbeat *m) |
| Handle a key update. | |
| static enum GNUNET_GenericReturnValue | check_if_ack_or_heartbeat (struct GSC_KeyExchangeInfo *kx, const char *buf, size_t buf_len) |
| static void | handle_encrypted_message (void *cls, const struct EncryptedMessage *m) |
| handle an encrypted message | |
| static void | handle_transport_notify_disconnect (void *cls, const struct GNUNET_PeerIdentity *peer, void *handler_cls) |
| Function called by transport telling us that a peer disconnected. | |
| static void | resend_initiator_hello (void *cls) |
| static enum GNUNET_GenericReturnValue | check_rekey (struct GSC_KeyExchangeInfo *kx) |
| Move to the next epoch if the current one is exhausted. | |
| void | GSC_KX_encrypt_and_transmit (struct GSC_KeyExchangeInfo *kx, const void *payload, size_t payload_size) |
| Encrypt and transmit payload. | |
| void | GSC_KX_start (void) |
| void | pid_change_cb (void *cls, const struct GNUNET_HELLO_Parser *parser, const struct GNUNET_HashCode *hash) |
| int | GSC_KX_init (void) |
| Initialize KX subsystem. | |
| void | GSC_KX_done () |
| Shutdown KX subsystem. | |
| unsigned int | GSC_NEIGHBOURS_get_queue_length (const struct GSC_KeyExchangeInfo *kxinfo) |
| Check how many messages are queued for the given neighbour. | |
| int | GSC_NEIGHBOURS_check_excess_bandwidth (const struct GSC_KeyExchangeInfo *kxinfo) |
| Check if the given neighbour has excess bandwidth available. | |
| void | GSC_KX_handle_client_monitor_peers (struct GNUNET_MQ_Handle *mq) |
| Handle GNUNET_MESSAGE_TYPE_CORE_MONITOR_PEERS request. | |
Variables | |
| static struct GNUNET_TRANSPORT_CoreHandle * | transport |
| Transport service. | |
| static struct GSC_KeyExchangeInfo * | kx_head |
| DLL head. | |
| static struct GSC_KeyExchangeInfo * | kx_tail |
| DLL tail. | |
| static struct GNUNET_SCHEDULER_Task * | rekey_task |
| Task scheduled for periodic re-generation (and thus rekeying) of our ephemeral key. | |
| static struct GNUNET_NotificationContext * | nc |
| Notification context for broadcasting to monitors. | |
| static char * | my_services_info = "" |
| Our services info string TODO. | |
TODO:
code for managing the key exchange (SET_KEY, PING, PONG) with other peers
Definition in file gnunet-service-core_kx.c.
| #define DEBUG_KX 0 |
Enable expensive (and possibly problematic for privacy!) logging of KX.
Definition at line 51 of file gnunet-service-core_kx.c.
| #define DECRYPTION_FAILURES_LOG_LEVEL GNUNET_ERROR_TYPE_DEBUG |
Enable expensive logging of decryption failures.
Note that protocol violating peers may always cause those en masse.
Definition at line 58 of file gnunet-service-core_kx.c.
| #define RESEND_MAX_TRIES 5 |
Number of times we retransmit a handshake flight before giving up on it and starting a fresh exchange.
With the exponential backoff of RFC 9147, Section 5.8, the retransmissions go out 1, 3, 7, 15 and 31 seconds into the flight; the flight is then abandoned one further interval after the last of them, at 63s.
Note that the give-up is observed by the next firing of resend_task, which schedule_resend() has already armed with the doubled delay – so the flight always outlasts its last retransmission by one interval, and raising this by one costs far more than the interval it adds.
Definition at line 72 of file gnunet-service-core_kx.c.
| #define AEAD_KEY_BYTES crypto_aead_xchacha20poly1305_ietf_KEYBYTES |
libsodium has very long symbol names
Definition at line 77 of file gnunet-service-core_kx.c.
| #define AEAD_NONCE_BYTES crypto_aead_xchacha20poly1305_ietf_NPUBBYTES |
libsodium has very long symbol names
Definition at line 82 of file gnunet-service-core_kx.c.
| #define AEAD_TAG_BYTES crypto_aead_xchacha20poly1305_ietf_ABYTES |
libsodium has very long symbol names
Definition at line 87 of file gnunet-service-core_kx.c.
| #define RESEND_TIMEOUT GNUNET_TIME_relative_multiply (GNUNET_TIME_UNIT_SECONDS, 1) |
Initial handshake retransmission timer.
RFC 9147, Section 5.8: "implementations SHOULD use an initial timer value of 1000 ms and double the value at each retransmission, up to no less than 60 seconds."
Definition at line 94 of file gnunet-service-core_kx.c.
| #define RESEND_TIMEOUT_MAX GNUNET_TIME_relative_multiply (GNUNET_TIME_UNIT_SECONDS, 60) |
Ceiling for the handshake retransmission timer (RFC 9147, Section 5.8).
Definition at line 100 of file gnunet-service-core_kx.c.
| #define REPLAY_WINDOW_SIZE 64 |
Size of the per-epoch anti-replay window, in records.
RFC 9147, Section 4.5.1: "The receiver SHOULD pick a window large enough to handle any plausible reordering, which depends on the data rate." One machine word is the largest window we can check in constant time.
Definition at line 109 of file gnunet-service-core_kx.c.
| #define HEARTBEAT_PROBE_FREQUENCY GNUNET_TIME_relative_multiply (GNUNET_TIME_UNIT_SECONDS, 30) |
How long we wait for the Ack to a heartbeat before sending another one.
Every heartbeat is answered – handle_heartbeat() sends a GNUNET_MESSAGE_TYPE_CORE_ACK unconditionally – so this is also how long an association may go unconfirmed before we probe it again.
Definition at line 118 of file gnunet-service-core_kx.c.
| #define MAX_UNANSWERED_HEARTBEATS 3 |
How many heartbeats in a row may go unanswered before we give up on the association.
Together with HEARTBEAT_PROBE_FREQUENCY this bounds how long a dead association can look alive to us (90s).
Definition at line 126 of file gnunet-service-core_kx.c.
| #define MIN_HEARTBEAT_FREQUENCY GNUNET_TIME_relative_multiply (GNUNET_TIME_UNIT_SECONDS, 5) |
What is the minimum frequency for a HEARTBEAT message?
Definition at line 131 of file gnunet-service-core_kx.c.
| #define HEARTBEAT_FREQUENCY GNUNET_TIME_relative_multiply (GNUNET_TIME_UNIT_HOURS, 12) |
How often do we send a heartbeat?
Definition at line 137 of file gnunet-service-core_kx.c.
| #define MAX_EPOCHS 10 |
Maximum number of epochs we keep on hand.
This implicitly defines the maximum age of messages we accept from other peers, depending on their rekey interval.
Definition at line 146 of file gnunet-service-core_kx.c.
| #define EPOCH_EXPIRATION GNUNET_TIME_relative_multiply (GNUNET_TIME_UNIT_HOURS, 12) |
How often do we rekey/switch to a new epoch?
Definition at line 151 of file gnunet-service-core_kx.c.
| #define REKEY_TOLERANCE GNUNET_TIME_relative_multiply (GNUNET_TIME_UNIT_MINUTES, 5) |
What time difference do we tolerate?
Definition at line 157 of file gnunet-service-core_kx.c.
| #define EARLY_DATA_STR "early data" |
String for expanding early transport secret (See https://lsd.gnunet.org/lsd0012/draft-schanzen-cake.html)
Definition at line 164 of file gnunet-service-core_kx.c.
| #define R_HS_TRAFFIC_STR "r hs traffic" |
String for expanding RHTS (See https://lsd.gnunet.org/lsd0012/draft-schanzen-cake.html)
Definition at line 170 of file gnunet-service-core_kx.c.
| #define I_HS_TRAFFIC_STR "i hs traffic" |
String for expanding IHTS (See https://lsd.gnunet.org/lsd0012/draft-schanzen-cake.html)
Definition at line 176 of file gnunet-service-core_kx.c.
| #define R_AP_TRAFFIC_STR "r ap traffic" |
String for expanding RATS (See https://lsd.gnunet.org/lsd0012/draft-schanzen-cake.html)
Definition at line 182 of file gnunet-service-core_kx.c.
| #define I_AP_TRAFFIC_STR "i ap traffic" |
String for expanding IATS (See https://lsd.gnunet.org/lsd0012/draft-schanzen-cake.html)
Definition at line 188 of file gnunet-service-core_kx.c.
| #define DERIVED_STR "derived" |
String for expanding derived keys (Handshake and Early) (See https://lsd.gnunet.org/lsd0012/draft-schanzen-cake.html)
Definition at line 194 of file gnunet-service-core_kx.c.
| #define R_FINISHED_STR "r finished" |
String for expanding fk_R used for ResponderFinished field (See https://lsd.gnunet.org/lsd0012/draft-schanzen-cake.html)
Definition at line 200 of file gnunet-service-core_kx.c.
| #define I_FINISHED_STR "i finished" |
String for expanding fk_I used for InitiatorFinished field (See https://lsd.gnunet.org/lsd0012/draft-schanzen-cake.html)
Definition at line 206 of file gnunet-service-core_kx.c.
| #define CAKE_LABEL "cake10" |
Labeled expand label for CAKE.
Definition at line 211 of file gnunet-service-core_kx.c.
| #define KEY_STR "key" |
String for expanding derived keys (Handshake and Early) (See https://lsd.gnunet.org/lsd0012/draft-schanzen-cake.html)
Definition at line 217 of file gnunet-service-core_kx.c.
| #define TRAFFIC_UPD_STR "traffic upd" |
String for expanding derived keys (Handshake and Early) (See https://lsd.gnunet.org/lsd0012/draft-schanzen-cake.html)
Definition at line 223 of file gnunet-service-core_kx.c.
| #define IV_STR "iv" |
String for expanding derived keys (Handshake and Early) (See https://lsd.gnunet.org/lsd0012/draft-schanzen-cake.html)
Definition at line 229 of file gnunet-service-core_kx.c.
| enum GSC_KX_Role |
Indicates whether a peer is in the initiating or receiving role.
| Enumerator | |
|---|---|
| ROLE_INITIATOR | |
| ROLE_RESPONDER | |
Definition at line 235 of file gnunet-service-core_kx.c.
|
static |
Definition at line 517 of file gnunet-service-core_kx.c.
References p.
Referenced by cleanup_handshake_secrets().
|
static |
Definition at line 532 of file gnunet-service-core_kx.c.
References buffer_clear(), GSC_KeyExchangeInfo::early_secret_key, GSC_KeyExchangeInfo::early_traffic_secret, GSC_KeyExchangeInfo::handshake_secret, GSC_KeyExchangeInfo::ihts, GSC_KeyExchangeInfo::master_secret, GSC_KeyExchangeInfo::rhts, GSC_KeyExchangeInfo::sk_e, GSC_KeyExchangeInfo::ss_e, GSC_KeyExchangeInfo::ss_I, and GSC_KeyExchangeInfo::ss_R.
Referenced by check_if_ack_or_heartbeat(), handle_initiator_done(), and reset_handshake().
|
static |
Forget the anti-replay window of epoch.
Called when the key material behind that slot of the epoch ring is replaced, either by a new association or by advancing past it, so that a sequence number is never checked against a window belonging to a different key.
| kx | key exchange to update |
| epoch | epoch whose window to clear |
Definition at line 567 of file gnunet-service-core_kx.c.
References MAX_EPOCHS, GSC_KeyExchangeInfo::replay_bitmap, and GSC_KeyExchangeInfo::replay_max.
Referenced by handle_encrypted_message().
|
static |
Forget every anti-replay window (all of MAX_EPOCHS).
| kx | key exchange to update |
Definition at line 581 of file gnunet-service-core_kx.c.
References GSC_KeyExchangeInfo::replay_bitmap, and GSC_KeyExchangeInfo::replay_max.
Referenced by abandon_exchange(), handle_initiator_done(), and handle_responder_hello_cont().
|
static |
Would a record with sequence number sqn in epoch be a replay?
RFC 9147, Section 4.5.1. Note this only checks: the window must not be updated until the record has been deprotected successfully, which is what replay_commit() is for.
| kx | key exchange the record arrived on |
| epoch | epoch the record claims |
| sqn | sequence number the record claims |
Definition at line 602 of file gnunet-service-core_kx.c.
References GNUNET_OK, GNUNET_SYSERR, max, MAX_EPOCHS, GSC_KeyExchangeInfo::replay_bitmap, GSC_KeyExchangeInfo::replay_max, and REPLAY_WINDOW_SIZE.
Referenced by handle_encrypted_message().
|
static |
Record that a record with sequence number sqn in epoch has been deprotected successfully, sliding the window right if needed.
| kx | key exchange the record arrived on |
| epoch | epoch of the record |
| sqn | sequence number of the record |
Definition at line 630 of file gnunet-service-core_kx.c.
References max, MAX_EPOCHS, GSC_KeyExchangeInfo::replay_bitmap, GSC_KeyExchangeInfo::replay_max, and REPLAY_WINDOW_SIZE.
Referenced by handle_encrypted_message().
|
static |
Definition at line 653 of file gnunet-service-core_kx.c.
References GNUNET_CRYPTO_hash_context_copy(), and GNUNET_CRYPTO_hash_context_finish().
Referenced by handle_initiator_done(), handle_initiator_hello_cont(), handle_responder_hello(), handle_responder_hello_cont(), send_initiator_hello(), and send_responder_hello().
|
static |
Inform all monitors about the KX state of the given peer.
| kx | key exchange state to inform about |
Definition at line 669 of file gnunet-service-core_kx.c.
References GNUNET_MESSAGE_TYPE_CORE_MONITOR_NOTIFY, GNUNET_NO, GNUNET_notification_context_broadcast(), GNUNET_TIME_absolute_hton(), GSC_KeyExchangeInfo::last_notify_timeout, msg, nc, GSC_KeyExchangeInfo::peer, GNUNET_MessageHeader::size, GSC_KeyExchangeInfo::status, GSC_KeyExchangeInfo::timeout, and GNUNET_MessageHeader::type.
Referenced by check_if_ack_or_heartbeat(), handle_initiator_done(), handle_initiator_hello_cont(), handle_responder_hello_cont(), handle_transport_notify_disconnect(), restart_kx(), send_heartbeat(), send_initiator_hello(), send_responder_hello(), and update_timeout().
|
static |
Definition at line 957 of file gnunet-service-core_kx.c.
References abandon_exchange(), gettext_noop, GNUNET_assert, GNUNET_CORE_KX_STATE_AWAIT_INITIATION, GNUNET_CRYPTO_hash(), GNUNET_CRYPTO_hash_cmp(), GNUNET_ERROR_TYPE_DEBUG, GNUNET_i2s(), GNUNET_log, GNUNET_NO, GNUNET_PILS_get_identity_hash(), GNUNET_STATISTICS_update(), GSC_pils, GSC_stats, monitor_notify_all(), GSC_KeyExchangeInfo::peer, GSC_KeyExchangeInfo::role, ROLE_INITIATOR, ROLE_RESPONDER, send_initiator_hello(), and GSC_KeyExchangeInfo::status.
Referenced by check_rekey(), handle_encrypted_message(), handle_initiator_hello_cont(), handle_responder_hello(), handle_responder_hello_cont(), handle_transport_notify_connect(), resend_initiator_done(), resend_initiator_hello(), resend_responder_hello(), and send_heartbeat().
|
static |
Task triggered when a neighbour entry is about to time out (and we should prevent this by sending an Ack in response to a heartbeat).
| cls | the struct GSC_KeyExchangeInfo |
Definition at line 694 of file gnunet-service-core_kx.c.
References GSC_KeyExchangeInfo::association_up, Heartbeat::flags, gettext_noop, GNUNET_CORE_KX_STATE_DOWN, GNUNET_ERROR_TYPE_DEBUG, GNUNET_ERROR_TYPE_INFO, GNUNET_i2s(), GNUNET_log, GNUNET_MESSAGE_TYPE_CORE_HEARTBEAT, GNUNET_NO, GNUNET_SCHEDULER_add_delayed(), GNUNET_STATISTICS_update(), GNUNET_TIME_absolute_get_remaining(), GNUNET_TIME_relative_max(), GNUNET_TIME_relative_min(), GNUNET_YES, GSC_KX_encrypt_and_transmit(), GSC_SESSIONS_end(), GSC_stats, Heartbeat::header, HEARTBEAT_PROBE_FREQUENCY, GSC_KeyExchangeInfo::heartbeat_task, GSC_KeyExchangeInfo::heartbeats_unanswered, MAX_UNANSWERED_HEARTBEATS, MIN_HEARTBEAT_FREQUENCY, monitor_notify_all(), GSC_KeyExchangeInfo::peer, GNUNET_TIME_Relative::rel_value_us, restart_kx(), send_heartbeat(), GNUNET_MessageHeader::size, GSC_KeyExchangeInfo::status, GSC_KeyExchangeInfo::timeout, and GNUNET_MessageHeader::type.
Referenced by send_heartbeat(), and update_timeout().
|
static |
We've seen a valid message from the other peer.
Update the time when the session would time out and delay sending our keep alive message further.
| kx | key exchange where we saw activity |
Definition at line 765 of file gnunet-service-core_kx.c.
References delta, GNUNET_CONSTANTS_IDLE_CONNECTION_TIMEOUT, GNUNET_SCHEDULER_add_delayed(), GNUNET_SCHEDULER_cancel(), GNUNET_TIME_absolute_get_difference(), GNUNET_TIME_relative_to_absolute(), HEARTBEAT_PROBE_FREQUENCY, GSC_KeyExchangeInfo::heartbeat_task, GSC_KeyExchangeInfo::heartbeats_unanswered, GSC_KeyExchangeInfo::last_notify_timeout, monitor_notify_all(), GNUNET_TIME_Relative::rel_value_us, send_heartbeat(), and GSC_KeyExchangeInfo::timeout.
Referenced by check_if_ack_or_heartbeat(), handle_encrypted_message(), handle_heartbeat(), and handle_initiator_done().
|
static |
Send initiator hello.
| kx | key exchange context |
Definition at line 3267 of file gnunet-service-core_kx.c.
References AEAD_KEY_BYTES, AEAD_NONCE_BYTES, AEAD_TAG_BYTES, InitiatorHello::c_R, derive_es_ets(), derive_per_message_secrets(), GSC_KeyExchangeInfo::early_secret_key, GSC_KeyExchangeInfo::early_traffic_secret, GNUNET_CRYPTO_HpkePrivateKey::ecdhe_key, GNUNET_CRYPTO_HpkePublicKey::ecdhe_key, env, GNUNET_assert, GNUNET_CORE_CLASS_UNKNOWN, GNUNET_CORE_KX_STATE_INITIATOR_HELLO_SENT, GNUNET_CRYPTO_ecdhe_key_create(), GNUNET_CRYPTO_ecdhe_key_get_public(), GNUNET_CRYPTO_eddsa_kem_encaps(), GNUNET_CRYPTO_hash(), GNUNET_CRYPTO_hash_context_abort(), GNUNET_CRYPTO_hash_context_read(), GNUNET_CRYPTO_hash_context_start(), GNUNET_CRYPTO_random_u64(), GNUNET_ERROR_TYPE_DEBUG, GNUNET_ERROR_TYPE_ERROR, GNUNET_log, GNUNET_memcpy, GNUNET_MESSAGE_TYPE_CORE_INITIATOR_HELLO, GNUNET_MQ_discard(), GNUNET_MQ_msg_extra, GNUNET_MQ_send_copy(), GNUNET_OK, GNUNET_PILS_get_identity(), GSC_pils, InitiatorHello::h_pk_R, monitor_notify_all(), GSC_KeyExchangeInfo::mq, my_identity, my_services_info, GSC_KeyExchangeInfo::peer, InitiatorHelloPayload::peer_class, GSC_KeyExchangeInfo::pk_e, InitiatorHello::pk_e, InitiatorHelloPayload::pk_I, GNUNET_PeerIdentity::public_key, InitiatorHello::r_I, GSC_KeyExchangeInfo::resend_env, resend_initiator_hello(), ret, GSC_KeyExchangeInfo::role, GSC_KeyExchangeInfo::sk_e, snapshot_transcript(), GSC_KeyExchangeInfo::ss_R, start_resend(), GSC_KeyExchangeInfo::status, and GSC_KeyExchangeInfo::transcript_hash_ctx.
Referenced by restart_kx().
|
static |
Deliver P2P message to interested clients.
Invokes send twice, once for clients that want the full message, and once for clients that only want the header
| cls | the struct GSC_KeyExchangeInfo |
| m | the message |
Definition at line 816 of file gnunet-service-core_kx.c.
References GNUNET_CORE_OPTION_SEND_FULL_INBOUND, GNUNET_CORE_OPTION_SEND_HDR_INBOUND, GNUNET_ERROR_TYPE_DEBUG, GNUNET_i2s(), GNUNET_log, GNUNET_OK, GSC_CLIENTS_deliver_message(), m, and GSC_KeyExchangeInfo::peer.
Referenced by handle_transport_notify_connect().
|
static |
Arm resend_task for the next retransmission of the flight in resend_env and back the timer off for the one after that.
RFC 9147, Section 5.8: "implementations SHOULD use an initial timer value of 1000 ms and double the value at each retransmission, up to no less than 60 seconds."
| kx | key exchange whose flight to schedule |
| cb | task to run when the timer fires |
Definition at line 848 of file gnunet-service-core_kx.c.
References GNUNET_assert, GNUNET_SCHEDULER_add_delayed(), GNUNET_TIME_relative_min(), GNUNET_TIME_relative_multiply(), GSC_KeyExchangeInfo::resend_delay, GSC_KeyExchangeInfo::resend_task, and RESEND_TIMEOUT_MAX.
Referenced by resend_initiator_done(), resend_initiator_hello(), resend_responder_hello(), and start_resend().
|
static |
Start a handshake flight: kx will retransmit it RESEND_MAX_TRIES times, starting after RESEND_TIMEOUT and backing off from there.
| kx | key exchange whose flight to start |
| cb | task to run when the timer fires |
Definition at line 868 of file gnunet-service-core_kx.c.
References GSC_KeyExchangeInfo::resend_delay, RESEND_MAX_TRIES, RESEND_TIMEOUT, GSC_KeyExchangeInfo::resend_tries_left, and schedule_resend().
Referenced by handle_responder_hello_cont(), send_initiator_hello(), and send_responder_hello().
|
static |
Discard the state of the handshake kx is in the middle of, so that a new one can be started.
Deliberately leaves the session – traffic keys, heartbeat_task, timeout, what clients were told – alone: those stay valid until a new handshake actually completes.
| kx | key exchange whose handshake state to drop |
Definition at line 886 of file gnunet-service-core_kx.c.
References cleanup_handshake_secrets(), GNUNET_CRYPTO_hash_context_abort(), GNUNET_MQ_discard(), GNUNET_SCHEDULER_cancel(), GSC_KeyExchangeInfo::ih_hash, GSC_KeyExchangeInfo::resend_env, GSC_KeyExchangeInfo::resend_task, GSC_KeyExchangeInfo::rh_hash, and GSC_KeyExchangeInfo::transcript_hash_ctx.
Referenced by abandon_exchange(), and handle_initiator_hello().
|
static |
Give up on the exchange kx is in and on the session it may have established, and return it to a state in which a fresh handshake can be run.
Leaves kx in GNUNET_CORE_KX_STATE_DOWN without notifying monitors; every caller either moves on to a new state right away or notifies itself.
| kx | key exchange to reset |
Definition at line 928 of file gnunet-service-core_kx.c.
References GSC_KeyExchangeInfo::association_up, GSC_KeyExchangeInfo::current_epoch, GSC_KeyExchangeInfo::current_sqn, GNUNET_CORE_KX_STATE_DOWN, GNUNET_NO, GNUNET_SCHEDULER_cancel(), GSC_SESSIONS_end(), GSC_KeyExchangeInfo::heartbeat_task, GSC_KeyExchangeInfo::heartbeats_unanswered, GSC_KeyExchangeInfo::peer, replay_reset_all(), reset_handshake(), GSC_KeyExchangeInfo::status, and GSC_KeyExchangeInfo::their_max_epoch.
Referenced by restart_kx().
|
static |
Function called by transport to notify us that a peer connected to us (on the network level).
Starts the key exchange with the given peer.
| cls | closure (NULL) |
| mq | message queue towards peer |
| peer_id | (optional, may be NULL) the peer id of the connecting peer |
Definition at line 1020 of file gnunet-service-core_kx.c.
References deliver_message(), GNUNET_assert, GNUNET_CONTAINER_DLL_insert, GNUNET_ERROR_TYPE_DEBUG, GNUNET_i2s(), GNUNET_log, GNUNET_memcpy, GNUNET_MST_create(), GNUNET_new, GNUNET_PILS_get_identity(), GSC_pils, kx_head, kx_tail, mq, GSC_KeyExchangeInfo::mq, GSC_KeyExchangeInfo::mst, my_identity, GSC_KeyExchangeInfo::peer, peer_id, and restart_kx().
Referenced by GSC_KX_start().
|
static |
TODO propose a new scheme: don't choose an initiator and responder based on hashing the peer ids, but: let each peer be their own initiator (and responder) when opening a channel towards another peer.
It should be fine to have two channels in 'both directions' (one as responder, one as initiator) under the hood. This can be opaque to the upper layers. FIXME: (MSC) This is probably a bad idea in terms of security of the AKE! Schedule for
Forwarding: Deriving Messages -> pk_e -> c_R -> r_I -> H(pk_R) -> ETS -> {pk_I, svcinfo_I}ETS -------------------------------------------------— send InitiatorHello -> c_e -> r_R -> *HTS -> {svcinfo_R, c_I}RHTS -> finished_R -> {finished_R}RHTS -> finished_I -> RATS_0 -> [{payload}RATS] -------------------------------------------------— send ResponderHello -> {finished_I}IHTS -> IATS_0 -------------------------------------------------— send InitiatorDone
Definition at line 1097 of file gnunet-service-core_kx.c.
References CAKE_LABEL, EARLY_DATA_STR, GNUNET_assert, GNUNET_CRYPTO_hkdf_expand, GNUNET_CRYPTO_hkdf_extract(), GNUNET_CRYPTO_kdf_arg_auto, GNUNET_CRYPTO_kdf_arg_string, GNUNET_ERROR_TYPE_ERROR, GNUNET_log, GNUNET_OK, ret, and GSC_KeyExchangeInfo::ss_R.
Referenced by handle_initiator_hello_cont(), and send_initiator_hello().
|
static |
Definition at line 1136 of file gnunet-service-core_kx.c.
References CAKE_LABEL, GNUNET_assert, GNUNET_CRYPTO_hkdf_expand, GNUNET_CRYPTO_kdf_arg_string, and GNUNET_OK.
Referenced by GSC_KX_encrypt_and_transmit(), and handle_encrypted_message().
|
static |
Derive the handshake secret.
| kx | key exchange info |
Definition at line 1155 of file gnunet-service-core_kx.c.
References CAKE_LABEL, DERIVED_STR, GNUNET_assert, GNUNET_B2S, GNUNET_CRYPTO_hkdf_expand, GNUNET_CRYPTO_hkdf_extract(), GNUNET_CRYPTO_kdf_arg_string, GNUNET_ERROR_TYPE_DEBUG, GNUNET_ERROR_TYPE_ERROR, GNUNET_log, GNUNET_OK, and ret.
Referenced by handle_responder_hello(), and send_responder_hello().
|
static |
Derive the initiator handshake secret.
| kx | key exchange info |
Definition at line 1201 of file gnunet-service-core_kx.c.
References CAKE_LABEL, GNUNET_assert, GNUNET_CRYPTO_hkdf_expand, GNUNET_CRYPTO_kdf_arg_auto, GNUNET_CRYPTO_kdf_arg_string, GNUNET_OK, and I_HS_TRAFFIC_STR.
Referenced by handle_responder_hello(), and send_responder_hello().
|
static |
Derive the responder handshake secret.
| kx | key exchange info |
Definition at line 1221 of file gnunet-service-core_kx.c.
References CAKE_LABEL, GNUNET_assert, GNUNET_CRYPTO_hkdf_expand, GNUNET_CRYPTO_kdf_arg_auto, GNUNET_CRYPTO_kdf_arg_string, GNUNET_OK, and R_HS_TRAFFIC_STR.
Referenced by handle_responder_hello(), and send_responder_hello().
|
static |
Derive the master secret.
| kx | key exchange info |
Definition at line 1241 of file gnunet-service-core_kx.c.
References CAKE_LABEL, DERIVED_STR, GNUNET_assert, GNUNET_CRYPTO_hkdf_expand, GNUNET_CRYPTO_hkdf_extract(), GNUNET_CRYPTO_kdf_arg_string, GNUNET_ERROR_TYPE_ERROR, GNUNET_log, GNUNET_OK, and ret.
Referenced by handle_responder_hello_cont(), and send_responder_hello().
|
static |
Generate per record nonce as per https://www.rfc-editor.org/rfc/rfc8446#section-5.3 using per key nonce and sequence number.
Definition at line 1281 of file gnunet-service-core_kx.c.
References AEAD_NONCE_BYTES, and GNUNET_htonll().
Referenced by derive_per_message_secrets().
|
static |
key = HKDF-Expand [I,R][A,H]TS, "key", 32) nonce = HKDF-Expand ([I,R][A,H]TS, "iv", 24)
Definition at line 1306 of file gnunet-service-core_kx.c.
References AEAD_KEY_BYTES, AEAD_NONCE_BYTES, CAKE_LABEL, generate_per_record_nonce(), GNUNET_assert, GNUNET_CRYPTO_hkdf_expand, GNUNET_CRYPTO_kdf_arg_string, GNUNET_OK, IV_STR, key, and KEY_STR.
Referenced by GSC_KX_encrypt_and_transmit(), handle_encrypted_message(), handle_initiator_done(), handle_initiator_hello_cont(), handle_responder_hello(), handle_responder_hello_cont(), send_initiator_hello(), and send_responder_hello().
|
static |
Derive the next application secret.
| kx | key exchange info |
Definition at line 1341 of file gnunet-service-core_kx.c.
References CAKE_LABEL, GNUNET_assert, GNUNET_CRYPTO_hkdf_expand, GNUNET_CRYPTO_kdf_arg_string, GNUNET_ERROR_TYPE_ERROR, GNUNET_log, GNUNET_OK, ret, and TRAFFIC_UPD_STR.
Referenced by check_rekey(), handle_encrypted_message(), handle_heartbeat(), handle_initiator_done(), and handle_responder_hello_cont().
|
static |
Derive the initiator application secret.
| kx | key exchange info |
Definition at line 1367 of file gnunet-service-core_kx.c.
References CAKE_LABEL, GNUNET_assert, GNUNET_CRYPTO_hkdf_expand, GNUNET_CRYPTO_kdf_arg_auto, GNUNET_CRYPTO_kdf_arg_string, GNUNET_OK, I_AP_TRAFFIC_STR, R_AP_TRAFFIC_STR, and ROLE_INITIATOR.
Referenced by handle_initiator_done(), handle_responder_hello_cont(), and send_responder_hello().
|
static |
Generate the responder finished field.
| kx | key exchange info |
| result | location to which the responder finished field will be written to |
Definition at line 1396 of file gnunet-service-core_kx.c.
References CAKE_LABEL, GNUNET_assert, GNUNET_CRYPTO_hkdf_expand, GNUNET_CRYPTO_hmac(), GNUNET_CRYPTO_kdf_arg_string, GNUNET_ERROR_TYPE_ERROR, GNUNET_log, GNUNET_OK, R_FINISHED_STR, result, and ret.
Referenced by handle_responder_hello_cont(), and send_responder_hello().
|
static |
Generate the initiator finished field.
| kx | key exchange info |
| result | location to which the initiator finished field will be written to |
Definition at line 1430 of file gnunet-service-core_kx.c.
References CAKE_LABEL, GNUNET_assert, GNUNET_CRYPTO_hkdf_expand, GNUNET_CRYPTO_hmac(), GNUNET_CRYPTO_kdf_arg_string, GNUNET_ERROR_TYPE_ERROR, GNUNET_log, GNUNET_OK, I_FINISHED_STR, result, and ret.
Referenced by handle_initiator_done(), and handle_responder_hello_cont().
|
static |
Definition at line 1457 of file gnunet-service-core_kx.c.
References GNUNET_ERROR_TYPE_WARNING, GNUNET_log, GNUNET_MQ_send_copy(), GSC_KeyExchangeInfo::mq, GSC_KeyExchangeInfo::resend_env, resend_responder_hello(), GSC_KeyExchangeInfo::resend_task, GSC_KeyExchangeInfo::resend_tries_left, restart_kx(), and schedule_resend().
Referenced by resend_responder_hello(), and send_responder_hello().
| void send_responder_hello | ( | struct GSC_KeyExchangeInfo * | kx | ) |
Definition at line 1479 of file gnunet-service-core_kx.c.
References AEAD_KEY_BYTES, AEAD_NONCE_BYTES, AEAD_TAG_BYTES, ResponderHello::c_e, ResponderHelloPayload::c_I, GSC_KeyExchangeInfo::current_ats, GSC_KeyExchangeInfo::current_epoch, GSC_KeyExchangeInfo::current_sqn, derive_hs(), derive_ihts(), derive_initial_ats(), derive_ms(), derive_per_message_secrets(), derive_rhts(), GSC_KeyExchangeInfo::early_secret_key, env, finished, generate_responder_finished(), GNUNET_assert, GNUNET_CORE_KX_STATE_RESPONDER_HELLO_SENT, GNUNET_CRYPTO_eddsa_kem_encaps(), GNUNET_CRYPTO_hash_context_abort(), GNUNET_CRYPTO_hash_context_copy(), GNUNET_CRYPTO_hash_context_read(), GNUNET_CRYPTO_hpke_kem_encaps(), GNUNET_CRYPTO_random_u64(), GNUNET_ERROR_TYPE_DEBUG, GNUNET_ERROR_TYPE_ERROR, GNUNET_h2s(), GNUNET_log, GNUNET_memcpy, GNUNET_MESSAGE_TYPE_CORE_RESPONDER_HELLO, GNUNET_MQ_msg_extra, GNUNET_MQ_send_copy(), GNUNET_OK, GSC_KeyExchangeInfo::handshake_secret, GSC_KeyExchangeInfo::ihts, GSC_KeyExchangeInfo::master_secret, monitor_notify_all(), GSC_KeyExchangeInfo::mq, my_services_info, GSC_KeyExchangeInfo::peer, GSC_KeyExchangeInfo::pk_e, GNUNET_PeerIdentity::public_key, ResponderHello::r_R, GSC_KeyExchangeInfo::resend_env, resend_responder_hello(), ret, GSC_KeyExchangeInfo::rhts, GSC_KeyExchangeInfo::role, ROLE_RESPONDER, snapshot_transcript(), GSC_KeyExchangeInfo::ss_e, GSC_KeyExchangeInfo::ss_I, start_resend(), GSC_KeyExchangeInfo::status, GSC_KeyExchangeInfo::transcript_hash_ctx, and transport.
Referenced by handle_initiator_hello_cont().
|
static |
Finish handling the InitiatorHello ihm_e now that ss_R, the shared secret decapsulated with our peer identity's private key, is available.
| kx | key exchange the hello arrived on |
| ihm_e | the InitiatorHello, still owned by the message handler |
| ss_R | decapsulation of ihm_e's c_R |
Definition at line 1707 of file gnunet-service-core_kx.c.
References AEAD_KEY_BYTES, AEAD_NONCE_BYTES, AEAD_TAG_BYTES, DECRYPTION_FAILURES_LOG_LEVEL, derive_es_ets(), derive_per_message_secrets(), GSC_KeyExchangeInfo::early_secret_key, GSC_KeyExchangeInfo::early_traffic_secret, GNUNET_CRYPTO_HpkePublicKey::ecdhe_key, GNUNET_assert, GNUNET_break_op, GNUNET_CORE_KX_STATE_AWAIT_INITIATION, GNUNET_CRYPTO_hash(), GNUNET_CRYPTO_hash_cmp(), GNUNET_CRYPTO_hash_context_abort(), GNUNET_CRYPTO_hash_context_read(), GNUNET_ERROR_TYPE_DEBUG, GNUNET_ERROR_TYPE_WARNING, GNUNET_h2s(), GNUNET_i2s(), GNUNET_i2s2(), GNUNET_log, GNUNET_memcmp, GNUNET_memcpy, GNUNET_PILS_get_identity_hash(), GSC_pils, InitiatorHello::header, monitor_notify_all(), GSC_KeyExchangeInfo::peer, GSC_KeyExchangeInfo::pk_e, InitiatorHello::pk_e, InitiatorHelloPayload::pk_I, restart_kx(), ret, send_responder_hello(), GNUNET_MessageHeader::size, snapshot_transcript(), GSC_KeyExchangeInfo::ss_R, GSC_KeyExchangeInfo::status, GSC_KeyExchangeInfo::transcript_hash_ctx, and transport.
Referenced by handle_initiator_hello().
|
static |
Definition at line 1852 of file gnunet-service-core_kx.c.
References AEAD_TAG_BYTES, GNUNET_OK, GNUNET_SYSERR, m, and size.
|
static |
Handle the InitiatorHello message.
| cls | the key exchange info |
| ihm_e | InitiatorHello message |
Definition at line 1875 of file gnunet-service-core_kx.c.
References InitiatorHello::c_R, gettext_noop, GNUNET_assert, GNUNET_break, GNUNET_break_op, GNUNET_CORE_KX_STATE_AWAIT_INITIATION, GNUNET_CORE_KX_STATE_INITIATOR_HELLO_RECEIVED, GNUNET_CORE_KX_STATE_RESPONDER_HELLO_SENT, GNUNET_CRYPTO_eddsa_kem_decaps(), GNUNET_CRYPTO_hash(), GNUNET_CRYPTO_hash_context_abort(), GNUNET_CRYPTO_hash_context_start(), GNUNET_ERROR_TYPE_DEBUG, GNUNET_ERROR_TYPE_ERROR, GNUNET_ERROR_TYPE_INFO, GNUNET_ERROR_TYPE_WARNING, GNUNET_i2s(), GNUNET_log, GNUNET_memcmp, GNUNET_MQ_send_copy(), GNUNET_NO, GNUNET_OK, GNUNET_PILS_get_identity_hash(), GNUNET_PILS_get_private_key(), GNUNET_STATISTICS_update(), GSC_pils, GSC_stats, InitiatorHello::h_pk_R, handle_initiator_hello_cont(), InitiatorHello::header, GSC_KeyExchangeInfo::ih_hash, GSC_KeyExchangeInfo::mq, my_private_key, GSC_KeyExchangeInfo::peer, GSC_KeyExchangeInfo::resend_env, reset_handshake(), GSC_KeyExchangeInfo::role, ROLE_INITIATOR, GNUNET_MessageHeader::size, GSC_KeyExchangeInfo::status, GSC_KeyExchangeInfo::transcript_hash_ctx, and transport.
|
static |
Definition at line 2112 of file gnunet-service-core_kx.c.
References GNUNET_ERROR_TYPE_WARNING, GNUNET_log, GNUNET_MQ_send_copy(), GSC_KeyExchangeInfo::mq, GSC_KeyExchangeInfo::resend_env, resend_initiator_done(), GSC_KeyExchangeInfo::resend_task, GSC_KeyExchangeInfo::resend_tries_left, restart_kx(), and schedule_resend().
Referenced by handle_responder_hello_cont(), and resend_initiator_done().
|
static |
Finish handling a ResponderHello now that ss_I, the shared secret decapsulated with our peer identity's private key, is available.
Takes ownership of rh_ctx.
| rh_ctx | state accumulated by handle_responder_hello() |
| ss_I | decapsulation of the ResponderHello's c_I |
Definition at line 2143 of file gnunet-service-core_kx.c.
References AEAD_KEY_BYTES, AEAD_NONCE_BYTES, AEAD_TAG_BYTES, GSC_KeyExchangeInfo::association_up, GSC_KeyExchangeInfo::current_ats, GSC_KeyExchangeInfo::current_epoch, GSC_KeyExchangeInfo::current_epoch_expiration, GSC_KeyExchangeInfo::current_sqn, ResponderHelloCls::decrypted_finish, derive_initial_ats(), derive_ms(), derive_next_ats(), derive_per_message_secrets(), env, EPOCH_EXPIRATION, InitiatorDone::finished, ResponderHelloCls::finished_enc, generate_initiator_finished(), generate_responder_finished(), GNUNET_assert, GNUNET_break_op, GNUNET_CORE_KX_STATE_INITIATOR_DONE_SENT, GNUNET_CRYPTO_hash_context_abort(), GNUNET_CRYPTO_hash_context_read(), GNUNET_ERROR_TYPE_DEBUG, GNUNET_ERROR_TYPE_WARNING, GNUNET_free, GNUNET_h2s(), GNUNET_i2s(), GNUNET_log, GNUNET_MESSAGE_TYPE_CORE_ACK, GNUNET_MESSAGE_TYPE_CORE_INITIATOR_DONE, GNUNET_MQ_msg_extra, GNUNET_MQ_send_copy(), GNUNET_TIME_relative_to_absolute(), GNUNET_YES, GSC_KeyExchangeInfo::handshake_secret, ResponderHelloCls::hc, ConfirmationAck::header, ResponderHelloCls::hs, GSC_KeyExchangeInfo::ihts, ResponderHelloCls::ihts, ResponderHelloCls::kx, GSC_KeyExchangeInfo::master_secret, MAX_EPOCHS, monitor_notify_all(), GSC_KeyExchangeInfo::mq, GSC_KeyExchangeInfo::peer, replay_reset_all(), GSC_KeyExchangeInfo::resend_env, resend_initiator_done(), restart_kx(), ResponderHelloCls::rhp, GSC_KeyExchangeInfo::rhts, ResponderHelloCls::rhts, GSC_KeyExchangeInfo::role, ROLE_INITIATOR, ROLE_RESPONDER, GNUNET_MessageHeader::size, snapshot_transcript(), GSC_KeyExchangeInfo::ss_e, ResponderHelloCls::ss_e, GSC_KeyExchangeInfo::ss_I, start_resend(), GSC_KeyExchangeInfo::status, GSC_KeyExchangeInfo::their_ats, GSC_KeyExchangeInfo::their_max_epoch, GSC_KeyExchangeInfo::transcript_hash_ctx, transport, and GNUNET_MessageHeader::type.
Referenced by handle_responder_hello().
|
static |
Definition at line 2338 of file gnunet-service-core_kx.c.
References AEAD_TAG_BYTES, GNUNET_OK, GNUNET_SYSERR, m, and size.
|
static |
Handle Responder Hello message.
| cls | key exchange info |
| rhm_e | ResponderHello message |
Definition at line 2359 of file gnunet-service-core_kx.c.
References AEAD_KEY_BYTES, AEAD_NONCE_BYTES, AEAD_TAG_BYTES, ResponderHello::c_e, ResponderHelloPayload::c_I, ResponderHelloCls::decrypted_finish, DECRYPTION_FAILURES_LOG_LEVEL, derive_hs(), derive_ihts(), derive_per_message_secrets(), derive_rhts(), GSC_KeyExchangeInfo::early_secret_key, ResponderHelloCls::finished_enc, gettext_noop, GNUNET_assert, GNUNET_break_op, GNUNET_CORE_KX_STATE_INITIATOR_DONE_SENT, GNUNET_CORE_KX_STATE_INITIATOR_HELLO_SENT, GNUNET_CRYPTO_eddsa_kem_decaps(), GNUNET_CRYPTO_hash(), GNUNET_CRYPTO_hash_context_abort(), GNUNET_CRYPTO_hash_context_copy(), GNUNET_CRYPTO_hash_context_read(), GNUNET_CRYPTO_hpke_kem_decaps(), GNUNET_ERROR_TYPE_DEBUG, GNUNET_ERROR_TYPE_ERROR, GNUNET_ERROR_TYPE_WARNING, GNUNET_free, GNUNET_h2s(), GNUNET_i2s(), GNUNET_log, GNUNET_malloc, GNUNET_memcmp, GNUNET_memcpy, GNUNET_MQ_discard(), GNUNET_MQ_send_copy(), GNUNET_new, GNUNET_NO, GNUNET_OK, GNUNET_PILS_get_private_key(), GNUNET_SCHEDULER_cancel(), GNUNET_STATISTICS_update(), GSC_pils, GSC_stats, handle_responder_hello_cont(), ResponderHelloCls::hc, ResponderHello::header, ResponderHelloCls::hs, ResponderHelloCls::ihts, ResponderHelloCls::kx, GSC_KeyExchangeInfo::mq, my_private_key, GSC_KeyExchangeInfo::peer, GSC_KeyExchangeInfo::resend_env, GSC_KeyExchangeInfo::resend_task, restart_kx(), ret, GSC_KeyExchangeInfo::rh_hash, ResponderHelloCls::rhm_e, ResponderHelloCls::rhp, ResponderHelloCls::rhts, GSC_KeyExchangeInfo::role, ROLE_RESPONDER, GNUNET_MessageHeader::size, GSC_KeyExchangeInfo::sk_e, snapshot_transcript(), ResponderHelloCls::ss_e, GSC_KeyExchangeInfo::status, GSC_KeyExchangeInfo::transcript_hash_ctx, and transport.
|
static |
Definition at line 2589 of file gnunet-service-core_kx.c.
References GNUNET_OK, GNUNET_SYSERR, m, and size.
|
static |
Handle InitiatorDone message.
| cls | key exchange info |
| idm_e | InitiatorDone message |
FIXME we do not really have to calculate all this now
Definition at line 2607 of file gnunet-service-core_kx.c.
References AEAD_KEY_BYTES, AEAD_NONCE_BYTES, AEAD_TAG_BYTES, GSC_KeyExchangeInfo::association_up, GSC_KeyExchangeInfo::class, cleanup_handshake_secrets(), GSC_KeyExchangeInfo::current_epoch, GSC_KeyExchangeInfo::current_epoch_expiration, GSC_KeyExchangeInfo::current_sqn, DECRYPTION_FAILURES_LOG_LEVEL, derive_initial_ats(), derive_next_ats(), derive_per_message_secrets(), EPOCH_EXPIRATION, InitiatorDone::finished, generate_initiator_finished(), GNUNET_break_op, GNUNET_CORE_KX_STATE_RESPONDER_CONNECTED, GNUNET_CORE_KX_STATE_RESPONDER_HELLO_SENT, GNUNET_CRYPTO_hash_context_abort(), GNUNET_CRYPTO_hash_context_copy(), GNUNET_CRYPTO_hash_context_read(), GNUNET_ERROR_TYPE_DEBUG, GNUNET_ERROR_TYPE_ERROR, GNUNET_ERROR_TYPE_WARNING, GNUNET_h2s(), GNUNET_i2s(), GNUNET_log, GNUNET_memcpy, GNUNET_MESSAGE_TYPE_CORE_ACK, GNUNET_MQ_discard(), GNUNET_SCHEDULER_cancel(), GNUNET_TIME_relative_to_absolute(), GNUNET_YES, GSC_KX_encrypt_and_transmit(), GSC_SESSIONS_create(), GSC_SESSIONS_end(), ConfirmationAck::header, GSC_KeyExchangeInfo::heartbeat_task, GSC_KeyExchangeInfo::ihts, GSC_KeyExchangeInfo::master_secret, MAX_EPOCHS, monitor_notify_all(), GSC_KeyExchangeInfo::peer, replay_reset_all(), GSC_KeyExchangeInfo::resend_env, GSC_KeyExchangeInfo::resend_task, ret, GSC_KeyExchangeInfo::role, ROLE_INITIATOR, GNUNET_MessageHeader::size, snapshot_transcript(), GSC_KeyExchangeInfo::status, GSC_KeyExchangeInfo::their_ats, GSC_KeyExchangeInfo::their_max_epoch, GSC_KeyExchangeInfo::transcript_hash_ctx, transport, GNUNET_MessageHeader::type, and update_timeout().
|
static |
Check an incoming encrypted message before handling it.
| cls | key exchange info |
| m | the encrypted message |
Definition at line 2828 of file gnunet-service-core_kx.c.
References GNUNET_break_op, GNUNET_OK, GNUNET_SYSERR, m, and size.
|
static |
Handle a key update.
| cls | key exchange info |
| m | KeyUpdate message |
Definition at line 2850 of file gnunet-service-core_kx.c.
References GSC_KeyExchangeInfo::current_ats, GSC_KeyExchangeInfo::current_epoch, GSC_KeyExchangeInfo::current_epoch_expiration, GSC_KeyExchangeInfo::current_sqn, derive_next_ats(), EPOCH_EXPIRATION, GNUNET_ERROR_TYPE_WARNING, GNUNET_log, GNUNET_MESSAGE_TYPE_CORE_ACK, GNUNET_TIME_relative_to_absolute(), GSC_HEARTBEAT_KEY_UPDATE_REQUESTED, GSC_KX_encrypt_and_transmit(), ConfirmationAck::header, m, GNUNET_MessageHeader::size, GNUNET_MessageHeader::type, and update_timeout().
Referenced by check_if_ack_or_heartbeat().
|
static |
Waiting for ACK or heartbeat
Definition at line 2889 of file gnunet-service-core_kx.c.
References GSC_KeyExchangeInfo::class, cleanup_handshake_secrets(), GSC_KeyExchangeInfo::current_epoch_expiration, EPOCH_EXPIRATION, GNUNET_CORE_KX_STATE_INITIATOR_CONNECTED, GNUNET_CORE_KX_STATE_INITIATOR_DONE_SENT, GNUNET_MESSAGE_TYPE_CORE_ACK, GNUNET_MESSAGE_TYPE_CORE_HEARTBEAT, GNUNET_MQ_discard(), GNUNET_NO, GNUNET_SCHEDULER_cancel(), GNUNET_TIME_relative_to_absolute(), GNUNET_YES, GSC_SESSIONS_create(), handle_heartbeat(), ConfirmationAck::header, Heartbeat::header, monitor_notify_all(), msg, GSC_KeyExchangeInfo::peer, GSC_KeyExchangeInfo::resend_env, GSC_KeyExchangeInfo::resend_task, GNUNET_MessageHeader::size, GSC_KeyExchangeInfo::status, GNUNET_MessageHeader::type, and update_timeout().
Referenced by handle_encrypted_message().
|
static |
handle an encrypted message
| cls | key exchange info |
| m | encrypted message |
Derive temporarily as we want to discard on decryption failure(s)
Prevent DoS FIXME maybe requires its own limit.
Definition at line 2948 of file gnunet-service-core_kx.c.
References AEAD_KEY_BYTES, AEAD_NONCE_BYTES, GSC_KeyExchangeInfo::association_up, check_if_ack_or_heartbeat(), derive_next_ats(), derive_per_message_secrets(), derive_sn(), EncryptedMessage::epoch, gettext_noop, GNUNET_ALIGN, GNUNET_break_op, GNUNET_CORE_KX_STATE_DOWN, GNUNET_CORE_KX_STATE_INITIATOR_DONE_SENT, GNUNET_ERROR_TYPE_DEBUG, GNUNET_ERROR_TYPE_INFO, GNUNET_ERROR_TYPE_WARNING, GNUNET_i2s(), GNUNET_log, GNUNET_MST_from_buffer(), GNUNET_NO, GNUNET_ntohll(), GNUNET_OK, GNUNET_print_bytes(), GNUNET_STATISTICS_update(), GNUNET_YES, GSC_stats, m, MAX_EPOCHS, GSC_KeyExchangeInfo::mst, GSC_KeyExchangeInfo::peer, replay_check(), replay_commit(), replay_reset(), restart_kx(), ret, size, GSC_KeyExchangeInfo::status, GSC_KeyExchangeInfo::their_ats, GSC_KeyExchangeInfo::their_max_epoch, transport, and update_timeout().
|
static |
Function called by transport telling us that a peer disconnected.
Stop key exchange with the given peer. Clean up key material.
| cls | closure |
| peer | the peer that disconnected |
| handler_cls | the struct GSC_KeyExchangeInfo of the peer |
Definition at line 3188 of file gnunet-service-core_kx.c.
References gettext_noop, GNUNET_CONTAINER_DLL_remove, GNUNET_CORE_KX_PEER_DISCONNECT, GNUNET_CRYPTO_hash_context_abort(), GNUNET_ERROR_TYPE_DEBUG, GNUNET_free, GNUNET_i2s(), GNUNET_log, GNUNET_MQ_discard(), GNUNET_MST_destroy(), GNUNET_NO, GNUNET_SCHEDULER_cancel(), GNUNET_STATISTICS_update(), GSC_SESSIONS_end(), GSC_stats, GSC_KeyExchangeInfo::heartbeat_task, kx_head, kx_tail, monitor_notify_all(), GSC_KeyExchangeInfo::mst, GSC_KeyExchangeInfo::peer, GSC_KeyExchangeInfo::resend_env, GSC_KeyExchangeInfo::resend_task, GSC_KeyExchangeInfo::status, and GSC_KeyExchangeInfo::transcript_hash_ctx.
Referenced by GSC_KX_start().
|
static |
Definition at line 3232 of file gnunet-service-core_kx.c.
References GNUNET_ERROR_TYPE_WARNING, GNUNET_i2s(), GNUNET_log, GNUNET_MQ_send_copy(), GSC_KeyExchangeInfo::mq, GSC_KeyExchangeInfo::peer, GSC_KeyExchangeInfo::resend_env, resend_initiator_hello(), GSC_KeyExchangeInfo::resend_task, GSC_KeyExchangeInfo::resend_tries_left, restart_kx(), and schedule_resend().
Referenced by resend_initiator_hello(), and send_initiator_hello().
|
static |
Move to the next epoch if the current one is exhausted.
| kx | key exchange to check |
Definition at line 3395 of file gnunet-service-core_kx.c.
References GNUNET_TIME_Absolute::abs_value_us, GSC_KeyExchangeInfo::current_ats, GSC_KeyExchangeInfo::current_epoch, GSC_KeyExchangeInfo::current_epoch_expiration, GSC_KeyExchangeInfo::current_sqn, derive_next_ats(), EPOCH_EXPIRATION, GNUNET_ERROR_TYPE_DEBUG, GNUNET_ERROR_TYPE_WARNING, GNUNET_i2s(), GNUNET_log, GNUNET_OK, GNUNET_SYSERR, GNUNET_TIME_absolute_is_past(), GNUNET_TIME_relative_to_absolute(), GSC_KeyExchangeInfo::peer, and restart_kx().
Referenced by GSC_KX_encrypt_and_transmit().
| void GSC_KX_encrypt_and_transmit | ( | struct GSC_KeyExchangeInfo * | kx, |
| const void * | payload, | ||
| size_t | payload_size | ||
| ) |
Encrypt and transmit payload.
Encrypt and transmit a message with the given payload.
| kx | key exchange info |
| payload | the payload |
| payload_size | size of the payload |
Definition at line 3439 of file gnunet-service-core_kx.c.
References AEAD_KEY_BYTES, AEAD_NONCE_BYTES, GSC_KeyExchangeInfo::association_up, check_rekey(), GSC_KeyExchangeInfo::current_ats, GSC_KeyExchangeInfo::current_epoch, GSC_KeyExchangeInfo::current_sqn, derive_per_message_secrets(), derive_sn(), env, EncryptedMessage::epoch, GNUNET_assert, GNUNET_break, GNUNET_ERROR_TYPE_DEBUG, GNUNET_ERROR_TYPE_ERROR, GNUNET_htonll(), GNUNET_log, GNUNET_MESSAGE_TYPE_CORE_ENCRYPTED_MESSAGE_CAKE, GNUNET_MQ_msg_extra, GNUNET_MQ_send(), GNUNET_NO, GNUNET_OK, GNUNET_print_bytes(), GNUNET_YES, GSC_KeyExchangeInfo::mq, payload, ret, EncryptedMessage::sequence_number, and EncryptedMessage::tag.
Referenced by handle_heartbeat(), handle_initiator_done(), send_heartbeat(), and try_transmission().
| void GSC_KX_start | ( | void | ) |
Definition at line 3539 of file gnunet-service-core_kx.c.
References _, GNUNET_assert, GNUNET_ERROR_TYPE_DEBUG, GNUNET_ERROR_TYPE_ERROR, GNUNET_log, GNUNET_MESSAGE_TYPE_CORE_ENCRYPTED_MESSAGE_CAKE, GNUNET_MESSAGE_TYPE_CORE_INITIATOR_DONE, GNUNET_MESSAGE_TYPE_CORE_INITIATOR_HELLO, GNUNET_MESSAGE_TYPE_CORE_RESPONDER_HELLO, GNUNET_MQ_handler_end, GNUNET_MQ_hd_var_size, GNUNET_notification_context_create(), GNUNET_OK, GNUNET_PILS_enable_private_key(), GNUNET_PILS_get_identity(), GNUNET_TRANSPORT_core_connect(), GSC_cfg, GSC_complete_initialization_cb(), GSC_KX_done(), GSC_pils, handle_transport_notify_connect(), handle_transport_notify_disconnect(), handlers, my_identity, nc, and transport.
Referenced by pid_change_cb().
| void pid_change_cb | ( | void * | cls, |
| const struct GNUNET_HELLO_Parser * | parser, | ||
| const struct GNUNET_HashCode * | hash | ||
| ) |
Definition at line 3610 of file gnunet-service-core_kx.c.
References GSC_KX_start(), and transport.
Referenced by GSC_KX_init().
| int GSC_KX_init | ( | void | ) |
Initialize KX subsystem.
Definition at line 3627 of file gnunet-service-core_kx.c.
References GNUNET_OK, GNUNET_PILS_connect(), GNUNET_SYSERR, GSC_cfg, GSC_KX_done(), GSC_pils, and pid_change_cb().
Referenced by run().
| void GSC_KX_done | ( | void | ) |
Shutdown KX subsystem.
Definition at line 3646 of file gnunet-service-core_kx.c.
References GNUNET_notification_context_destroy(), GNUNET_PILS_disconnect(), GNUNET_SCHEDULER_cancel(), GNUNET_TRANSPORT_core_disconnect(), GSC_pils, nc, rekey_task, and transport.
Referenced by GSC_KX_init(), GSC_KX_start(), and shutdown_task().
| unsigned int GSC_NEIGHBOURS_get_queue_length | ( | const struct GSC_KeyExchangeInfo * | kxinfo | ) |
Check how many messages are queued for the given neighbour.
| kxinfo | data about neighbour to check |
Definition at line 3678 of file gnunet-service-core_kx.c.
References GNUNET_MQ_get_length(), and GSC_KeyExchangeInfo::mq.
Referenced by try_transmission().
| int GSC_NEIGHBOURS_check_excess_bandwidth | ( | const struct GSC_KeyExchangeInfo * | target | ) |
Check if the given neighbour has excess bandwidth available.
| target | neighbour to check |
Definition at line 3685 of file gnunet-service-core_kx.c.
References GSC_KeyExchangeInfo::has_excess_bandwidth.
Referenced by try_transmission().
| void GSC_KX_handle_client_monitor_peers | ( | struct GNUNET_MQ_Handle * | mq | ) |
Handle GNUNET_MESSAGE_TYPE_CORE_MONITOR_PEERS request.
For this request type, the client does not have to have transmitted an INIT request. All current peers are returned, regardless of which message types they accept.
| mq | message queue to add for monitoring |
Definition at line 3700 of file gnunet-service-core_kx.c.
References env, GNUNET_CORE_KX_ITERATION_FINISHED, GNUNET_MESSAGE_TYPE_CORE_MONITOR_NOTIFY, GNUNET_MQ_msg, GNUNET_MQ_send(), GNUNET_notification_context_add(), GNUNET_TIME_absolute_hton(), GNUNET_TIME_UNIT_FOREVER_ABS, kx_head, mq, msg, nc, GSC_KeyExchangeInfo::next, GSC_KeyExchangeInfo::peer, MonitorNotifyMessage::state, GSC_KeyExchangeInfo::status, MonitorNotifyMessage::timeout, and GSC_KeyExchangeInfo::timeout.
Referenced by handle_client_monitor_peers().
|
static |
Transport service.
Definition at line 488 of file gnunet-service-core_kx.c.
Referenced by GSC_KX_done(), GSC_KX_start(), handle_encrypted_message(), handle_initiator_done(), handle_initiator_hello(), handle_initiator_hello_cont(), handle_responder_hello(), handle_responder_hello_cont(), pid_change_cb(), and send_responder_hello().
|
static |
DLL head.
Definition at line 493 of file gnunet-service-core_kx.c.
Referenced by GSC_KX_handle_client_monitor_peers(), handle_transport_notify_connect(), and handle_transport_notify_disconnect().
|
static |
DLL tail.
Definition at line 498 of file gnunet-service-core_kx.c.
Referenced by handle_transport_notify_connect(), and handle_transport_notify_disconnect().
|
static |
Task scheduled for periodic re-generation (and thus rekeying) of our ephemeral key.
Definition at line 504 of file gnunet-service-core_kx.c.
Referenced by GSC_KX_done().
|
static |
Notification context for broadcasting to monitors.
Definition at line 509 of file gnunet-service-core_kx.c.
Referenced by client_connect_cb(), client_connect_cb(), client_disconnect_cb(), client_disconnect_cb(), GNS_resolver_init(), GNUNET_BANDWIDTH_tracker_consume(), GNUNET_CORE_UNDERLAY_DUMMY_connect(), GNUNET_notification_context_add(), GNUNET_notification_context_broadcast(), GNUNET_notification_context_create(), GNUNET_notification_context_destroy(), GNUNET_notification_context_get_size(), GNUNET_TRANSPORT_TESTING_start_peer(), GSC_KX_done(), GSC_KX_handle_client_monitor_peers(), GSC_KX_start(), handle_block_cache(), handle_edit_record_set(), handle_edit_record_set_cancel(), handle_iteration_next(), handle_iteration_start(), handle_iteration_stop(), handle_lookup_block(), handle_monitor_next(), handle_monitor_start(), handle_mq_destroy(), handle_record_lookup(), handle_record_store(), handle_zone_to_name(), monitor_iteration_next(), monitor_notify_all(), run_zone_iteration_round(), send_lookup_response_with_filter(), send_store_response(), and store_record_set().
|
static |
Our services info string TODO.
Definition at line 514 of file gnunet-service-core_kx.c.
Referenced by send_initiator_hello(), and send_responder_hello().