|
1 | 1 | # Design: Derived-key packet addressing (lift the one-record-per-key ceiling) |
2 | 2 |
|
3 | | -> **Status: DESIGN / pre-implementation — FEASIBILITY SPIKE PASSED + COMMITTED.** |
4 | | -> Not shipped. The spike (§14) is committed as two `#[ignore]`'d tests in |
5 | | -> `tests/derived_key_spike.rs` (reproducible via `cargo test --test |
6 | | -> derived_key_spike -- --ignored`), carrying **byte-exact golden vectors**. Its |
7 | | -> crypto deps (`ed25519-dalek` `hazmat`+`digest`, `curve25519-dalek`, `bytes`) |
8 | | -> are **test-only dev-deps**, so the shipped binary stays hazmat-free until Phase 1 |
9 | | -> wires derivation into `src/`. Nothing lands in production until the schema (§8) |
10 | | -> is signed off and Phase 1 begins. Touches signed bytes and key derivation. |
| 3 | +> **Status: IMPLEMENTED — shipped through Phase 3c (`PROTOCOL_VERSION = 2`, crate |
| 4 | +> `1.2.0-alpha.1`); the v1.1 parent-key transport surface was removed in commit |
| 5 | +> `8be2567`.** All phases in §13 are DONE. This doc is the design reference for the |
| 6 | +> v2 wire format, but where it and the repo could drift, **code + tests are the |
| 7 | +> source of truth** — `src/derive.rs`, `src/transport.rs::build_derived_signed_packet`, |
| 8 | +> SPEC.md §3.8 / §3.4 / §8.4. The crypto deps (`ed25519-dalek` `hazmat`+`digest`, |
| 9 | +> `curve25519-dalek`, `bytes`) are now **main dependencies**; the shipped binary uses |
| 10 | +> `hazmat::raw_sign` only in `transport::build_derived_signed_packet` (self-verified |
| 11 | +> before use). The spike (§14) remains committed in `tests/derived_key_spike.rs` with |
| 12 | +> its byte-exact golden vectors. |
11 | 13 |
|
12 | 14 | ## 1. Problem |
13 | 15 |
|
@@ -261,10 +263,17 @@ behind a feature/flag during rollout so v1.1 stays buildable for comparison. |
261 | 263 | `build_derived_signed_packet`, self-verified before use). No flow wiring yet. |
262 | 264 | 3. **Flow wiring** — shares publish under `derive(sender_pub, share_ref)`; |
263 | 265 | receipts under `derive(recipient_pub, share_ref)`; lift the one-per-key limits |
264 | | - (re-enable self-receipts, multi-receipt). PROTOCOL_VERSION → 2. |
265 | | -4. **Receipt schema** — apply §8 once; regenerate fixtures + SPEC §8 vector. |
| 266 | + (re-enable self-receipts, multi-receipt). PROTOCOL_VERSION → 2. **DONE** — |
| 267 | + `src/flow.rs` run_send/run_receive/run_receipts on derived keys; parent-binding |
| 268 | + check; self-receipts re-enabled (D-SEQ-06); `receipts` requires `--share-ref`. |
| 269 | +4. **Receipt schema** — apply §8 once; regenerate fixtures + SPEC §8 vector. **DONE** |
| 270 | + (Phase 3c) — slim receipt `{accepted_at, ciphertext_hash, cleartext_hash, |
| 271 | + protocol_version, share_ref, signature}`; `verify_receipt` takes `recipient_pub` |
| 272 | + as context; `receipt_signable.bin` (263 B) + SPEC §8.2 regenerated. |
266 | 273 | 5. **Docs + real-DHT validation** — SPEC/THREAT-MODEL/README/CLAUDE.md; extend the |
267 | | - manual `real_dht_e2e` harness with a derived-key round trip. |
| 274 | + manual `real_dht_e2e` harness with a derived-key round trip. **DONE** — SPEC (incl. |
| 275 | + §3.8 + §8.4 vector), THREAT-MODEL, README, FAQ, CLAUDE.md aligned to v2; |
| 276 | + `tests/real_dht_e2e.rs` ported to a derived-key round trip (commit `8be2567`). |
268 | 277 |
|
269 | 278 | ## 14. Feasibility spike spec (do first) |
270 | 279 |
|
|
0 commit comments