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

ChaChaPolyCryptolIETF: Return an Option in AEAD_CHACHA20_POLY1305_DECRYPT #1795

Merged
merged 4 commits into from
Feb 7, 2025

Conversation

RyanGlScott
Copy link
Contributor

This copies over changes made to the upstream cryptol-specs version of the ChaChaPolyCryptolIETF spec, up to and including a change to make the AEAD_CHACHA20_POLY1305_DECRYPT function return an Option (as done in GaloisInc/cryptol-specs#240). This is in pursuit of the eventual goal of purging uses of the (a, Bit) Cryptol anti-pattern in favor of returning Option types, as described in GaloisInc/cryptol-specs#239.)

This checks off one box in GaloisInc/cryptol-specs#239.

Brian Huffman and others added 4 commits February 7, 2025 10:12
This copies over the changes made to the upstream `cryptol-specs` version of
this spec in
GaloisInc/cryptol-specs@2adbcf1.

Co-authored-by: Ryan Scott <[email protected]>
This copies over the changes made to the upstream `cryptol-specs` version of
this spec in
GaloisInc/cryptol-specs@2966a9b.

Co-authored-by: Ryan Scott <[email protected]>
…RYPT (GaloisInc/cryptol-specs#239)

(This copies over the changes made to the upstream `cryptol-specs` version of
this spec in
GaloisInc/cryptol-specs@548ad3f
as part of GaloisInc/cryptol-specs#240. This is in pursuit of the eventual goal
of purging uses of the `(a, Bit)` Cryptol anti-pattern in favor of returning
`Option` types, as described in GaloisInc/cryptol-specs#239.)

Instead of returning `([m][8], Bit)`, where the `Bit` indicates whether the
result is valid or not, we now make the `AEAD_CHACHA20_POLY1305_DECRYPT`
function return an `Option`. We also introduce an `optFold` function to
`OptionUtils` to factor out some repeatedly used code needed to post-process
the decrypted results.

This checks off one box in GaloisInc/cryptol-specs#239.
Copy link
Contributor

@marsella marsella left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me! I did not build it separately, assuming that you pasted the version from cryptol-specs and added the note.

@RyanGlScott RyanGlScott merged commit f45090c into master Feb 7, 2025
50 checks passed
@RyanGlScott RyanGlScott deleted the cryptol-specs-T240-ChaChaPolyCryptolIETF branch February 7, 2025 15:58
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