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

Abstraction Refinement For Keccak #386

Open
d-xo opened this issue Sep 26, 2023 · 0 comments
Open

Abstraction Refinement For Keccak #386

d-xo opened this issue Sep 26, 2023 · 0 comments
Labels
enhancement New feature or request

Comments

@d-xo
Copy link
Collaborator

d-xo commented Sep 26, 2023

Right now we eagerly add a lot of complex and expensive constraints on the output of keccak (injectivity, large gaps, no collisons with value type storage slots). These are not always needed, and can significantly impact performance (e.g. adding large gaps slowed our test suite down a lot). In addition, these constraints may not even be precise enough since the solver will always produce a model for keccak that diverges from the real implementation.

We should consider the following:

  1. Add the constraints on keccak only if needed (i.e. if we get sat with a fully abstract model)
  2. Consider concretizing keccak outputs in a bottom up fashion (i.e. get a model from the solver for the deepest input, and then iteratively add constraints that the keccak outputs match the outputs of the real function on the concretized inputs). This is not a sound refinement in general (turning something sat into unsat with this approach does not imply safety), but if we remain sat, then the model we return will be correct.
@d-xo d-xo added the enhancement New feature or request label Sep 26, 2023
@msooseth msooseth removed their assignment Sep 4, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants