Work on tunnels

This commit is contained in:
Mark Qvist 2021-09-18 18:33:28 +02:00
parent 58e4bf3c80
commit 24d8f39dd1
1 changed files with 3 additions and 0 deletions

View File

@ -930,6 +930,7 @@ class Transport:
RNS.log("Transport ID : "+str(Transport.identity))
RNS.log("Tunnel ID : "+RNS.hexrep(tunnel_id))
RNS.log("IF hash : "+RNS.hexrep(interface_hash))
RNS.log("Rnd has : "+RNS.hexrep(interface_hash))
RNS.log("Public key : "+RNS.hexrep(public_key))
RNS.log("Signature : "+RNS.hexrep(signature))
@ -951,6 +952,7 @@ class Transport:
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]
signed_data = tunnel_id_data+random_hash
@ -960,6 +962,7 @@ class Transport:
RNS.log("Transport ID : "+str(Transport.identity))
RNS.log("Tunnel ID : "+RNS.hexrep(tunnel_id))
RNS.log("IF hash : "+RNS.hexrep(interface_hash))
RNS.log("Rnd has : "+RNS.hexrep(interface_hash))
RNS.log("Public key : "+RNS.hexrep(public_key))
RNS.log("Signature : "+RNS.hexrep(signature))