diff --git a/src/client.rs b/src/client.rs index 31e3b29..d543d04 100644 --- a/src/client.rs +++ b/src/client.rs @@ -139,7 +139,6 @@ pub async fn client_mode(client_config: ClientConfiguration) { if s_cipher.is_some() { let aes = Aes256Gcm::new(s_cipher.as_ref().unwrap().as_bytes().into()); let nonce = Nonce::clone_from_slice(&wrapped_packet.nonce); - info!("Key: {:?} / nonce: {:?}", s_cipher.as_ref().unwrap().as_bytes(), &nonce); match aes.decrypt(&nonce, &wrapped_packet.data[..]) { Ok(decrypted) => { tx.send(decrypted); }, Err(error) => error!("Decryption error! {:?}", error) @@ -170,7 +169,7 @@ pub async fn client_mode(client_config: ClientConfiguration) { if s_c.is_some() { let aes = Aes256Gcm::new(s_c.as_ref().unwrap().as_bytes().into()); let nonce = Aes256Gcm::generate_nonce(&mut OsRng); - info!("Nonce len: {:?}", &nonce.len()); + info!("Key {:?} / nonce {:?}", s_c.as_ref().unwrap().as_bytes(), &nonce.bytes()); let ciphered_data = aes.encrypt(&nonce, &bytes[..]); if let Ok(ciphered_d) = ciphered_data { diff --git a/src/server.rs b/src/server.rs index cfec5d1..089626a 100644 --- a/src/server.rs +++ b/src/server.rs @@ -72,8 +72,6 @@ pub async fn server_mode(server_config: ServerConfiguration) { let aes = Aes256Gcm::new(&peer.shared_secret.into()); let nonce = Aes256Gcm::generate_nonce(&mut OsRng); - - info!("Key: {:?} / nonce: {:?}", &peer.shared_secret, &nonce); let ciphered_data = aes.encrypt(&nonce, &buf[..n]); @@ -138,7 +136,7 @@ pub async fn server_mode(server_config: ServerConfiguration) { 1 => { let packet = UDPVpnPacket::deserialize(&(buf[..len].to_vec())); mp.values().filter(| p | p.addr == addr).for_each(|p| { - info!("UDPeer addr == addr / {:?}", &p.shared_secret); + info!("Key {:?} / nonce {:?}", &p.shared_secret, &packet.nonce); let aes = Aes256Gcm::new(&p.shared_secret.into()); let nonce = Nonce::clone_from_slice(&packet.nonce[..]); match aes.decrypt(&nonce, &packet.data[..]) {