Skip to content
This repository was archived by the owner on May 16, 2019. It is now read-only.

Commit d3a7de8

Browse files
committed
Refactor packet signature
1 parent 3e8ac3d commit d3a7de8

File tree

1 file changed

+0
-5
lines changed

1 file changed

+0
-5
lines changed

net/wireprotocol.py

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -94,11 +94,6 @@ def receive_message(self, datagram):
9494
m.sender.natType,
9595
m.sender.vendor)
9696
if self.time_last_message == 0:
97-
pubkey = m.sender.publicKey
98-
verify_key = nacl.signing.VerifyKey(pubkey)
99-
signature = m.signature
100-
m.ClearField("signature")
101-
verify_key.verify(m.SerializeToString(), signature)
10297
h = nacl.hash.sha512(m.sender.publicKey)
10398
pow_hash = h[40:]
10499
if int(pow_hash[:6], 16) >= 50 or m.sender.guid.encode("hex") != h[:40]:

0 commit comments

Comments
 (0)