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

Modularized PSQ #401

Merged
merged 21 commits into from
Jul 22, 2024
Merged

Modularized PSQ #401

merged 21 commits into from
Jul 22, 2024

Conversation

jschneider-bensch
Copy link
Collaborator

@jschneider-bensch jschneider-bensch commented Jul 15, 2024

This PR modularizes the PSQ protocol into

  • a PSQ-component generation module: A minimal version of the previous PSQ protocol, deriving a "Pre-PSK" by encapsulating towards the receiver using PQ-KEM and then working in outer protocol context into the shared secret.
  • A protocol binder that makes use of the PSQ-component generation to bind to incorporate outer protocol requirements, e.g. a PSK time to live or binding / authenticating other material. This is exemplified here by a binder for ECDH based-protocols with PSK-TTL.

@jschneider-bensch jschneider-bensch marked this pull request as ready for review July 16, 2024 12:40
@jschneider-bensch jschneider-bensch changed the title WIP modularized PSQ Moodularized PSQ Jul 16, 2024
@jschneider-bensch jschneider-bensch changed the title Moodularized PSQ Modularized PSQ Jul 16, 2024
Copy link
Member

@franziskuskiefer franziskuskiefer left a comment

Choose a reason for hiding this comment

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

Thanks! lgtm in general. I left some comments on the code (not protocol, that looks fine).

libcrux-psq/Cargo.toml Show resolved Hide resolved
libcrux-psq/src/ecdh_binder.rs Outdated Show resolved Hide resolved
libcrux-psq/src/ecdh_binder.rs Outdated Show resolved Hide resolved
libcrux-psq/src/ecdh_binder.rs Outdated Show resolved Hide resolved
libcrux-psq/src/ecdh_binder.rs Outdated Show resolved Hide resolved
libcrux-psq/src/ecdh_binder.rs Outdated Show resolved Hide resolved
libcrux-psq/src/ecdh_binder.rs Outdated Show resolved Hide resolved
libcrux-psq/src/ecdh_binder.rs Outdated Show resolved Hide resolved
libcrux-psq/src/ecdh_binder.rs Outdated Show resolved Hide resolved
libcrux-psq/examples/encaps.rs Outdated Show resolved Hide resolved
@jschneider-bensch
Copy link
Collaborator Author

jschneider-bensch commented Jul 18, 2024

We know the content (or its size, rather) of the AEAD ciphertext as well, so I could use the non-allocating API there, too.
But I found that a bit weird to use, since you have to allocate a buffer for ciphertext and tag, and it returns the tag as well.

Copy link
Member

@franziskuskiefer franziskuskiefer left a comment

Choose a reason for hiding this comment

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

lgtm, let's get this in and then iterate.

It would be great if you would add a usage example in the lib docs os there's an easy starting point.

@jschneider-bensch jschneider-bensch merged commit 2daee9c into main Jul 22, 2024
52 checks passed
@jschneider-bensch jschneider-bensch deleted the jonas/modularize-psq branch July 22, 2024 11:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: No status
Development

Successfully merging this pull request may close these issues.

2 participants