Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Check correctness of as_u32 method in mem.rs #785

Closed
Tracked by #1376
kevaundray opened this issue Feb 9, 2023 · 0 comments
Closed
Tracked by #1376

Check correctness of as_u32 method in mem.rs #785

kevaundray opened this issue Feb 9, 2023 · 0 comments
Assignees
Labels
enhancement New feature or request ssa

Comments

@kevaundray
Copy link
Contributor

Problem

We currently use as_u32 to coerce a field element into a u32 by taking its value modulo 2^32.

See:

pub fn as_u32(value: FieldElement) -> u32 {

Solution

We should document whether this is safe to do, and or whether we should actually be enforcing that its value is reduced beforehand.

Alternatives considered

Additional context

@kevaundray kevaundray added documentation enhancement New feature or request ssa labels Feb 9, 2023
@github-project-automation github-project-automation bot moved this to 📋 Backlog in Noir May 11, 2023
@kevaundray kevaundray closed this as not planned Won't fix, can't repro, duplicate, stale Jun 9, 2023
@github-project-automation github-project-automation bot moved this from 📋 Backlog to ✅ Done in Noir Jun 9, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request ssa
Projects
Archived in project
Development

No branches or pull requests

3 participants