diff options
| author | Dennis Brentjes <d.brentjes@gmail.com> | 2016-11-16 19:55:11 +0100 |
|---|---|---|
| committer | Dennis Brentjes <d.brentjes@gmail.com> | 2016-11-16 19:55:11 +0100 |
| commit | 6ae607cc84b671810fca9c24b1c131ca12d922e7 (patch) | |
| tree | e078e5e30cf2f979a1dbd0baefd18a9f58191f07 /node/node.cpp | |
| parent | f93d52bbd0053574fb35d72b85c4b299dc1f3ee5 (diff) | |
| download | cmix-6ae607cc84b671810fca9c24b1c131ca12d922e7.tar.gz cmix-6ae607cc84b671810fca9c24b1c131ca12d922e7.tar.bz2 cmix-6ae607cc84b671810fca9c24b1c131ca12d922e7.zip | |
Working implementation of elgamal in 2048 bit multiplicative group.
Diffstat (limited to 'node/node.cpp')
| -rw-r--r-- | node/node.cpp | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/node/node.cpp b/node/node.cpp index 5bce063..0f2bae5 100644 --- a/node/node.cpp +++ b/node/node.cpp @@ -215,7 +215,19 @@ void Node::start_realtime_phase() { generate_random_message(&cmix_ctx, v.data()); swap_k_for_r(&cmix_ctx, &(*realpre.mutable_m(index))[0], v.data(), data[handle].shared_value, index); } else { - swap_k_for_r(&cmix_ctx, &(*realpre.mutable_m(index))[0], queue.front().data(), data[handle].shared_value, index); + std::string x = to_string(data.at(handle).shared_value, cmix_ctx); + { + std::stringstream ss; + ss << "shared_key: "; + for(auto&& c : x) { + ss << "\\" << std::setw(3) << std::setfill('0') << std::oct << (unsigned int) c; + } + BOOST_LOG_TRIVIAL(trace) << ss.str(); + } + + BOOST_LOG_TRIVIAL(trace) << + + swap_k_for_r(&cmix_ctx, &(*realpre.mutable_m(index))[0], queue.front().data(), data.at(handle).shared_value, index); } *realpre.mutable_h(index) = handle; } |
