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

Test Constraints Rigorously #100

Open
aszepieniec opened this issue Oct 31, 2022 · 3 comments
Open

Test Constraints Rigorously #100

aszepieniec opened this issue Oct 31, 2022 · 3 comments
Labels

Comments

@aszepieniec
Copy link
Collaborator

One tiny oversight in the constraints constitutes a catastrophic security hole. It is imperative that the constrains be water-tight. This issue is about testing them to verify their correctness (soundness really).

Maybe some philosophy is in order: what other strategies are there that can help a) catch errors, and b) convince third parties of the code's correctness. Unit tests are obviously useful but can only get you so far.

Formal verification is an obvious candidate but seems like a rather extreme option for the quantity of work involved.

@jan-ferdinand
Copy link
Member

jan-ferdinand commented Nov 1, 2022

I would argue that part of that effort is to make the code for the constraints more legible.

@Sword-Smith
Copy link
Collaborator

I definitely think the mathematical approach is the primary one: Having well-documented constraints defined.

Number two on that list could be a fuzzing: Make a pertubation in a specific column and check that the verifier fails. Do this in a loop over all columns.

@jan-ferdinand
Copy link
Member

As @aszepieniec has pointed out, Gröbner basis analysis can help. Particularly, the constraints of all deterministic instructions (like add, but not divine) must have a single solution, which is easily verifiable given a Gröbner basis.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
No open projects
Status: Todo
Development

No branches or pull requests

3 participants