Update ed25519.py

Don't hash data passed to nacl library in Ed25519PublicKey.verify
pull/431/head
Wolfgang Deutsch 2021-03-16 08:55:44 +01:00 committed by GitHub
parent 2efc072ad9
commit 0a9f8d23a3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 2 deletions

View File

@ -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