RustCrypto / RustCrypto/crypto-bigint

`bits` => `bit_width`

Open
#1,327 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

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

Description

We currently provide bits and bits_vartime methods to compute the number of bits needed to represent a particular value.

It seems that Rust 1.97 stabilized <{uN}>::bit_width as the name for the core equivalent of these methods.

We should probably follow suit, switching from bits => bit_width, and deprecating the old name.

(Sidebar: does this make bits_precision inconsistent, or should we keep that?)

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 bits and bits_vartime methods and the tests covering them. Review the corresponding core naming and determine how bits_precision fits with the proposed rename. Done means the new bit_width API is available, the old name is deprecated, and coverage reflects the finalized naming.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust
Domain
cryptography
Issue type
Refactor
Difficulty
3/5
Estimated time
1-2 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
65/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.