Hacktoberfest 2026: the issues maintainers tagged for October, open and beginner-friendly. Browse Hacktoberfest issues

Enforce input limits for Hashes

Open
#165 0 comments 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 2 days

Nobody has claimed this yet.

Assessment

Difficulty
4/5
Estimated time
3-5 days
Newbie friendliness
42/100
Issue type
Feature
Clarity
Mostly clear
Activity status
Active
Tech stack
rust
Domain
cryptography

Research direction

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.

Written by the indexing model from the issue text.

Description

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).
Dominant language
Rust
Stars
25
Forks
18
Avg merge
14d 10h
Merged PRs (30d)
5

Getting set up

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from bcgit/bc-rust

All issues in bcgit/bc-rust

Similar issues

More Rust issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.