RustCrypto / RustCrypto/crypto-bigint
Less errors in `RandomBits` methods
Nobody has claimed this yet.
- Dominant language
- Rust
- Stars
- 309
- Forks
- 95
- Avg merge
- 1d 14h
- Merged PRs (30d)
- 3
Description
A possible change of contract of RandomBits that can eliminate some error/panic cases: in the methods that take bits_precision, treat it as at_least_bits_precision in BoxedUint. That is if RandomBits::random_bits_with_precision() is called with bits_precision == 128 for U256, it will return U256 instead of panicking. Or is that too dynamic?
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
Start with RandomBits::random_bits_with_precision() and the other RandomBits methods that take bits_precision, then compare their current contract with BoxedUint's precision behavior. Done means reaching an agreed answer on whether bits_precision is treated as a minimum, including the U256/128 example, and documenting or testing the resulting contract.
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
- Mostly clear
- Newbie friendliness
- 35/100