Hacktoberfest 2026: le issue che i maintainer hanno segnato per ottobre, aperte e adatte ai principianti. Sfoglia le issue Hacktoberfest

Enforce input limits for Hashes

Aperta
#165 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 2 giorni

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
4/5
Tempo stimato
3-5 giorni
Idoneità per principianti
42/100
Tipo di issue
Funzionalità
Chiarezza
Abbastanza chiara
Stato di attività
Attiva
Stack tecnologico
rust
Ambito
cryptography

Direzione di ricerca

Start by reading core::traits::Hash and the supported hash implementations in src/*.rs; look up each algorithm’s specified input limit. Check whether the one-shot and do_final() APIs can report limit errors, and whether do_update() needs the same pathway. Done means boundary tests show input below the limit succeeds and input exceeding it returns an error.

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

Descrizione

All hash functions (SHA2, SHA3, SM3, etc) have a specified input limit beyond which output can start repeating. Currently our core::traits::Hash trait does not have any way to return errors.

Task

  • Look up the specified input limits for each supported hash function.
  • Add an error pathway to at least the one-shot, do_final() APIs, and maybe also the do_update() APIs in core::traits::Hash.
  • Add unit tests (inside the src/*.rs file) that absorb some input, reach inside and set the counter to very close to the limit, absorb more input that does not exceed the limit (should pass), then absorb input that does exceed the limit (should throw error).
Lingua principale
Rust
Stelle
25
Fork
18
Merge medio
14g 10h
PR unite (30g)
5

Preparare l'ambiente

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 bcgit/bc-rust

Tutte le issue di bcgit/bc-rust

Issue simili

Altre issue su Rust

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.