Skip to content

Add ideal-cipher Davies–Meyer PRF and single/multi-root context replacement #462

Backlog

Description

@MarcIlunga

Background

Ideal-cipher compression-function proofs (Boneh–Shoup Theorem 8.5, Davies–Meyer PRF) and multi-user ideal-cipher constructions (#14, #237) need a reusable tweakable ideal-cipher model, a planting involution preserving the uniform cipher marginal, adaptive PRF security 2r / |State|, and generic single-root and multi-root context-replacement theorems sharing one public ideal cipher.

Proposed change

  • Add src/Commons/Schemes/Cipher/DaviesMeyer.lean: tweakable ideal-cipher interfaces and systems (CipherFamily, CipherQuery, cipherReply, CipherInterface, cipherSystem, idealCipher), planting involution (plant, exchange, exchangeEquiv, plant_uniform), adaptive 2r / |State| PRF security (chainingCipherPRF_security, chainingCipherPRF_addGroup_security), and exact reply-presentation transport (cipherReplyPresentation_real, cipherReplyPresentation_ideal).
  • Add src/Commons/Schemes/Cipher/Context.lean: single-root hidden-key replacement inside an arbitrary trace-local cipher-dependent context (RespectsCalls, transcript_ratio, security).
  • Add src/Commons/Schemes/Cipher/MultiContext.lean: users-slot hybrid replacement sharing one ideal cipher with no distinct-key hypothesis (selected_respectsCalls, transcript_ratio, security).
  • Export the modules from src/Commons.lean and add consumer tests + #print axioms checks in src/Tests/DaviesMeyer.lean.

Acceptance criteria

  • DaviesMeyer, CipherContext, and CipherMultiContext reuse the TypedSystem sampling and key-guessing laws directly without duplicating local copies.
  • src/Tests/DaviesMeyer.lean instantiates XOR on Bool, finite AddGroup, single-root context replacement, and multi-root context replacement, and audits axioms.
  • lake build --wfail, scripts/check-sources.sh, scripts/check-axioms.sh, and Mathlib standard linters pass with 0 warnings.

Advances #14, #237.

Activity

  1. added
    needs-format
    on Nov 24, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    needs-format

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions