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

Further proof optimization #21

Merged
merged 17 commits into from
Oct 1, 2024
Merged

Further proof optimization #21

merged 17 commits into from
Oct 1, 2024

Conversation

JoaoDiogoDuarte
Copy link
Collaborator

@JoaoDiogoDuarte JoaoDiogoDuarte commented Sep 30, 2024

This PR optimizes the runtime of the proof in the following ways:

  1. Removed unused lemmas and dependencies.
  2. Improved invert op proof in Curve25519_Operations.ec
  3. Symlinked the ref4 correctness proof to the mulx repository and use transitivity for the mulx proofs whose related procedures contain the exact same code as they originate from the common subfolder in src.

As an example of point 3 conditional swapping is done exactly the same in mulx and ref4, so instead of proving the lemma directly in both the mulx and ref4 proofs, we prove it for ref4 and use transitivity for the mulx proof.

This last point also allows for better management of code shared between repositories.

This is a draft as I resolve merge issues.

@JoaoDiogoDuarte JoaoDiogoDuarte changed the title Draft: Proof optimization Draft: Further proof optimization Sep 30, 2024
@JoaoDiogoDuarte JoaoDiogoDuarte changed the title Draft: Further proof optimization Further proof optimization Sep 30, 2024
@tfaoliveira-sb
Copy link
Collaborator

Cool!

Can you take a look into:

$ cat formosa-25519/proof/crypto_scalarmult/curve25519/amd64/mulx/.ci/CorrectnessProof.ec.out.error
1
[critical] [: line 1 (0) to line 3 (112)] In external theory CorrectnessProofRef4 [: line 1 (0) to line 3 (73)]:

cannot locate theory `Ref4_scalarmult_s

Maybe files/links/extraction names need to be arranged differently.

@JoaoDiogoDuarte
Copy link
Collaborator Author

Should be fixed! I did this by removing symlinks and added -R crypto_scalarmult/ to the Easycrypt command in the proof Makefile along with some little tweaks.

@tfaoliveira-sb tfaoliveira-sb merged commit 1bc6d07 into main Oct 1, 2024
7 checks passed
@tfaoliveira-sb tfaoliveira-sb deleted the proof-optimization branch October 9, 2024 11:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants