Skip to content

docs: clarify X3DH primitive interfaces and passive-secrecy game#3

Open
jinxinglim wants to merge 4 commits intomainfrom
minor-refinements/comments-and-cleanup
Open

docs: clarify X3DH primitive interfaces and passive-secrecy game#3
jinxinglim wants to merge 4 commits intomainfrom
minor-refinements/comments-and-cleanup

Conversation

@jinxinglim
Copy link
Copy Markdown

@jinxinglim jinxinglim commented Apr 23, 2026

Summary

Documentation-only refinements made while reading through the X3DH-related files. Adds future-work notes to the primitive interfaces (KEM, AEAD), documents a notation convention in X3DH.lean, and expands explanations in the passive-secrecy game file.

No code/theorem changes — only comments, doc headers, and one cosmetic subscript fix.

Files changed

PQXDHLean/KEM.lean

  • Document current scope: deterministic encaps/decaps, no keygen (sufficient for correctness proofs)
  • Add future-work section noting what's needed for security proofs (IND-CCA, SH-CR): probabilistic encaps and a keygen operation, plus a suggested refactor pattern (separate KEMSpec alongside KEM, mirroring the KDF/KDFOracle split)

PQXDHLean/AEAD.lean

  • Document current scope: deterministic, no nonce (sufficient because X3DH uses each session key exactly once)
  • Add future-work section for security proofs: nonce parameter and probabilistic encrypt for IND-CPA
  • Cross-reference the IND-CPA + INT-CTXT assumption formalized in SecurityDefs.lean

PQXDHLean/X3DH/X3DH.lean

  • Add notation-convention block: lowercase names denote private keys (scalars in F), uppercase names denote public keys (group elements in G), subscripts / indicate owner (Alice / Bob)
  • Fix inconsistent subscript: SK_BSKᵦ (matches existing SKₐ)

PQXDHLean/X3DH/X3DHPassiveMessageSecrecy.lean

  • Expand the game description to list the 5 specific private keys sampled (ikₐ, ekₐ, ikᵦ, spkᵦ, opkᵦ) — not just "all private keys"
  • Clarify that the random key is sampled from SK (the KDF's output space)
  • Explain why the DDH challenge T is embedded at DH3 specifically: DH3 = ekₐ • SPKᵦ is the only DH value whose computation needs both secret scalars hidden in the DDH challenge; DH1/DH2/DH4 each involve at least one scalar the reduction samples itself

jinxinglim and others added 4 commits April 21, 2026 16:44
Document current scope (deterministic, no keygen) and what extensions
are needed for security proofs (probabilistic encaps, keygen).

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Document current scope (deterministic, no nonce) and what extensions
are needed for security proofs (nonce parameter, probabilistic encrypt).

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Document the lowercase/uppercase private/public key convention and
replace ASCII SK_B with SKᵦ for consistency with SKₐ.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
- Expand the game description to list the 5 specific private keys
  (ikₐ, ekₐ, ikᵦ, spkᵦ, opkᵦ) and note that the random key is
  sampled from SK (the KDF's output space)
- Explain why T is embedded at DH3 specifically: it's the only DH
  value whose computation needs both secret scalars hidden in the
  DDH challenge (ekₐ, spkᵦ); the other DH values each involve at
  least one scalar the reduction samples itself

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Copy link
Copy Markdown
Contributor

@ChristianoBraga ChristianoBraga left a comment

Choose a reason for hiding this comment

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

@jinxinglim could you please answer my comment?

embeds T as DH3, queries the ROM on the resulting DH tuple to
get a session key, and passes it directly to the adversary.

Why DH3? Among the four X3DH DH values, DH3 = ekₐ • SPKᵦ is the
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Could you revise and elaborate this further?

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