o1-labs / o1js

TypeScript framework for zk-SNARKs and zkApps
https://docs.minaprotocol.com/en/zkapps/how-to-write-a-zkapp
Apache License 2.0
502 stars 111 forks source link

Add multi-range check to `assertAlmostReduced` #1703

Closed MartinMinkov closed 3 months ago

MartinMinkov commented 3 months ago

Summary

Addressing an issue with EcsdaSignature and ForeignCurve overriding check() to use assertAlmostReduced. This skips the option to multi-range check all the input variables, which can lead to passing assertions if a malicious prover wishes to do so.

Changes