RustCrypto / RustCrypto/elliptic-curves

primeorder: have `impl_mont_field_element!` define inversions

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

Nobody has claimed this yet.

Dominant language
Rust
Stars
874
Forks
299
Avg merge
1d 4h
Merged PRs (30d)
12

Description

Right now every field implementation independently defines pub fn invert and fn invert_unchecked using the impl_bernstein_yang_invert! macro.

This is largely due to historical legacy: the impl_bernstein_yang_invert! macro was introduced later and never properly integrated into impl_mont_field_element!

In the next breaking release, primeorder should integrate these two macros so inversions are defined automatically.

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 reading the impl_mont_field_element! and impl_bernstein_yang_invert! macro entry points and comparing how field implementations currently define invert and invert_unchecked. Done means the macros are integrated so inversions are defined automatically without each field implementation defining them independently.

Written by the indexing model from the issue text.

Assessment

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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.