aboutsummaryrefslogtreecommitdiff
path: root/node/node.hpp
diff options
context:
space:
mode:
Diffstat (limited to 'node/node.hpp')
-rw-r--r--node/node.hpp18
1 files changed, 17 insertions, 1 deletions
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<uint8_t> network_key;
+ void* network_key;
+
+ std::vector<MixData> 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);