Skip to content

Decide: convergent-equality boundary — randomized protected mode or defer #30

Closed

Description

@tonibergholm

Part of #24

Question

Convergent encryption makes low-entropy protected files (.env, private keys) confirmable by dictionary/equality checks against ciphertext (documented boundary, ADR-0014; audit known-boundary finding). Does randomized protected-path encryption get promoted into a spec now — accepting dedup loss and a format break — or stay deferred with recorded rationale until real confidential use is closer?

Activity

  1. self-assigned this
    on Jul 10, 2026
  2. tonibergholm commented on Jul 10, 2026

    @tonibergholm
    MemberAuthor

    Resolution

    Randomized protected-path encryption is promoted into a phase spec now — rejecting both defer-with-rationale and a per-prefix opt-in middle path. Fresh random DEK + random nonce per seal closes ADR-0014's accepted equality/dictionary-confirmation oracle for all new protected content. (Agent recommendation was to defer; the dev chose to spec now — the boundary is the kind of debt that only gets more expensive as protected use grows, and pre-1.0 is the cheapest moment for the format change.)

    Decisions:

    1. Dual-read, randomized-write (rejecting a P16-style hard break and any history-rewriting migration): convergent ciphertext already in history stays readable and decryptable forever — content addressing keeps it reachable regardless, so pretending otherwise buys nothing. New seals get a new format tag. A rewrap-shaped one-command eager re-seal upgrades the live tip for repos that want the oracle closed for current content immediately.
    2. Unchanged-detection at commit: local stat cache + keyed plaintext-hash fallback. Commit deliberately holds only public keys (P15 discipline), so decrypt-and-compare is out; without a mechanism, every commit would re-seal every protected file into fresh objects. A .sc/-local, never-committed, never-transferred map path → (mtime, size, keyed-tag, object-id) restores unchanged-is-free: stat hit carries the prior ciphertext id, miss falls back to a BLAKE3 keyed by a per-repo random local key (the cache file alone leaks nothing). Lost/stale cache degrades to spurious re-seals, never incorrectness. git's index discipline, adapted.
    3. Accepted costs, recorded: (a) independent identical edits to a protected file on two branches now conflict — the P15 id-equality fast path for that one case is gone by construction; sc conflicts/sc resolve --identity (P23) is the resolution path. Carry-by-id keeps the unchanged and one-side-changed fast paths intact. (b) sc rewrap is no longer policy-only/tree-identical for randomized content — re-sealing moves ciphertext ids. (c) Identical plaintext at two different paths no longer dedups.
    4. Unlocked follow-on (recorded, not specced): true cryptographic rotation for protected paths becomes meaningful — ADR-0019's "dedup-breaking or security-meaningless" objection dissolves under randomized seals — so a future rotate-for-paths can join the lifecycle surface.
    5. The map's fog patch guarded by this decision (format-break / migration / rotation) is fully consumed above; nothing graduates. Remaining detail is phase-spec authorship for the assembly ticket.

    Context: ADR-0014 (the original convergent decision + caveat), P28's looks_like_low_entropy_secret nudge (stays — steering low-entropy values to sc secret remains right regardless), ADR-0025/0027 (the machinery the accepted costs touch).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

wayfinder:grillingWayfinder ticket: HITL grilling/decision

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions