arkworks-rs / arkworks-rs/std

Replace `UniformRand` by `CryptoRng + R`

Open
#36 1 comment 0 reactions 0 assignees View on GitHub
Dominant language
Rust
Stars
42
Forks
45
PR merge metrics
No merged PRs in 30d

Description

## Summary

`UniformRand` can be replaced by the providers in `rand` to reduce code complexity

## Problem Definition

The base field types need to implement `Standard: Distribution` as RNG requirement. Example:

https://github.com/arkworks-rs/algebra/blob/master/ec/src/models/short_weierstrass_jacobian.rs#L351-L363

This is superseded by [CryptoRng](https://rust-random.github.io/rand/rand/trait.CryptoRng.html) that wraps cryptographic requirements without requiring concrete implementations in `T`.

## Proposal

- [ ] Replace `UniformRand` by `RngCore + CryptoRng`
- [ ] Deprecate `UniformRand`

____

#### For Admin Use

- [ ] Not duplicate issue
- [ ] Appropriate labels applied
- [ ] Appropriate contributors tagged
- [ ] Contributor assigned/self-assigned

Contributor guide

No contributing guide indexed for this repository

Research direction

Start with the referenced ec/src/models/short_weierstrass_jacobian.rs example, then locate the UniformRand definition and its uses in this repository. Review the rand CryptoRng and RngCore requirements and determine the scope of the deprecation. Done means the proposal checklist is addressed and the affected tests pass.

Written by the indexing model from the issue text.

Assessment

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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.