RustCrypto / RustCrypto/hashes
blake2b: unusable in XOF fashion.
Nobody has claimed this yet.
- Dominant language
- Rust
- Stars
- 2.3k
- Forks
- 340
- Avg merge
- 12h 31m
- Merged PRs (30d)
- 2
Description
I might be missing something but with the latest blake2 crate I am unable to use it in XOF fashion.
Here's my use case: input some data to blake2 input, then read from it arbitrary number of bytes. This is valid use case to implement drbg from blake2 with "seed" which is also arbitrarily long. Of course I can work that around by hashing input to the size of some pseudo-rng (like ChaCha8Rng) but as far as I understand the contract for Rng is not to keep always the same output for the same seed (e.g. with the crate version change). I use quite extensively this functionality as many crypto protocols use keyed pseudo random functions and XOF was pretty straightforward way to implement it, and it would be nice to have this in blake2b implemented.
Please advise.
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.
Research direction
No file or test entry point is identified. Start by reviewing the blake2 crate's current API and the relevant Rust Rng and XOF contracts, then determine the intended arbitrary-length output behavior and how it would be validated. Done means the requested XOF-style use case has an agreed API and tests.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust
- Domain
- cryptography
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100