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

PQ-PSK prototype #310

Merged
merged 50 commits into from
Jun 27, 2024
Merged

PQ-PSK prototype #310

merged 50 commits into from
Jun 27, 2024

Conversation

jschneider-bensch
Copy link
Collaborator

@jschneider-bensch jschneider-bensch commented Jun 12, 2024

This crate implements a protocol for agreeing on a pre-shared key such that the protocol messages are secure against harvest-now-decrypt-later (HNDL) passive quantum attackers.

The protocol between initator A and receiver B roughly works as follows:

A:  (ik, enc) <- PQ-KEM(pk_B)
    K_0 <- KDF(ik, pk_B || enc || sctxt)
    K_m <- KDF(K_0, "Confirmation")
    K <- KDF(K_0, "PSK")
    mac_ttl <- MAC(K_m, psk_ttl)
A -> B: (enc, psk_ttl, mac_ttl)

Where

  • pk_B is the receiver's KEM public key,
  • sctx is context information for the given session of the protocol,
  • psk_ttl specifies for how long the PSK should be considered valid, and
  • K is the final PSK that is derived from the decapsulated shared secret based on the internal KEM.

The crate implements the protocol based on several different internal KEMs:

  • X25519, an elliptic-curve Diffie-Hellman KEM (not post-quantum secure; for performance comparison)
  • ML-KEM 768, a lattice-based post-quantum KEM, in the process of being standardized by NIST
  • Classic McEliece, a code-based post-quantum KEM & Round 4 candidate in the NIST PQ competition,
  • XWingKemDraft02, a hybrid post-quantum KEM, combining X25519 and ML-KEM 768 based KEMs

jschneider-bensch and others added 30 commits June 10, 2024 13:17
So they can be used by hybrid KEMs in the `libcrux-kem` crate.
So they can be used in the `libcrux-kem` crate
So they can be accessed in the `libcrux-kem` crate.
Base automatically changed from jonas/kem-crate to dev June 13, 2024 13:36
@franziskuskiefer franziskuskiefer added the waiting-on-author Status: This is awaiting some action from the author. label Jun 24, 2024
@jschneider-bensch jschneider-bensch marked this pull request as ready for review June 26, 2024 12:26
@jschneider-bensch jschneider-bensch changed the title WIP: PQ-PSK prototype PQ-PSK prototype Jun 26, 2024
@jschneider-bensch jschneider-bensch added waiting-on-review Status: Awaiting review from the assignee but also interested parties. and removed waiting-on-author Status: This is awaiting some action from the author. labels Jun 26, 2024
Copy link
Contributor

@karthikbhargavan karthikbhargavan left a comment

Choose a reason for hiding this comment

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

Very nice work. We don't exactly know how this will be deployed in the context of other protocols it needs to compose with, but let's leave that larger API/composition discussion for a future PR.

@jschneider-bensch jschneider-bensch merged commit 7d40ffc into dev Jun 27, 2024
46 checks passed
@jschneider-bensch jschneider-bensch deleted the jonas/psq branch June 27, 2024 06:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
waiting-on-review Status: Awaiting review from the assignee but also interested parties.
Projects
Status: ✅ Done
Development

Successfully merging this pull request may close these issues.

3 participants