swap id key for sphinx key

This commit is contained in:
Simon Wicky
2023-07-24 16:54:08 +02:00
parent eca406d9a7
commit dc77e3f962
5 changed files with 19 additions and 24 deletions
@@ -1,7 +1,7 @@
// Copyright 2020 - Nym Technologies SA <contact@nymtech.net>
// SPDX-License-Identifier: Apache-2.0
use crate::node::identity::{PUBLIC_KEY_LENGTH, SECRET_KEY_LENGTH};
use crate::node::encryption::{PRIVATE_KEY_SIZE, PUBLIC_KEY_SIZE};
use crate::node::listener::connection_handler::packet_processing::{
MixProcessingResult, PacketProcessor,
};
@@ -9,7 +9,7 @@ use crate::node::packet_delayforwarder::PacketDelayForwardSender;
use crate::node::TaskClient;
use futures::StreamExt;
use nym_client_core::client::topology_control::accessor::TopologyAccessor;
use nym_crypto::asymmetric::identity;
use nym_crypto::asymmetric::encryption;
use nym_mixnode_common::measure;
use nym_noise::upgrade_noise_responder;
use nym_sphinx::forwarding::packet::MixPacket;
@@ -30,8 +30,8 @@ pub(crate) struct ConnectionHandler {
packet_processor: PacketProcessor,
delay_forwarding_channel: PacketDelayForwardSender,
topology_access: TopologyAccessor,
private_identity_key: [u8; SECRET_KEY_LENGTH],
public_identity_key: [u8; PUBLIC_KEY_LENGTH],
private_identity_key: [u8; PRIVATE_KEY_SIZE],
public_identity_key: [u8; PUBLIC_KEY_SIZE],
}
impl ConnectionHandler {
@@ -39,7 +39,7 @@ impl ConnectionHandler {
packet_processor: PacketProcessor,
delay_forwarding_channel: PacketDelayForwardSender,
topology_access: TopologyAccessor,
identity_key: &identity::KeyPair,
identity_key: &encryption::KeyPair,
) -> Self {
ConnectionHandler {
packet_processor,
+1 -9
View File
@@ -164,7 +164,7 @@ impl MixNode {
packet_processor,
delay_forwarding_channel,
topology_access,
&self.identity_keypair,
&self.sphinx_keypair,
);
let listening_address = SocketAddr::new(
@@ -325,14 +325,6 @@ impl MixNode {
if self.check_if_bonded().await {
warn!("You seem to have bonded your mixnode before starting it - that's highly unrecommended as in the future it might result in slashing");
}
println!(
"Secret key start : {:?}",
self.identity_keypair.private_key().to_bytes()
);
println!(
"Public key start : {:?}",
self.identity_keypair.public_key().to_bytes()
);
let shutdown = TaskManager::default();