- 
                Notifications
    
You must be signed in to change notification settings  - Fork 330
 
Open
Labels
Milestone
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()
    )