Go to the source code of this file.
Functions | |
struct GNUNET_MESSENGER_Message * | create_message_join (const struct GNUNET_CRYPTO_PrivateKey *key) |
Creates and allocates a new join message containing the clients public key. | |
struct GNUNET_MESSENGER_Message * | create_message_leave (void) |
Creates and allocates a new leave message. | |
struct GNUNET_MESSENGER_Message * | create_message_name (const char *name) |
Creates and allocates a new name message containing the name to change to. | |
struct GNUNET_MESSENGER_Message * | create_message_key (const struct GNUNET_CRYPTO_PrivateKey *key) |
Creates and allocates a new key message containing the public key to change to derived from its private counterpart. | |
struct GNUNET_MESSENGER_Message * | create_message_id (const struct GNUNET_ShortHashCode *unique_id) |
Creates and allocates a new id message containing the unique member id to change to. | |
struct GNUNET_MESSENGER_Message * | create_message_request (const struct GNUNET_HashCode *hash) |
Creates and allocates a new request message containing the hash of a missing message. | |
struct GNUNET_MESSENGER_Message * | create_message_deletion (const struct GNUNET_HashCode *hash, const struct GNUNET_TIME_Relative delay) |
Creates and allocates a new deletion message containing the hash of a message to delete after a specific delay. | |
struct GNUNET_MESSENGER_Message * | create_message_subscribtion (const struct GNUNET_ShortHashCode *discourse, const struct GNUNET_TIME_Relative time, uint32_t flags) |
Creates and allocates a new subscribe message for a subscription of a given discourse with a specific time window and flags. | |
struct GNUNET_MESSENGER_Message * | create_message_announcement (const union GNUNET_MESSENGER_EpochIdentifier *identifier, const struct GNUNET_CRYPTO_EcdhePrivateKey *private_key, const struct GNUNET_CRYPTO_SymmetricSessionKey *shared_key, const struct GNUNET_TIME_Relative timeout) |
Creates and allocates a new announcement message for an announcement of a given epoch or group under an identifier using a specific private_key and shared_key until a given timeout. | |
struct GNUNET_MESSENGER_Message * | create_message_appeal (const struct GNUNET_HashCode *event, const struct GNUNET_CRYPTO_EcdhePrivateKey *private_key, const struct GNUNET_TIME_Relative timeout) |
Creates and allocates a new appeal message for an epoch announcement using a specific private_key to receive access before a given timeout. | |
struct GNUNET_MESSENGER_Message * | create_message_access (const struct GNUNET_HashCode *event, const struct GNUNET_CRYPTO_EcdhePublicKey *public_key, const struct GNUNET_CRYPTO_SymmetricSessionKey *shared_key) |
Creates and allocates a new access message to grant access to the shared_key of an announced epoch or group depending on target event encrypting the shared key for a specific public_key. | |
struct GNUNET_MESSENGER_Message * | create_message_revolution (const union GNUNET_MESSENGER_EpochIdentifier *identifier, const struct GNUNET_CRYPTO_SymmetricSessionKey *shared_key) |
Creates and allocates a new revolution message for an announced epoch or group selected by its identifier which is using a specific shared_key. | |
struct GNUNET_MESSENGER_Message * | create_message_group (const union GNUNET_MESSENGER_EpochIdentifier *identifier, const struct GNUNET_HashCode *initiator, const struct GNUNET_HashCode *partner, const struct GNUNET_TIME_Relative timeout) |
Creates and allocates a new group message to propose a group formation between an initiator subgroup and another partner subgroup until a given timeout to improve further epoch key exchange. | |
struct GNUNET_MESSENGER_Message * | create_message_authorization (const union GNUNET_MESSENGER_EpochIdentifier *identifier, const struct GNUNET_HashCode *event, const struct GNUNET_CRYPTO_SymmetricSessionKey *group_key, const struct GNUNET_CRYPTO_SymmetricSessionKey *shared_key) |
Creates and allocates a new authorization message to grant access to the shared_key of a specific group selected via its identifier following an announcement or a group formation event encrypting the shared key for a specific established group_key of selected group. | |
struct GNUNET_MESSENGER_Message * create_message_join | ( | const struct GNUNET_CRYPTO_PrivateKey * | key | ) |
Creates and allocates a new join message containing the clients public key.
(all values are stored as copy)
[in] | key | Private key |
Definition at line 32 of file messenger_api_message_kind.c.
References GNUNET_MESSENGER_Message::body, create_message(), GNUNET_MESSENGER_MessageLeave::epoch, GNUNET_CRYPTO_key_get_public(), GNUNET_MESSENGER_KIND_JOIN, GNUNET_MESSENGER_MessageBody::join, key, GNUNET_MESSENGER_MessageJoin::key, and GNUNET_MESSENGER_MessageBody::leave.
Referenced by handle_member_id().
struct GNUNET_MESSENGER_Message * create_message_leave | ( | void | ) |
Creates and allocates a new leave message.
Definition at line 53 of file messenger_api_message_kind.c.
References GNUNET_MESSENGER_Message::body, create_message(), GNUNET_MESSENGER_MessageLeave::epoch, GNUNET_MESSENGER_KIND_LEAVE, and GNUNET_MESSENGER_MessageBody::leave.
Referenced by GNUNET_MESSENGER_close_room().
struct GNUNET_MESSENGER_Message * create_message_name | ( | const char * | name | ) |
Creates and allocates a new name message containing the name to change to.
(all values are stored as copy)
[in] | name | New name |
Definition at line 70 of file messenger_api_message_kind.c.
References GNUNET_MESSENGER_Message::body, create_message(), GNUNET_MESSENGER_KIND_NAME, GNUNET_strdup, name, GNUNET_MESSENGER_MessageName::name, and GNUNET_MESSENGER_MessageBody::name.
Referenced by iterate_send_name_to_room().
struct GNUNET_MESSENGER_Message * create_message_key | ( | const struct GNUNET_CRYPTO_PrivateKey * | key | ) |
Creates and allocates a new key message containing the public key to change to derived from its private counterpart.
(all values are stored as copy)
[in] | key | Private key |
Definition at line 88 of file messenger_api_message_kind.c.
References GNUNET_MESSENGER_Message::body, create_message(), GNUNET_CRYPTO_key_get_public(), GNUNET_MESSENGER_KIND_KEY, key, GNUNET_MESSENGER_MessageKey::key, and GNUNET_MESSENGER_MessageBody::key.
Referenced by iterate_send_key_to_room().
struct GNUNET_MESSENGER_Message * create_message_id | ( | const struct GNUNET_ShortHashCode * | unique_id | ) |
Creates and allocates a new id message containing the unique member id to change to.
(all values are stored as copy)
[in] | unique_id | Unique member id |
Definition at line 106 of file messenger_api_message_kind.c.
References GNUNET_MESSENGER_Message::body, create_message(), GNUNET_memcpy, GNUNET_MESSENGER_KIND_ID, GNUNET_MESSENGER_MessageId::id, and GNUNET_MESSENGER_MessageBody::id.
Referenced by handle_member_id().
struct GNUNET_MESSENGER_Message * create_message_request | ( | const struct GNUNET_HashCode * | hash | ) |
Creates and allocates a new request message containing the hash of a missing message.
(all values are stored as copy)
[in] | hash | Hash of message |
Definition at line 126 of file messenger_api_message_kind.c.
References GNUNET_MESSENGER_Message::body, create_message(), GNUNET_CRYPTO_hash_cmp(), GNUNET_memcpy, GNUNET_MESSENGER_KIND_REQUEST, GNUNET_MESSENGER_MessageRequest::hash, GNUNET_MESSENGER_MessageBody::request, and zero.
Referenced by handle_miss_message().
struct GNUNET_MESSENGER_Message * create_message_deletion | ( | const struct GNUNET_HashCode * | hash, |
const struct GNUNET_TIME_Relative | delay | ||
) |
Creates and allocates a new deletion message containing the hash of a message to delete after a specific delay.
(all values are stored as copy)
[in] | hash | Hash of message |
[in] | delay | Delay of deletion |
Definition at line 154 of file messenger_api_message_kind.c.
References GNUNET_MESSENGER_Message::body, create_message(), GNUNET_MESSENGER_MessageDeletion::delay, GNUNET_MESSENGER_MessageBody::deletion, GNUNET_memcpy, GNUNET_MESSENGER_KIND_DELETION, GNUNET_TIME_relative_hton(), and GNUNET_MESSENGER_MessageDeletion::hash.
Referenced by delete_room_message().
struct GNUNET_MESSENGER_Message * create_message_subscribtion | ( | const struct GNUNET_ShortHashCode * | discourse, |
const struct GNUNET_TIME_Relative | time, | ||
uint32_t | flags | ||
) |
Creates and allocates a new subscribe message for a subscription of a given discourse with a specific time window and flags.
(all values are stored as copy)
[in] | discourse | Discourse |
[in] | time | Time of subscription |
[in] | flags | Subscription flags |
Definition at line 176 of file messenger_api_message_kind.c.
References GNUNET_MESSENGER_Message::body, create_message(), GNUNET_MESSENGER_MessageSubscribtion::discourse, GNUNET_MESSENGER_MessageSubscribtion::flags, GNUNET_memcpy, GNUNET_MESSENGER_KIND_SUBSCRIBTION, GNUNET_TIME_relative_hton(), GNUNET_MESSENGER_MessageBody::subscribtion, and GNUNET_MESSENGER_MessageSubscribtion::time.
Referenced by handle_discourse_subscription().
struct GNUNET_MESSENGER_Message * create_message_announcement | ( | const union GNUNET_MESSENGER_EpochIdentifier * | identifier, |
const struct GNUNET_CRYPTO_EcdhePrivateKey * | private_key, | ||
const struct GNUNET_CRYPTO_SymmetricSessionKey * | shared_key, | ||
const struct GNUNET_TIME_Relative | timeout | ||
) |
Creates and allocates a new announcement message for an announcement of a given epoch or group under an identifier using a specific private_key and shared_key until a given timeout.
[in] | identifier | Epoch identifier |
[in] | private_key | Private key |
[in] | shared_key | Shared key |
[in] | timeout | Timeout |
Definition at line 201 of file messenger_api_message_kind.c.
References GNUNET_MESSENGER_MessageBody::announcement, GNUNET_MESSENGER_Message::body, create_message(), GNUNET_MESSENGER_EpochNonce::data, GNUNET_CRYPTO_ecdhe_key_get_public(), GNUNET_CRYPTO_QUALITY_NONCE, GNUNET_CRYPTO_random_block(), GNUNET_memcpy, GNUNET_MESSENGER_EPOCH_NONCE_BYTES, GNUNET_MESSENGER_KIND_ANNOUNCEMENT, GNUNET_TIME_relative_hton(), GNUNET_MESSENGER_MessageAnnouncement::identifier, GNUNET_MESSENGER_MessageAnnouncement::key, GNUNET_MESSENGER_EpochNonceData::nonce, GNUNET_MESSENGER_MessageAnnouncement::nonce, sign_message_by_key(), timeout, and GNUNET_MESSENGER_MessageAnnouncement::timeout.
Referenced by send_epoch_announcement(), and send_epoch_group_announcement().
struct GNUNET_MESSENGER_Message * create_message_appeal | ( | const struct GNUNET_HashCode * | event, |
const struct GNUNET_CRYPTO_EcdhePrivateKey * | private_key, | ||
const struct GNUNET_TIME_Relative | timeout | ||
) |
Creates and allocates a new appeal message for an epoch announcement using a specific private_key to receive access before a given timeout.
[in] | event | Hash of announcement event |
[in] | private_key | Private key |
[in] | timeout | Timeout |
Definition at line 238 of file messenger_api_message_kind.c.
References GNUNET_MESSENGER_MessageBody::appeal, GNUNET_MESSENGER_Message::body, create_message(), GNUNET_MESSENGER_MessageAppeal::event, GNUNET_CRYPTO_ecdhe_key_get_public(), GNUNET_memcpy, GNUNET_MESSENGER_KIND_APPEAL, GNUNET_TIME_relative_hton(), GNUNET_MESSENGER_MessageAppeal::key, timeout, and GNUNET_MESSENGER_MessageAppeal::timeout.
Referenced by send_epoch_announcement_appeal().
struct GNUNET_MESSENGER_Message * create_message_access | ( | const struct GNUNET_HashCode * | event, |
const struct GNUNET_CRYPTO_EcdhePublicKey * | public_key, | ||
const struct GNUNET_CRYPTO_SymmetricSessionKey * | shared_key | ||
) |
Creates and allocates a new access message to grant access to the shared_key of an announced epoch or group depending on target event encrypting the shared key for a specific public_key.
[in] | event | Hash of appeal or group formation event |
[in] | public_key | Public key |
[in] | shared_key | Shared key |
Definition at line 265 of file messenger_api_message_kind.c.
References GNUNET_MESSENGER_MessageBody::access, GNUNET_MESSENGER_Message::body, create_message(), destroy_message(), GNUNET_MESSENGER_MessageAccess::event, GNUNET_CRYPTO_hpke_seal_oneshot(), GNUNET_ERROR_TYPE_WARNING, GNUNET_log, GNUNET_memcpy, GNUNET_MESSENGER_KIND_ACCESS, GNUNET_OK, GNUNET_MESSENGER_MessageAccess::key, and sign_message_by_key().
Referenced by send_epoch_announcement_access(), and send_epoch_group_access().
struct GNUNET_MESSENGER_Message * create_message_revolution | ( | const union GNUNET_MESSENGER_EpochIdentifier * | identifier, |
const struct GNUNET_CRYPTO_SymmetricSessionKey * | shared_key | ||
) |
Creates and allocates a new revolution message for an announced epoch or group selected by its identifier which is using a specific shared_key.
[in] | identifier | Epoch identifier |
[in] | shared_key | Shared key |
Definition at line 307 of file messenger_api_message_kind.c.
References GNUNET_MESSENGER_Message::body, create_message(), GNUNET_MESSENGER_EpochNonce::data, GNUNET_CRYPTO_QUALITY_NONCE, GNUNET_CRYPTO_random_block(), GNUNET_memcpy, GNUNET_MESSENGER_EPOCH_NONCE_BYTES, GNUNET_MESSENGER_KIND_REVOLUTION, GNUNET_MESSENGER_MessageRevolution::identifier, GNUNET_MESSENGER_EpochNonceData::nonce, GNUNET_MESSENGER_MessageRevolution::nonce, GNUNET_MESSENGER_MessageBody::revolution, and sign_message_by_key().
Referenced by send_epoch_announcement_revolution(), and send_epoch_group_revolution().
struct GNUNET_MESSENGER_Message * create_message_group | ( | const union GNUNET_MESSENGER_EpochIdentifier * | identifier, |
const struct GNUNET_HashCode * | initiator, | ||
const struct GNUNET_HashCode * | partner, | ||
const struct GNUNET_TIME_Relative | timeout | ||
) |
Creates and allocates a new group message to propose a group formation between an initiator subgroup and another partner subgroup until a given timeout to improve further epoch key exchange.
[in] | identifier | Group identifier |
[in] | initiator | Initiator group identifier |
[in] | partner | Partner group identifier |
[in] | timeout | Timeout |
Definition at line 336 of file messenger_api_message_kind.c.
References GNUNET_MESSENGER_Message::body, GNUNET_MESSENGER_EpochIdentifier::code, create_message(), GNUNET_memcpy, GNUNET_MESSENGER_KIND_GROUP, GNUNET_TIME_relative_hton(), GNUNET_MESSENGER_MessageBody::group, GNUNET_MESSENGER_EpochIdentifierCode::group_bit, GNUNET_MESSENGER_MessageGroup::identifier, GNUNET_MESSENGER_MessageGroup::initiator, GNUNET_MESSENGER_MessageGroup::partner, timeout, and GNUNET_MESSENGER_MessageGroup::timeout.
Referenced by send_epoch_group().
struct GNUNET_MESSENGER_Message * create_message_authorization | ( | const union GNUNET_MESSENGER_EpochIdentifier * | identifier, |
const struct GNUNET_HashCode * | event, | ||
const struct GNUNET_CRYPTO_SymmetricSessionKey * | group_key, | ||
const struct GNUNET_CRYPTO_SymmetricSessionKey * | shared_key | ||
) |
Creates and allocates a new authorization message to grant access to the shared_key of a specific group selected via its identifier following an announcement or a group formation event encrypting the shared key for a specific established group_key of selected group.
[in] | identifier | Group identifier |
[in] | event | Hash of announcement or group formation event |
[in] | group_key | Established group key |
[in] | shared_key | Shared key |
Definition at line 366 of file messenger_api_message_kind.c.
References GNUNET_MESSENGER_MessageBody::authorization, GNUNET_MESSENGER_Message::body, create_message(), destroy_message(), GNUNET_MESSENGER_MessageAuthorization::event, GNUNET_CRYPTO_symmetric_derive_iv(), GNUNET_CRYPTO_symmetric_encrypt(), GNUNET_ERROR_TYPE_WARNING, GNUNET_log, GNUNET_memcpy, GNUNET_MESSENGER_AUTHORIZATION_KEY_BYTES, GNUNET_MESSENGER_KIND_AUTHORIZATION, GNUNET_MESSENGER_MessageAuthorization::identifier, GNUNET_MESSENGER_MessageAuthorization::key, and sign_message_by_key().
Referenced by send_epoch_announcement_authorization(), and send_epoch_group_authorization().