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

Add unbounded AES-GCM proof #80

Closed
wants to merge 39 commits into from

Conversation

chameco
Copy link
Contributor

@chameco chameco commented Jan 9, 2023

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

robdockins and others added 30 commits April 26, 2022 10:55
It can instead be computed from the GCM context instead.
variable, similar to the already-existing verification commands.
encrypt update function with sybmolic message lengths using
partial specifications for the constituent functions.

Currently, we're having to play some tricks and make a few
minor changes to the source to get this to work.
except for decrypt update (probably not very hard).

At this point, we are assuming block alignment (16-bytes), but
I hope this will be not too hard to lift this restriction later.
We need a new specifciation refinement feature to
really tie everything together, but the GHASH procedure
is proved correct for block sizes from 1 to 18, which is
the maximum number that can be processed following the
bulk encrypt/decrypt phase.
Currently, this uses too much memory to actualy run all the proofs.
This currently captures the loop indexing variable,
the pointer offsets into the various buffers involved,
the IV+counter increments, and the status of a few of the other
auxiliary registers.

The major remaining pieces needed to capure in the invariant are
1) the status of the prefetched and byte-swapped input blocks
on the stack 2) the state of the Xi register 3) the state of
the output buffer.
The current state captures most of the "bookeeping" aspects of the
loops, and are sufficent to prove memory-safety.
All obligations now go through, execpt the final Xi postcondition.
implementation-level specification functions.
the bulk encryption phase Xi postcondition.
There are a whole bunch of gross hacks in here; it would
be nice to see if we can clean some of them up.
the gcm procedures that should eventually be handled in the same
way as the other verification patches in `SAW/patch`.
Tweak the AES-HW-CTR proofs.  This seems like it makes
them a bit faster, but does not seem to affect the memory
usage much.
encrypt Xi lemmas file to make them somewhat less mysterious.
and gcm_ghash_array_internal.
with arrayCopy. Not entirely sure if the statement
or proof sketch is correct.

Add comments to other lemmas with a brief description
of what they prove.
and simplify the definition of `aesni_gcm_cipher_block6`.
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.

3 participants