scalarproduct service implementation More...
#include "platform.h"
#include <limits.h>
#include <gcrypt.h>
#include "gnunet_util_lib.h"
#include "gnunet_cadet_service.h"
#include "gnunet_protocols.h"
#include "gnunet_scalarproduct_service.h"
#include "gnunet_seti_service.h"
#include "scalarproduct.h"
#include "gnunet-service-scalarproduct.h"
#include "gnunet_constants.h"
Go to the source code of this file.
Data Structures | |
struct | MpiElement |
An encrypted element key-value pair. More... | |
struct | AliceServiceSession |
A scalarproduct session which tracks a request form the client to our final response. More... | |
Macros | |
#define | LOG(kind, ...) GNUNET_log_from (kind, "scalarproduct-alice", __VA_ARGS__) |
#define | ELEMENT_CAPACITY |
Maximum number of elements we can put into a single cryptodata message. More... | |
Functions | |
static int | free_element_cb (void *cls, const struct GNUNET_HashCode *key, void *value) |
Iterator called to free elements. More... | |
static void | destroy_service_session (struct AliceServiceSession *s) |
Destroy session state, we are done with it. More... | |
static void | prepare_client_end_notification (struct AliceServiceSession *session) |
Notify the client that the session has failed. More... | |
static void | transmit_client_response (struct AliceServiceSession *s) |
Prepare the final (positive) response we will send to Alice's client. More... | |
static void | cb_channel_destruction (void *cls, const struct GNUNET_CADET_Channel *channel) |
Function called whenever a channel is destroyed. More... | |
static gcry_mpi_t | compute_square_sum_mpi_elements (const struct MpiElement *vector, uint32_t length) |
Computes the square sum over a vector of a given length. More... | |
static gcry_mpi_t | compute_square_sum (const gcry_mpi_t *vector, uint32_t length) |
Computes the square sum over a vector of a given length. More... | |
static gcry_mpi_t | compute_scalar_product (struct AliceServiceSession *session) |
Compute our scalar product, done by Alice. More... | |
static int | check_bobs_cryptodata_multipart (void *cls, const struct BobCryptodataMultipartMessage *msg) |
Check a multipart chunk of a response we got from another service we wanted to calculate a scalarproduct with. More... | |
static void | handle_bobs_cryptodata_multipart (void *cls, const struct BobCryptodataMultipartMessage *msg) |
Handle a multipart chunk of a response we got from another service we wanted to calculate a scalarproduct with. More... | |
static int | check_bobs_cryptodata_message (void *cls, const struct BobCryptodataMessage *msg) |
Check a response we got from another service we wanted to calculate a scalarproduct with. More... | |
static void | handle_bobs_cryptodata_message (void *cls, const struct BobCryptodataMessage *msg) |
Handle a response we got from another service we wanted to calculate a scalarproduct with. More... | |
static int | copy_element_cb (void *cls, const struct GNUNET_HashCode *key, void *value) |
Iterator to copy over messages from the hash map into an array for sorting. More... | |
static int | element_cmp (const void *a, const void *b) |
Compare two struct MpiValue s by key for sorting. More... | |
static void | send_alices_cryptodata_message (struct AliceServiceSession *s) |
Send the cryptographic data from Alice to Bob. More... | |
static void | cb_intersection_element_removed (void *cls, const struct GNUNET_SETI_Element *element, uint64_t current_size, enum GNUNET_SETI_Status status) |
Callback for set operation results. More... | |
static void | cb_intersection_request_alice (void *cls, const struct GNUNET_PeerIdentity *other_peer, const struct GNUNET_MessageHeader *context_msg, struct GNUNET_SETI_Request *request) |
Called when another peer wants to do a set operation with the local peer. More... | |
static void | client_request_complete_alice (struct AliceServiceSession *s) |
Our client has finished sending us its multipart message. More... | |
static int | check_alice_client_message_multipart (void *cls, const struct ComputationBobCryptodataMultipartMessage *msg) |
We're receiving additional set data. More... | |
static void | handle_alice_client_message_multipart (void *cls, const struct ComputationBobCryptodataMultipartMessage *msg) |
We're receiving additional set data. More... | |
static int | check_alice_client_message (void *cls, const struct AliceComputationMessage *msg) |
Handler for Alice's client request message. More... | |
static void | handle_alice_client_message (void *cls, const struct AliceComputationMessage *msg) |
Handler for Alice's client request message. More... | |
static void | shutdown_task (void *cls) |
Task run during shutdown. More... | |
static void * | client_connect_cb (void *cls, struct GNUNET_SERVICE_Client *client, struct GNUNET_MQ_Handle *mq) |
A client connected. More... | |
static void | client_disconnect_cb (void *cls, struct GNUNET_SERVICE_Client *client, void *app_cls) |
A client disconnected. More... | |
static void | run (void *cls, const struct GNUNET_CONFIGURATION_Handle *c, struct GNUNET_SERVICE_Handle *service) |
Initialization of the program and message handlers. More... | |
GNUNET_SERVICE_MAIN (GNUNET_OS_project_data_gnunet(), "scalarproduct-alice", GNUNET_SERVICE_OPTION_NONE, &run, &client_connect_cb, &client_disconnect_cb, NULL, GNUNET_MQ_hd_var_size(alice_client_message, GNUNET_MESSAGE_TYPE_SCALARPRODUCT_CLIENT_TO_ALICE, struct AliceComputationMessage, NULL), GNUNET_MQ_hd_var_size(alice_client_message_multipart, GNUNET_MESSAGE_TYPE_SCALARPRODUCT_CLIENT_MULTIPART_ALICE, struct ComputationBobCryptodataMultipartMessage, NULL), GNUNET_MQ_handler_end()) | |
Define "main" method using service macro. More... | |
Variables | |
static const struct GNUNET_CONFIGURATION_Handle * | cfg |
GNUnet configuration handle. More... | |
static struct GNUNET_CRYPTO_PaillierPublicKey | my_pubkey |
Service's own public key. More... | |
static struct GNUNET_CRYPTO_PaillierPrivateKey | my_privkey |
Service's own private key. More... | |
static gcry_mpi_t | my_offset |
Service's offset for values that could possibly be negative but are plaintext for encryption. More... | |
static struct GNUNET_CADET_Handle * | my_cadet |
Handle to the CADET service. More... | |
scalarproduct service implementation
Definition in file gnunet-service-scalarproduct_alice.c.
#define LOG | ( | kind, | |
... | |||
) | GNUNET_log_from (kind, "scalarproduct-alice", __VA_ARGS__) |
Definition at line 38 of file gnunet-service-scalarproduct_alice.c.
#define ELEMENT_CAPACITY |
Maximum number of elements we can put into a single cryptodata message.
Definition at line 820 of file gnunet-service-scalarproduct_alice.c.
|
static |
Iterator called to free elements.
cls | the struct AliceServiceSession * (unused) |
key | the key (unused) |
value | value to free |
Definition at line 225 of file gnunet-service-scalarproduct_alice.c.
References GNUNET_free, GNUNET_OK, and value.
Referenced by destroy_service_session().
|
static |
Destroy session state, we are done with it.
s | the session to free elements from |
Definition at line 240 of file gnunet-service-scalarproduct_alice.c.
References AliceServiceSession::channel, AliceServiceSession::client, free_element_cb(), GNUNET_CADET_channel_destroy(), GNUNET_CONTAINER_multihashmap_destroy(), GNUNET_CONTAINER_multihashmap_iterate(), GNUNET_free, GNUNET_SERVICE_client_drop(), GNUNET_SETI_destroy(), GNUNET_SETI_listen_cancel(), GNUNET_SETI_operation_cancel(), GNUNET_YES, AliceServiceSession::in_destroy, AliceServiceSession::intersected_elements, AliceServiceSession::intersection_listen, AliceServiceSession::intersection_op, AliceServiceSession::intersection_set, AliceServiceSession::product, AliceServiceSession::r, AliceServiceSession::r_prime, AliceServiceSession::sorted_elements, AliceServiceSession::used_element_count, and MpiElement::value.
Referenced by client_disconnect_cb().
|
static |
Notify the client that the session has failed.
A message gets sent to Alice's client if we encountered any error.
session | the associated client session to fail or succeed |
Definition at line 313 of file gnunet-service-scalarproduct_alice.c.
References AliceServiceSession::client_mq, GNUNET_ERROR_TYPE_DEBUG, GNUNET_h2s(), GNUNET_log, GNUNET_MESSAGE_TYPE_SCALARPRODUCT_RESULT, GNUNET_MQ_msg, GNUNET_MQ_send(), msg, AliceServiceSession::session_id, and AliceServiceSession::status.
Referenced by cb_channel_destruction(), cb_intersection_element_removed(), cb_intersection_request_alice(), client_request_complete_alice(), and transmit_client_response().
|
static |
Prepare the final (positive) response we will send to Alice's client.
s | the session associated with our client. |
Definition at line 339 of file gnunet-service-scalarproduct_alice.c.
References AliceServiceSession::client_mq, GNUNET_break, GNUNET_ERROR_TYPE_DEBUG, GNUNET_ERROR_TYPE_ERROR, GNUNET_free, GNUNET_h2s(), GNUNET_log, GNUNET_memcpy, GNUNET_MESSAGE_TYPE_SCALARPRODUCT_RESULT, GNUNET_MQ_msg_extra, GNUNET_MQ_send(), GNUNET_SCALARPRODUCT_STATUS_SUCCESS, LOG_GCRY, msg, prepare_client_end_notification(), AliceServiceSession::product, AliceServiceSession::session_id, and value.
Referenced by handle_bobs_cryptodata_message(), and handle_bobs_cryptodata_multipart().
|
static |
Function called whenever a channel is destroyed.
Should clean up any associated state.
It must NOT call GNUNET_CADET_channel_destroy() on the channel.
cls | our struct AliceServiceSession |
channel | connection to the other end (henceforth invalid) |
Definition at line 414 of file gnunet-service-scalarproduct_alice.c.
References GNUNET_ERROR_TYPE_DEBUG, GNUNET_h2s(), GNUNET_i2s(), GNUNET_log, GNUNET_SCALARPRODUCT_STATUS_ACTIVE, GNUNET_SCALARPRODUCT_STATUS_FAILURE, prepare_client_end_notification(), and AliceServiceSession::s.
Referenced by client_request_complete_alice().
|
static |
Computes the square sum over a vector of a given length.
vector | the vector to compute over |
length | the length of the vector |
Definition at line 440 of file gnunet-service-scalarproduct_alice.c.
References GNUNET_assert, consensus-simulation::sum, and value.
Referenced by compute_scalar_product().
|
static |
Computes the square sum over a vector of a given length.
vector | the vector to compute over |
length | the length of the vector |
Definition at line 467 of file gnunet-service-scalarproduct_alice.c.
References GNUNET_assert, and consensus-simulation::sum.
Referenced by compute_scalar_product().
|
static |
Compute our scalar product, done by Alice.
session | the session associated with this computation |
Definition at line 492 of file gnunet-service-scalarproduct_alice.c.
References compute_square_sum(), compute_square_sum_mpi_elements(), GNUNET_assert, GNUNET_CRYPTO_paillier_decrypt(), GNUNET_free, my_offset, my_privkey, my_pubkey, p, AliceServiceSession::r, AliceServiceSession::r_prime, AliceServiceSession::s, AliceServiceSession::s_prime, AliceServiceSession::sorted_elements, t, u, AliceServiceSession::used_element_count, and MpiElement::value.
Referenced by handle_bobs_cryptodata_message(), and handle_bobs_cryptodata_multipart().
|
static |
Check a multipart chunk of a response we got from another service we wanted to calculate a scalarproduct with.
cls | the struct AliceServiceSession |
msg | the actual message |
Definition at line 602 of file gnunet-service-scalarproduct_alice.c.
References AliceServiceSession::cadet_received_element_count, GNUNET_break, GNUNET_OK, GNUNET_SYSERR, msg, AliceServiceSession::s, GNUNET_MessageHeader::size, and AliceServiceSession::used_element_count.
|
static |
Handle a multipart chunk of a response we got from another service we wanted to calculate a scalarproduct with.
cls | the struct AliceServiceSession |
msg | the actual message |
Definition at line 634 of file gnunet-service-scalarproduct_alice.c.
References AliceServiceSession::cadet_received_element_count, AliceServiceSession::channel, compute_scalar_product(), GNUNET_CADET_receive_done(), GNUNET_ERROR_TYPE_DEBUG, GNUNET_log, GNUNET_memcpy, msg, payload, AliceServiceSession::product, AliceServiceSession::r, AliceServiceSession::r_prime, AliceServiceSession::s, transmit_client_response(), and AliceServiceSession::used_element_count.
|
static |
Check a response we got from another service we wanted to calculate a scalarproduct with.
cls | our struct AliceServiceSession |
msg | the actual message |
Definition at line 679 of file gnunet-service-scalarproduct_alice.c.
References AliceServiceSession::client_received_element_count, GNUNET_break_op, GNUNET_OK, GNUNET_SYSERR, msg, AliceServiceSession::s, GNUNET_MessageHeader::size, AliceServiceSession::sorted_elements, AliceServiceSession::total, and AliceServiceSession::used_element_count.
|
static |
Handle a response we got from another service we wanted to calculate a scalarproduct with.
cls | our struct AliceServiceSession |
msg | the actual message |
Definition at line 723 of file gnunet-service-scalarproduct_alice.c.
References AliceServiceSession::cadet_received_element_count, AliceServiceSession::channel, compute_scalar_product(), GNUNET_CADET_receive_done(), GNUNET_ERROR_TYPE_DEBUG, GNUNET_log, GNUNET_memcpy, GNUNET_new_array, msg, payload, AliceServiceSession::product, AliceServiceSession::r, AliceServiceSession::r_prime, AliceServiceSession::s, AliceServiceSession::s_prime, transmit_client_response(), and AliceServiceSession::used_element_count.
|
static |
Iterator to copy over messages from the hash map into an array for sorting.
cls | the struct AliceServiceSession * |
key | the key (unused) |
value | the struct GNUNET_SCALARPRODUCT_Element * |
Definition at line 779 of file gnunet-service-scalarproduct_alice.c.
References GNUNET_ntohll(), GNUNET_OK, MpiElement::key, GNUNET_SCALARPRODUCT_Element::key, AliceServiceSession::s, AliceServiceSession::sorted_elements, AliceServiceSession::used_element_count, value, MpiElement::value, and GNUNET_SCALARPRODUCT_Element::value.
Referenced by send_alices_cryptodata_message().
|
static |
Compare two struct MpiValue
s by key for sorting.
a | pointer to first struct MpiValue * |
b | pointer to first struct MpiValue * |
Definition at line 807 of file gnunet-service-scalarproduct_alice.c.
References GNUNET_CRYPTO_hash_cmp(), and MpiElement::key.
Referenced by send_alices_cryptodata_message().
|
static |
Send the cryptographic data from Alice to Bob.
Does nothing if we already transferred all elements.
s | the associated service session |
Definition at line 833 of file gnunet-service-scalarproduct_alice.c.
References AliceServiceSession::cadet_mq, copy_element_cb(), ELEMENT_CAPACITY, element_cmp(), GNUNET_assert, GNUNET_CONTAINER_multihashmap_iterate(), GNUNET_CONTAINER_multihashmap_size(), GNUNET_CRYPTO_paillier_encrypt(), GNUNET_ERROR_TYPE_DEBUG, GNUNET_log, GNUNET_malloc, GNUNET_MESSAGE_TYPE_SCALARPRODUCT_ALICE_CRYPTODATA, GNUNET_MQ_msg_extra, GNUNET_MQ_send(), AliceServiceSession::intersected_elements, LOG, msg, my_offset, my_pubkey, payload, AliceServiceSession::sorted_elements, AliceServiceSession::used_element_count, and MpiElement::value.
Referenced by cb_intersection_element_removed().
|
static |
Callback for set operation results.
Called for each element that should be removed from the result set, and then once to indicate that the set intersection operation is done.
cls | closure with the struct AliceServiceSession |
element | a result element, only valid if status is #GNUNET_SETI_STATUS_OK |
current_size | current set size |
status | what has happened with the set intersection? |
Definition at line 901 of file gnunet-service-scalarproduct_alice.c.
References GNUNET_SETI_Element::data, GNUNET_assert, GNUNET_break, GNUNET_CONTAINER_multihashmap_get(), GNUNET_CONTAINER_multihashmap_remove(), GNUNET_ERROR_TYPE_DEBUG, GNUNET_free, GNUNET_h2s(), GNUNET_ntohll(), GNUNET_SCALARPRODUCT_STATUS_FAILURE, GNUNET_SETI_destroy(), GNUNET_SETI_listen_cancel(), GNUNET_SETI_STATUS_DEL_LOCAL, GNUNET_SETI_STATUS_DONE, GNUNET_SETI_STATUS_FAILURE, GNUNET_YES, AliceServiceSession::intersected_elements, AliceServiceSession::intersection_listen, AliceServiceSession::intersection_op, AliceServiceSession::intersection_set, GNUNET_SCALARPRODUCT_Element::key, LOG, prepare_client_end_notification(), AliceServiceSession::s, send_alices_cryptodata_message(), status, AliceServiceSession::status, and GNUNET_SCALARPRODUCT_Element::value.
Referenced by cb_intersection_request_alice().
|
static |
Called when another peer wants to do a set operation with the local peer.
If a listen error occurs, the request is NULL.
cls | closure with the struct AliceServiceSession * |
other_peer | the other peer |
context_msg | message with application specific information from the other peer |
request | request from the other peer (never NULL), use GNUNET_SETI_accept() to accept it, otherwise the request will be refused Note that we can't just return value from the listen callback, as it is also necessary to specify the set we want to do the operation with, which sometimes can be derived from the context message. It's necessary to specify the timeout. |
Definition at line 978 of file gnunet-service-scalarproduct_alice.c.
References cb_intersection_element_removed(), GNUNET_break, GNUNET_break_op, GNUNET_memcmp, GNUNET_OK, GNUNET_SCALARPRODUCT_STATUS_FAILURE, GNUNET_SETI_accept(), GNUNET_SETI_commit(), prepare_client_end_notification(), request, and AliceServiceSession::s.
Referenced by client_request_complete_alice().
|
static |
Our client has finished sending us its multipart message.
session | the service session context |
Definition at line 1018 of file gnunet-service-scalarproduct_alice.c.
References AliceServiceSession::cadet_mq, cb_channel_destruction(), cb_intersection_request_alice(), cfg, AliceServiceSession::channel, GNUNET_CADET_channel_create(), GNUNET_CADET_channel_destroy(), GNUNET_CADET_get_mq(), GNUNET_ERROR_TYPE_DEBUG, GNUNET_h2s(), GNUNET_log, GNUNET_MESSAGE_TYPE_SCALARPRODUCT_BOB_CRYPTODATA, GNUNET_MESSAGE_TYPE_SCALARPRODUCT_BOB_CRYPTODATA_MULTIPART, GNUNET_MESSAGE_TYPE_SCALARPRODUCT_SESSION_INITIALIZATION, GNUNET_MQ_handler_end, GNUNET_MQ_hd_var_size, GNUNET_MQ_msg, GNUNET_MQ_send(), GNUNET_SCALARPRODUCT_STATUS_FAILURE, GNUNET_SETI_listen(), AliceServiceSession::intersection_listen, msg, my_cadet, my_pubkey, AliceServiceSession::peer, prepare_client_end_notification(), AliceServiceSession::session_id, and AliceServiceSession::status.
Referenced by handle_alice_client_message(), and handle_alice_client_message_multipart().
|
static |
We're receiving additional set data.
Check if msg is well-formed.
cls | client identification of the client |
msg | the actual message |
Definition at line 1081 of file gnunet-service-scalarproduct_alice.c.
References GNUNET_break_op, GNUNET_OK, GNUNET_SYSERR, msg, AliceServiceSession::s, and GNUNET_MessageHeader::size.
|
static |
We're receiving additional set data.
Add it to our set and if we are done, initiate the transaction.
cls | client identification of the client |
msg | the actual message |
Definition at line 1113 of file gnunet-service-scalarproduct_alice.c.
References AliceServiceSession::client, AliceServiceSession::client_received_element_count, client_request_complete_alice(), GNUNET_SETI_Element::data, GNUNET_SETI_Element::element_type, GNUNET_break, GNUNET_CONTAINER_multihashmap_put(), GNUNET_CONTAINER_MULTIHASHMAPOPTION_UNIQUE_ONLY, GNUNET_free, GNUNET_memcpy, GNUNET_new, GNUNET_SERVICE_client_continue(), GNUNET_SETI_add_element(), GNUNET_SYSERR, AliceServiceSession::intersected_elements, AliceServiceSession::intersection_set, GNUNET_SCALARPRODUCT_Element::key, msg, AliceServiceSession::s, GNUNET_SETI_Element::size, AliceServiceSession::total, and AliceServiceSession::used_element_count.
|
static |
Handler for Alice's client request message.
Check that msg is well-formed.
cls | identification of the client |
msg | the actual message |
Definition at line 1167 of file gnunet-service-scalarproduct_alice.c.
References GNUNET_break, GNUNET_break_op, GNUNET_OK, GNUNET_SYSERR, msg, AliceServiceSession::s, and GNUNET_MessageHeader::size.
|
static |
Handler for Alice's client request message.
We are doing request-initiation to compute a scalar product with a peer.
cls | identification of the client |
msg | the actual message |
Definition at line 1205 of file gnunet-service-scalarproduct_alice.c.
References cfg, AliceServiceSession::client, AliceServiceSession::client_received_element_count, client_request_complete_alice(), GNUNET_SETI_Element::data, GNUNET_SETI_Element::element_type, GNUNET_break, GNUNET_CONTAINER_multihashmap_create(), GNUNET_CONTAINER_multihashmap_put(), GNUNET_CONTAINER_MULTIHASHMAPOPTION_UNIQUE_ONLY, GNUNET_free, GNUNET_memcpy, GNUNET_new, GNUNET_ntohll(), GNUNET_SCALARPRODUCT_STATUS_ACTIVE, GNUNET_SERVICE_client_continue(), GNUNET_SETI_add_element(), GNUNET_SETI_create(), GNUNET_SYSERR, GNUNET_YES, AliceServiceSession::intersected_elements, AliceServiceSession::intersection_set, GNUNET_SCALARPRODUCT_Element::key, msg, AliceServiceSession::peer, AliceServiceSession::s, AliceServiceSession::session_id, GNUNET_SETI_Element::size, AliceServiceSession::status, AliceServiceSession::total, AliceServiceSession::used_element_count, and value.
|
static |
Task run during shutdown.
cls | unused |
Definition at line 1271 of file gnunet-service-scalarproduct_alice.c.
References GNUNET_CADET_disconnect(), GNUNET_ERROR_TYPE_DEBUG, GNUNET_log, and my_cadet.
Referenced by run().
|
static |
A client connected.
Setup the associated data structure.
cls | closure, NULL |
client | identification of the client |
mq | message queue to communicate with client |
struct AliceServiceSession
Definition at line 1294 of file gnunet-service-scalarproduct_alice.c.
References AliceServiceSession::client, GNUNET_new, mq, and AliceServiceSession::s.
|
static |
A client disconnected.
Remove the associated session(s), release data structures and cancel pending outgoing transmissions to the client.
cls | closure, NULL |
client | identification of the client |
app_cls | our struct AliceServiceSession |
Definition at line 1318 of file gnunet-service-scalarproduct_alice.c.
References AliceServiceSession::client, destroy_service_session(), GNUNET_ERROR_TYPE_DEBUG, GNUNET_log, and AliceServiceSession::s.
|
static |
Initialization of the program and message handlers.
cls | closure |
c | configuration to use |
service | the initialized service |
Definition at line 1341 of file gnunet-service-scalarproduct_alice.c.
References _, cfg, GNUNET_CADET_connect(), GNUNET_CRYPTO_PAILLIER_BITS, GNUNET_CRYPTO_paillier_create(), GNUNET_ERROR_TYPE_ERROR, GNUNET_log, GNUNET_SCHEDULER_add_shutdown(), GNUNET_SCHEDULER_shutdown(), my_cadet, my_offset, my_privkey, my_pubkey, and shutdown_task().
GNUNET_SERVICE_MAIN | ( | GNUNET_OS_project_data_gnunet() | , |
"scalarproduct-alice" | , | ||
GNUNET_SERVICE_OPTION_NONE | , | ||
& | run, | ||
& | client_connect_cb, | ||
& | client_disconnect_cb, | ||
NULL | , | ||
GNUNET_MQ_hd_var_size(alice_client_message, GNUNET_MESSAGE_TYPE_SCALARPRODUCT_CLIENT_TO_ALICE, struct AliceComputationMessage, NULL) | , | ||
GNUNET_MQ_hd_var_size(alice_client_message_multipart, GNUNET_MESSAGE_TYPE_SCALARPRODUCT_CLIENT_MULTIPART_ALICE, struct ComputationBobCryptodataMultipartMessage, NULL) | , | ||
GNUNET_MQ_handler_end() | |||
) |
Define "main" method using service macro.
|
static |
GNUnet configuration handle.
Definition at line 193 of file gnunet-service-scalarproduct_alice.c.
Referenced by client_request_complete_alice(), handle_alice_client_message(), and run().
|
static |
Service's own public key.
Definition at line 198 of file gnunet-service-scalarproduct_alice.c.
Referenced by client_request_complete_alice(), compute_scalar_product(), run(), and send_alices_cryptodata_message().
|
static |
Service's own private key.
Definition at line 203 of file gnunet-service-scalarproduct_alice.c.
Referenced by compute_scalar_product(), and run().
|
static |
Service's offset for values that could possibly be negative but are plaintext for encryption.
Definition at line 208 of file gnunet-service-scalarproduct_alice.c.
Referenced by compute_scalar_product(), run(), and send_alices_cryptodata_message().
|
static |
Handle to the CADET service.
Definition at line 213 of file gnunet-service-scalarproduct_alice.c.
Referenced by client_request_complete_alice(), run(), and shutdown_task().