RustCrypto / RustCrypto/crypto-bigint

Uint: `const fn` comparisons are `pub(crate)`

Open
#881 3 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Rust
Stars
309
Forks
96
Avg merge
1d 14h
Merged PRs (30d)
3

Description

I was recently trying to add some const fn friendly checks that a field element doesn't overflow the modulus, and while Uint::lt would do what I want, it's currently pub(crate), as are other comparisons like const fn eq and const fn gt.

@fjarri @andrewwhitehead is there a particular reasons these methods aren't exposed? They seem useful

Contributor guide

No contributing guide indexed for this repository

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.

Research direction

Start by locating the definitions of Uint::lt, Uint::eq, and Uint::gt and inspect nearby tests or visibility conventions. Done means the const comparison methods needed by downstream field-element code are publicly usable, with existing tests still passing.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust
Domain
cryptography
Issue type
Feature
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Clearly specified
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.