ecdsa.keys.VerifyingKey.verify_digest should fail for CurveEdTw
Nobody has claimed this yet.
Assessment
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Newbie friendliness
- 45/100
- Issue type
- Bug
- Clarity
- Mostly clear
- Activity status
- Stale
- Tech stack
- python
- Domain
- cryptography
Research direction
Start at ecdsa.keys.VerifyingKey.verify_digest and compare its handling of CurveEdTw with the verify usage shown in the issue. Make the unsupported call fail explicitly with an understandable error, and verify that CurveEdTw users are directed toward verify rather than verify_digest.
Written by the indexing model from the issue text.
Description
The verify_digest should explicitly fail if used with CurveEdTw, otherwise it leads to very hard to understand error:
AttributeError: 'PublicKey' object has no attribute 'order'
By the way, I was trying to verify the signature which was created for a message hashed with blake2b, and the correct usage is this (ie not to use verify_digest). But I had to study the code to understand the mistake.
pk: VerifyingKey = VerifyingKey.from_string(
public_key,
curve=Ed25519,
)
hash_object = blake2b(digest_size=32)
hash_object.update(message)
return pk.verify(
signature=signature,
data=hash_object.digest()
)
- Dominant language
- Python
- Stars
- 973
- Forks
- 343
- PR merge metrics
- No merged PRs in 30d
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from tlsfuzzer/python-ecdsa
-
Difficulty 4/5 3-5 days Newbie friendliness 35/100
tlsfuzzer/python-ecdsa#381 ·
-
feature help wanted
Difficulty 4/5 3-5 days Newbie friendliness 35/100
tlsfuzzer/python-ecdsa#348 · 1 comment ·
-
bug help wanted
Difficulty 3/5 1-2 days Newbie friendliness 35/100
tlsfuzzer/python-ecdsa#341 · 1 comment ·
-
Add type annotations Openmaintenance
Difficulty 5/5 Over a week Newbie friendliness 25/100
tlsfuzzer/python-ecdsa#340 · 4 comments · 1 reaction ·
-
remove `hmac_compat` Openmaintenance
Difficulty 2/5 1-3 hours Newbie friendliness 45/100
tlsfuzzer/python-ecdsa#316 ·
All issues in tlsfuzzer/python-ecdsa
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
-
enhancement
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 74/100