RFC: Budget-free dependent Interface, cumulative CR18 Systems/Converters, and endomorphism Filters
Maintainer thường phản hồi trong vòng 1 ngày
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 5/5
- Thời gian dự kiến
- Hơn một tuần
- Mức phù hợp với người mới
- 12/100
- Loại issue
- Tái cấu trúc
- Độ rõ ràng
- Cần làm rõ
- Mức độ hoạt động
- Sôi nổi
- Lĩnh vực
- cryptography
Hướng nghiên cứu
This is an architectural RFC, not a task: start by reading the v2 sketch of Interface, cumulative System A and two-sided Converter A B, then look at how the existing RandomSystems/Typed/ and RandomSystems/DDC/ layers use TypedSystem, IsDDCFrom and the global bound those types are meant to remove. Phase 0 is the gate — a single PR implementing the new core plus MonoidalCategory, ResourceTheory and CompatiblePseudoMetric instances, proving the interchange law on correlated System (B ⊗ D), keeping cc_normalize/cc_calc/cc_construct working unchanged, and checking endomorphism filter absorption. Done means those instances compile with only [propext, Classical.choice, Quot.sound]; only then do the later bridge and port phases (Commons/Definitions/, downstream sequence-cc) follow.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
Background
Two early choices in RandomSystems force substantial Lean plumbing across the library and downstream consumers (e.g., sequence-cc):
- Flat port-tagged systems plus runtime subtype wrappers (
TypedSystem,TypedGame):RandomSystemoperates on untyped alphabets, encoding multi-port systems viaΣ i : A.I, A.X i/Σ i : A.I, A.Y i. Preventing wrong-port replies requiredRepliesAtQueriedInterface(TypedSystem, ~55 files inRandomSystems/Typed/), and games added a second subtype (TypedGame, duplicating attachment, presentation, and≡g/|≡proofs). - Global query bounds baked into
Interface(domain,bound): Representing random systems via finitely-supportedPDSdistributions over complete functionsList X →. Yforced a global queryboundand[Fintype X]onto everyInterface. Consequently, unbounded primitives (PRF,URF,URP,Sponge) splinter into incompatibleq-indexed types, converters carryIsDDCFrom/MapsDomaincertificates, and downstream code inventsBoundedBytes,Limits,WorkInterface, andSeedInterfacehacks.
In Maurer's Constructive Cryptography (CR18 / MR11 / MR16), every object is an extensional algebraic system in Type 0 with no query bounds forced on Interface or on information-theoretic distinguisher classes.
Proposed change
Adopt a budget-free, pure Maurer CR18 v2 core (introduced incrementally alongside v1 with a v2 → v1 truncation bridge, leaving Probability/, Commons/Schemes/, Commons/Tests/, and all cc_normalize/cc_calc/cc_construct/cc_substitute tactics untouched):
- Minimal dependent
Interface:
Tensor isstructure Interface where X : Type Y : X → Type(A.X ⊕ B.X, fun | .inl a => A.Y a | .inr b => B.Y b)(abbrevcombinators), unit𝟙_isEmpty, with noI,domain,bound, or[Fintype X]. EliminatesTypedSystem,RepliesAtQueriedInterface, andBoundedBytes. - Sub-probabilistic cumulative systems $P_R(y^i \mid x^i)$ in
Type 0(CR18 Def. 3.8):
RepresentSystem Adirectly by its cumulative massHist A → ℝ≥0($P([]) = 1$, $\sum_y P(h \cdot (x,y)) \le P(h)$), withCoe (∀ x, A.Y x) (System A)so plain functions coerce directly (sample k ←$ 𝒰[K]; F kwithoutstateless/ofFunction). Step-kernels andProbAutomatonare lightweight constructors; cumulative laws makeSystem.extplainfunext,samplelinear, and avoid BayesnormBeliefdivision. - Limits live in primitive bodies or explicit endomorphism filters $\varphi : A \to A$ (not in
Interfaceor adversary classes $\mathcal{D}$):- Intrinsic limits (e.g., one-time key $\mathbf{K}$, single-use channel) live in that primitive's own body (mass $0$ / non-response past query $n$).
- Unbounded primitives (
PRF,PRP,URF,URP,Sponge,CBC) stay unbounded under one unbounded statistical pseudometric $\Delta$ (reserving $\mathcal{D}$ strictly for computational hardness). - External usage limits ($\varphi_q$, $\varphi_{\sigma,\ell}$, $\varphi_{\mathrm{pf}}$, $\varphi_{\mathrm{nr}}$) are true endomorphism filter converters $\varphi : A \to A$ (made possible by sub-probabilistic non-response, without
A.withBot). Since $\varphi_q \cdot R$ and $\varphi_q \cdot S$ are silent past query $q$, $\Delta(\varphi_q \cdot R, \varphi_q \cdot S) = \Delta_q(\varphi_q \cdot R, \varphi_q \cdot S)$, and composition reduces to filter absorption ($\varphi_q \cdot \mathrm{CBC} \cdot \varphi_{bq} = \varphi_q \cdot \mathrm{CBC}$):
$$\varphi_q \cdot \mathrm{CBC} \cdot \mathbf{P} = \varphi_q \cdot \mathrm{CBC} \cdot (\varphi_{bq} \cdot \mathbf{P}) \approx_{\varepsilon_1} \varphi_q \cdot \mathrm{CBC} \cdot (\varphi_{bq} \cdot \mathbf{F}) = \varphi_q \cdot \mathrm{CBC} \cdot \mathbf{F} \approx_{\varepsilon_2} \varphi_q \cdot \mathbf{R}.$$
- Two-sided cumulative converters $P_\alpha$ and distinguishers in
Type 0:
DefineConverter A Bextensionally as a two-sided cumulative system $P_\alpha$ with Maurer's bilinear attachment $P_{\alpha R}(h_{\text{out}}) = \sum_{h_{\text{in}}} P_\alpha(h_{\text{out}}, h_{\text{in}}) \cdot P_R(h_{\text{in}})$ — natively probabilistic (noSeedInterface), automatically acting on correlatedSystem (B ⊗ C), giving≫associativity and⊗ₘinterchange by Fubini, and keeping any inductive query-tree /do-syntax strictly as an internal constructor. Distinguishers are dual cumulative systems inType 0. - Games as a predicate, not
TypedGame:
ReplaceTypedGamewith a[MonotoneMBO G]predicate onA.withMBO(Y' x := A.Y x × Bool), withG.visible = forgetMBO • GandliftMBOdefined uniformly on all converters.
Acceptance criteria
Execute via phased coexistence (Path 2) (~10–14 PRs, estimated −20K to −23K net LOC in constructive-cryptography and −8.5K to −11K LOC in downstream sequence-cc), gated on Phase 0:
- Phase 0 (Architectural Gate — 1 PR):
- Implement
Interface, sub-probabilistic cumulativeSystem A, two-sided cumulativeConverter A Bwith bilinear attachment, andMonoidalCategory+ResourceTheory+CompatiblePseudoMetricinstances forConstructiveCryptography. - Prove the
MonoidalCategoryinterchange law(α ▷ D) ≫ (A ◁ β) = (B ◁ β) ≫ (α ▷ C)on correlatedSystem (B ⊗ D), verifycc_normalize/cc_calc/cc_constructwork unmodified, and verify CR18 endomorphism filter absorption (φ_q' ≫ α ≫ φ_q = φ_q' ≫ αandφ_q ≫ φ_q = φ_q).
- Implement
- Phase 1–2 (Core v2, Proof Engines & DSL):
- Provide
Coefor functions,ofStep/ProbAutomatonand internal tree/program constructors,MonotoneMBO+≡gFundamental Lemma,eagerURF = lazyURFbridge for[Fintype X], and non-dependentHist (eval X Y) ≃ List (X × Y)helpers. - Port
HCoefficient,RatioCost,RevealedHCoefficient,Coupling,UntilBad,SamplingDistance, and lightweightDSL/notation. - Verify end-to-end adaptive URF/URP switching
Δ (φ q • lazyURF X) (φ q • lazyURP X) ≤ q.choose 2 / |X|and CBC-MAC filter-absorption composition cleanly with zero axioms beyond[propext, Classical.choice, Quot.sound].
- Provide
- Phase 3–4 (Bridge, Flagship Pilots & v1 Retirement):
- Add
v2 → v1truncation bridge, portCommons/Definitions/(PRF,CollisionBound,LazyPermutation,Indifferentiability,Sponge), validate onsequence-cc(eliminatingWorkInterface,PublicPrimitive,PortRoutingbudgets,SeedInterface, andBoundedBytes), then retireRandomSystems/Typed/andRandomSystems/DDC/.
- Add
- Ngôn ngữ chính
- Lean
- Star
- 3
- Fork
- 0
- Merge trung bình
- 1 ngày 2 giờ
- Pull request đã merge (30 ngày)
- 159
Chuẩn bị môi trường
Dự án này không cung cấp dev container, Dockerfile hay hướng dẫn đóng góp, nên bạn cần tự thiết lập môi trường: hãy bắt đầu từ README và xem hướng dẫn đóng góp lần đầu của chúng tôi để biết các bước chung.
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của trailofbits/constructive-cryptography
-
needs-format
Độ khó 5/5 Hơn một tuần Mức phù hợp với người mới 12/100
trailofbits/constructive-cryptography#471 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Exclude all approximate ideal witnesses with separating testsCó thể đã có người làm @MarcIlunga đã nhận 1 ngày trước. Đang mở
Độ khó 5/5 Hơn một tuần Mức phù hợp với người mới 15/100
trailofbits/constructive-cryptography#449 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 5/5 Hơn một tuần Mức phù hợp với người mới 12/100
trailofbits/constructive-cryptography#430 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 5/5 Hơn một tuần Mức phù hợp với người mới 15/100
trailofbits/constructive-cryptography#429 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Expose normalized and filtered transcript bounds through the selected distanceCó thể đã có người làm @MarcIlunga đã nhận 1 ngày trước. Đang mở
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 18/100
trailofbits/constructive-cryptography#428 ·
Maintainer thường phản hồi trong vòng 1 ngày
Tất cả issue của trailofbits/constructive-cryptography
Issue tương tự
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
lidofinance/validator-ejector#233 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
area/Driver_-_cpp-rs-driver bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 76/100
scylladb/cpp-rs-driver#542 ·
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 66/100
latchset/kryoptic#600 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
good first issue priority:high track:crypto
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 74/100
-
`libcrux-aead` fails to compile when referenced with `default-features = false`Có thể đã có người làm @jschneider-bensch đã nhận hôm nay. Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
Maintainer thường phản hồi trong vòng 1 ngày