26#ifndef GNUNET_SERVICE_CORE_KX_H
27#define GNUNET_SERVICE_CORE_KX_H
183 unsigned char reserved[crypto_aead_xchacha20poly1305_ietf_ABYTES];
219 unsigned char tag[crypto_aead_xchacha20poly1305_ietf_ABYTES];
268 size_t payload_size);
void GSC_KX_handle_client_monitor_peers(struct GNUNET_MQ_Handle *mq)
Handle GNUNET_MESSAGE_TYPE_CORE_MONITOR_PEERS request.
HeartbeatFlags
Heartbeat flags.
@ GSC_HEARTBEAT_KEY_UPDATE_REQUESTED
A key update is requested.
int GSC_NEIGHBOURS_check_excess_bandwidth(const struct GSC_KeyExchangeInfo *target)
Check if the given neighbour has excess bandwidth available.
void GSC_KX_encrypt_and_transmit(struct GSC_KeyExchangeInfo *kx, const void *payload, size_t payload_size)
Encrypt and transmit a message with the given payload.
unsigned int GSC_NEIGHBOURS_get_queue_length(const struct GSC_KeyExchangeInfo *target)
Check how many messages are queued for the given neighbour.
void GSC_KX_done(void)
Shutdown KX subsystem.
int GSC_KX_init(void)
Initialize KX subsystem.
static unsigned long long payload
How much data are we currently storing in the database?
Core service; the main API for encrypted P2P communications.
#define GNUNET_PACKED
gcc-ism to get packed structs.
static struct GNUNET_MQ_Handle * mq
Our connection to the resolver service, created on-demand, but then persists until error or shutdown.
struct GNUNET_MessageHeader header
Message type is GNUNET_MESSAGE_TYPE_CORE_ACK.
struct GNUNET_MessageHeader header
Message type is #GNUNET_MESSAGE_TYPE_CORE_PONG.
unsigned char tag[crypto_aead_xchacha20poly1305_ietf_ABYTES]
The Poly1305 tag of the encrypted message (which is starting at sequence_number), used to verify mess...
uint64_t sequence_number
Sequence number, in network byte order.
Public ECC key (always for Curve25519) encoded in a format suitable for network transmission and encr...
HPKE DHKEM encapsulation (X25519) See RFC 9180.
Handle to a message queue.
The identity of the host (wraps the signing key of the peer).
Information about the status of a key exchange with another peer.
struct GNUNET_MessageHeader header
Message type is #GNUNET_MESSAGE_TYPE_CORE_PONG.
struct GNUNET_HashCode finished
TODO {Finished} - encrypted.
unsigned char reserved[crypto_aead_xchacha20poly1305_ietf_ABYTES]
The following is the additional space needed for the mac.
struct GNUNET_MessageHeader header
Message type is #GNUNET_MESSAGE_TYPE_CORE_PONG.
struct GNUNET_PeerIdentity pk_I
Sender Peer ID.
uint16_t peer_class
The peer class of the sending peer TODO part of services info?
uint64_t r_I
Random number to make replay attacks harder.
struct GNUNET_CRYPTO_EcdhePublicKey pk_e
Ephemeral public edx25519 key.
struct GNUNET_CRYPTO_HpkeEncapsulation c_R
Key encapsulation.
struct GNUNET_MessageHeader header
Message type is #GNUNET_MESSAGE_TYPE_CORE_PONG.
struct GNUNET_HashCode h_pk_R
Hash of the responder peer id.
uint16_t peer_class
The peer class of the sending peer TODO is it correct to send an enum like this? TODO part of service...
struct GNUNET_CRYPTO_HpkeEncapsulation c_I
Challenge encapsulation c_I.
struct GNUNET_CRYPTO_HpkeEncapsulation c_e
Ephemeral key encapsulation c_e.
uint64_t r_R
Random number to make replay attacks harder.
struct GNUNET_MessageHeader header
Message type is #GNUNET_MESSAGE_TYPE_CORE_PONG.