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

未关闭
#462 0 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

维护者通常 1 天内回复

还没有人认领这个 Issue。

评估

难度
5/5
预计耗时
一周以上
新手友好度
8/100
Issue 类型
功能
描述清晰度
描述清楚
活跃度
活跃
领域
cryptography

调研方向

Start by reading the existing TypedSystem sampling and key-guessing laws the acceptance criteria require reuse of, plus src/Commons.lean for how modules are exported. Then read the src/Tests/ tree for the consumer-test and #print axioms pattern, since src/Tests/DaviesMeyer.lean must instantiate XOR on Bool, AddGroup, and both context-replacement theorems. Done means lake build --wfail, scripts/check-sources.sh, scripts/check-axioms.sh and Mathlib linters pass with zero warnings. This is proof engineering across three new files, not a first-timer task.

由索引模型根据 Issue 内容生成。

描述

needs-format

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.

主要语言
Lean
星标
3
派生
0
平均合并
1 天 7 小时
30 天内合并 PR
123

环境准备

这个项目没有提供开发容器、Dockerfile 或贡献指南,环境需要你自己搭建:先看它的 README,通用步骤见我们的新手贡献指南。

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

trailofbits/constructive-cryptography 的其他 Issue

查看 trailofbits/constructive-cryptography 的全部 Issue

相似的 Issue

更多 Cryptography Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。