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

std/math/emulated: constrain the limbs for the inputs and the witness #348

Closed
gbotrel opened this issue Jul 29, 2022 · 0 comments
Closed
Assignees
Labels
bug Something isn't working
Milestone

Comments

@gbotrel
Copy link
Collaborator

gbotrel commented Jul 29, 2022

Technically, the API encourages the use of NewElement[T] or Assign which will build element with correct number of limbs.

But since these limbs are unconstrained, there is no soundness guarantees at the proof system level.

@gbotrel gbotrel added the bug Something isn't working label Jul 29, 2022
@gbotrel gbotrel added this to the v0.9.0 milestone Jul 29, 2022
ivokub added a commit that referenced this issue Dec 14, 2022
ivokub added a commit that referenced this issue Dec 15, 2022
ivokub added a commit that referenced this issue Dec 17, 2022
* feat: add emulated builder init

* fix: do not assumed reduced elements in div

* feat: add secp256k1 scalar field

* refactor: export Field

* refactor: export modular reduction method

* feat: allow select/lookup2 on non-reduced inputs

* chore: remove invalid comments

* perf: mod reduce after multiplication

* perf: update optimisation test

* refactor: hint helpers as field methods

* refactor: remove field params from element

* refactor: separate non-native field from api wrapper

* refactor: use nonnative elm pointers

* refactor: call EnforceWidth in PackLimbs

* refactor: add new element constructor

* feat: do not range-check in-circuit ops

* style: remove temp allocations

* feat: add MulMod nonnative op

* feat: add mutable variants of ops

* feat: add mul by const

* test: update circuit statistics

* test: update emulation constraint count

* feat: add bn254 fields and unify param names

* docs: update field emulation docs

* docs: add examples into documentation

* test: add test case for #348

* chore: remove dead code

* docs: fix method docs
@gbotrel gbotrel modified the milestones: v0.9.0, v0.8.0 Jan 13, 2023
@gbotrel gbotrel closed this as completed Jan 24, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants