From 58e4bf3c803d0c6300c22c7f699b41d618656a31 Mon Sep 17 00:00:00 2001 From: Mark Qvist Date: Sat, 18 Sep 2021 18:32:12 +0200 Subject: [PATCH] Work on tunnels --- RNS/Transport.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/RNS/Transport.py b/RNS/Transport.py index e7cc42b..dfca312 100755 --- a/RNS/Transport.py +++ b/RNS/Transport.py @@ -929,7 +929,7 @@ class Transport: RNS.log("Tunnel synth for "+str(interface)) RNS.log("Transport ID : "+str(Transport.identity)) RNS.log("Tunnel ID : "+RNS.hexrep(tunnel_id)) - RNS.log("IF hash : "+RNS.hexrep(tunnel_id)) + RNS.log("IF hash : "+RNS.hexrep(interface_hash)) RNS.log("Public key : "+RNS.hexrep(public_key)) RNS.log("Signature : "+RNS.hexrep(signature)) @@ -948,7 +948,7 @@ class Transport: if len(data) == expected_length: public_key = data[:RNS.Identity.KEYSIZE//8] interface_hash = data[RNS.Identity.KEYSIZE//8:RNS.Identity.KEYSIZE//8+RNS.Identity.HASHLENGTH//8] - tunnel_id_data = data[:RNS.Identity.KEYSIZE//8+RNS.Identity.HASHLENGTH] + tunnel_id_data = public_key+interface_hash tunnel_id = RNS.Identity.full_hash(tunnel_id_data) random_hash = data[RNS.Identity.KEYSIZE//8+RNS.Identity.HASHLENGTH:RNS.Identity.KEYSIZE//8+RNS.Identity.HASHLENGTH//8+RNS.Reticulum.TRUNCATED_HASHLENGTH//8] signature = data[RNS.Identity.KEYSIZE//8+RNS.Identity.HASHLENGTH//8+RNS.Reticulum.TRUNCATED_HASHLENGTH//8:expected_length]