From a3e62d3bc6e7f75949726f9a8dafe03e757e869b Mon Sep 17 00:00:00 2001 From: Dennis Brentjes Date: Sun, 30 Oct 2016 13:38:49 +0100 Subject: Added the Preprocessing step for the Precomputation of CMix. --- node/node.hpp | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) (limited to 'node/node.hpp') diff --git a/node/node.hpp b/node/node.hpp index 9d59687..9e256c7 100644 --- a/node/node.hpp +++ b/node/node.hpp @@ -27,6 +27,19 @@ struct NodeNetworkSettings { std::string certdir; ///< Directory containing trusted certificate authorities. }; +struct MixData { + GroupElement r; + GroupElement s; + std::string client_handle; + size_t new_location; + + ~MixData(){ + Api api = get_implementation(); + api.free_group_element(r); + api.free_group_element(s); + } +}; + /*! * \brief The Node class */ @@ -55,7 +68,9 @@ class Node Api api; KeyPair keypair; - std::vector network_key; + void* network_key; + + std::vector precomputation_data; bool shutting_down; @@ -67,6 +82,7 @@ class Node void handle_node_initialization(cmix_proto::Initialization const& init); void handle_node_secretkey(cmix_proto::SecretKey const& secret); + void handle_node_prepre(cmix_proto::PrePre const& prepre); void handle_node_message(cmix_proto::CMixMessage message); void handle_client_keyexchange(ClientConnections::key_type handle, cmix_proto::KeyExchange ke); -- cgit v1.2.3-70-g09d2