Present the algorithms of a MAC as a memoryless system

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

维护者通常 1 天内回复

还没有人认领这个 Issue。

评估

难度
4/5
预计耗时
3-5 天
新手友好度
56/100
Issue 类型
功能
描述清晰度
基本清楚
活跃度
活跃

调研方向

Start with src/Commons/Definitions/MAC.lean and inspect the existing MAC.system interface, then read the definitions under src/Commons/Definitions/MAC/ for related reply laws and memoryless-system proofs. Add the proposed algorithms interface, system, reply law, and equality theorem; done means the stated bit-MAC acceptance behavior and theorem are covered.

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

描述

Background

MAC.system holds one key and answers tag(m) and verify(m, t) under it. A construction that derives its MAC keys itself needs the two algorithms with the key as an argument:

\mathrm{tag}(k,m)\ \mapsto\ \tau\leftarrow\mathrm{mac.tag}\ k\ m,\qquad
\mathrm{verify}(k,m,\tau)\ \mapsto\ \mathrm{mac.verify}\ k\ m\ \tau .

This system keeps no state: each reply is drawn from the algorithm's law at the query. So it is the memoryless system of that reply law, and a router or a program over it has a closed form.

Proposed change

In src/Commons/Definitions/MAC.lean, add the interface MACAlgorithms K M T with the ports tag(key, message) and verify(key, message, tag), and the system MAC.algorithms mac on it. In src/Commons/Definitions/MAC/, add MAC.algorithms.replyLaw and

theorem MAC.algorithms.eq_ofMemoryless (mac : MAC K M T) (q : ℕ) :
    MAC.algorithms (budget := q) mac =
      TypedSystem.ofMemoryless (MACAlgorithms K M T q) (MAC.algorithms.replyLaw mac)
Acceptance criteria

Take the MAC on bits that tags every message with a fresh fair bit and accepts a tag equal to the key. Its algorithms answer tag(k, m) by a fair bit whatever $k$ and $m$, so two tags of one message are independent draws, and verify(k, m, t) by the point law of t == k.

主要语言
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

更多 Backend & API Design Issue

把新 issue 发到你的邮箱

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