Work on tunnels
This commit is contained in:
parent
7d804daa8f
commit
8b8d4410ef
@ -946,9 +946,11 @@ class Transport:
|
|||||||
|
|
||||||
if len(data) == expected_length:
|
if len(data) == expected_length:
|
||||||
public_key = data[:RNS.Identity.KEYSIZE//8]
|
public_key = data[:RNS.Identity.KEYSIZE//8]
|
||||||
tunnel_id = RNS.Identity.full_hash(data[:RNS.Identity.KEYSIZE//8+RNS.Identity.HASHLENGTH])
|
tunnel_id_data = data[:RNS.Identity.KEYSIZE//8+RNS.Identity.HASHLENGTH]
|
||||||
|
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]
|
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]
|
signature = data[RNS.Identity.KEYSIZE//8+RNS.Identity.HASHLENGTH//8+RNS.Reticulum.TRUNCATED_HASHLENGTH//8:expected_length]
|
||||||
|
signed_data = tunnel_id_data+random_hash
|
||||||
|
|
||||||
remote_transport_identity = RNS.Identity(create_keys=False)
|
remote_transport_identity = RNS.Identity(create_keys=False)
|
||||||
remote_transport_identity.load_public_key(public_key)
|
remote_transport_identity.load_public_key(public_key)
|
||||||
|
Loading…
Reference in New Issue
Block a user