mirror of
https://github.com/varun-r-mallya/py-libp2p.git
synced 2025-12-31 20:36:24 +00:00
Merge pull request #431 from wolfgang/patch-1
Don't hash data passed to nacl library in Ed25519PublicKey.verify
This commit is contained in:
@ -24,9 +24,8 @@ class Ed25519PublicKey(PublicKey):
|
||||
|
||||
def verify(self, data: bytes, signature: bytes) -> bool:
|
||||
verify_key = VerifyKey(self.to_bytes())
|
||||
h = SHA256.new(data)
|
||||
try:
|
||||
verify_key.verify(h, signature)
|
||||
verify_key.verify(data, signature)
|
||||
except BadSignatureError:
|
||||
return False
|
||||
return True
|
||||
|
||||
Reference in New Issue
Block a user