ecdsa.keys.VerifyingKey.verify_digest should fail for CurveEdTw

Aperta
#349 1 commento 0 reazioni 0 assegnatari Vedi su GitHub

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
2/5
Tempo stimato
1-3 ore
Idoneità per principianti
45/100
Tipo di issue
Bug
Chiarezza
Abbastanza chiara
Stato di attività
Ferma
Stack tecnologico
python
Ambito
cryptography

Direzione di ricerca

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.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

bug help wanted

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()
    )
Lingua principale
Python
Stelle
973
Fork
343
Metriche di merge delle PR
Nessuna PR unita negli ultimi 30g

Guida per i contributori

Nessuna guida per i contributori indicizzata per questo repository

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di tlsfuzzer/python-ecdsa

Tutte le issue di tlsfuzzer/python-ecdsa

Issue simili

Altre issue su Python

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.