| Phase 3: a `GroupInboxOutbound` table for wraps | `GroupInboxPublication`, one table for everything owed to relays: the 10044 and 10050 (D7) and the reply wraps (D10). Phase 5 folded `InboxSigning` (a reply's manifest and a refusal's reason, kept past arrival) and `InboxKeyCeremony.announceRelays` into schema 46 (45 when built; see Phase 3), which has not shipped |
| Phase 4: `InboxKeyRitualScreen` | the settings screen's ceremony card (Phase 7): who it waits on, and Abandon |
| Phase 4: transcript lines that say what each step does | three lines a ceremony (started, made, ended). Nobody is asked anything in it, so a ladder per step names nobody whose door to knock on; the ceremony card names them when it stalls |
| (not in the plan) | **an announcement that arrives before this device has finished the same ceremony waits** instead of being declined as a key nobody made. The coordinator asks for the signature the moment its own copy is made, which is routinely before anyone else's; `FrostSigningManager.resumeInboxAnnouncements` looks again when the ceremony finishes here |
| (not in the plan) | **a member who only watches the ceremony learns the key**, by running the coordinator's two aggregations over the public messages, which need no secret. That is what lets a share-holder who is not an admin check a 10044 before signing it |
| Phase 6: catch-up from the newest wrap less two days | no `since`, as the personal inbox has none, and no negentropy pass: the live subscription's `limit` covers reconnection. A device away longer than that window misses mail; the same is true of the personal inbox today |
| Phase 6: the subscription asks for `#p` = the group's npub | and for `#p` = each inbox key this device holds, routing a wrap by its key when it is not tagged with the group. An app that knows only the announcement, and builds its wrap with quartz's `GiftWrapEvent.create`, tags the key it encrypts to |
| Phase 6: `indexNostrEvent` skips a wrap tagged with a group | not needed: the personal subscription asks only for `#p` = the identity, so a group's mail never reaches `storeNostrEvent` |
| Phase 6: the wipe | in `MarmotInboundManager.processGroupMembershipChanges`, and it deletes the inbox's messages and ledger too, with a transcript line said once |
| D10: any admin can **Send again** | offered on the proposer's device, the only one that knows a relay never took the wrap. `InboxReplies.sendAgain` works on any device holding the session's manifest; nothing else offers it yet |
| Phase 8: `FrostSigningScreen` shows the decrypted reply | through the notes the confederation already used, renamed `proposalNotes` (`FrostSigningRepository`, `FrostSigningUIState.notes`). `ProposedEvent` says only "A private reply from the group's inbox", since it has no key to read with |
| Phase 9: `GovernanceFollowThrough` owes an inbox rotation after each change | a rule every device reads off what it holds, `InboxRotation.isOwed`: the newest key was made over admins the room no longer has. The admin whose key sorts first starts it. Run from the governance follow-through and the sweep |
| (not in the plan) | **crossing ceremonies**: two admins who start one at once end in the one whose session id sorts first, on every device, the other ended out loud. A proposal for a generation a device already has is dropped |
| Phase 9: a test that no inbox ceremony starts during a share rotation | the refusal reads `RotationHold` as planned, but the inbox harness runs no share refresh, so it is not tested |
| Phase 0, check 4 in `SignedGroupKeyStateTest` | moved: Phase 8 made a seal nobody can read a decline, so that test now pins the decline, and `InboxReplyJvmTest` checks the premise end to end |
| (not in the plan) | the worktree's build needed `lightning-kmp-app` and its nested submodules initialised from the main checkout's copies, with their `local.properties` and the prebuilt native secp256k1 |
**Not done:** Phase 10's device run. Nothing here has run on a device or a desktop client: no
inbox has been set up across real devices, no stranger's NIP-17 client has written to one, and no
reply has been opened by a client that follows nostr-protocol/nips#2361 -- or by one that does
not, which is the case D13 warns about and nobody has watched happen.
Written against `5ac4c053`, on 2026-11-22. Paths starting `K/` are under
NIP-4E is a draft. Two open pull requests carry it, and this plan follows both, as they
read on 2026-11-22:
| where | what it defines | what this plan takes |
|---|---|---|
| [nostr-protocol/nips#1647](https://github.com/nostr-protocol/nips/pull/1647) (`4e.md` on `per-device-keys`) | kind **10044**, a replaceable announcement `{"kind":10044,"tags":[["n","<E>"]]}` signed by the identity; kinds **4454** and **4455**, a client asking for the encryption secret and another client handing it over | 10044, exactly. Not 4454 or 4455: see D1 |
| [nostr-protocol/nips#2361](https://github.com/nostr-protocol/nips/pull/2361) (`17.md` on `nip17-key`, head `bee7463`) | how NIP-17's layers change when either side has an encryption key | all of it |
#2361's layers, in its own pseudo-code's terms:
```
gift wrap (1059) pubkey = a fresh random key, per message
tags = [["p", receiverIdentityKey, relay]] the identity, not E
`encryptionKey()`, `keys()`, `build`), `KeyTag` (the `n` tag), `DecoupledCipher`, and the
4454/4455 exchange. The app uses none of it today. quartz's `GiftWrapEvent.create` and
`SealEvent.create` encrypt to the key they address and sign with the signer they are
given, so neither can build #2361's layers for a group; both are built by hand here, as
`MarmotDirectMessage.wrap` already does for its own reasons. quartz's `DecoupledCipher`
reads a sender's key from their 10044 and has no seal `n` tag; D8 reads both.
The spec is open, and the main objection to #2361 (that a decoupled sender writing to an
app that does not follow it fails silently) is a live one. So every wire decision lives in
one package, `K/nostr/inbox/`, with tests that pin the bytes, and Phase 0 records the
commits read.
---
## What Giza does today
Traced through the code at `5ac4c053`. Phase 1 pins them as tests before anything changes.
| event | where it lands | what happens |
|---|---|---|
| a kind 1059 `#p`-tagged to a group's npub | nowhere: `LiveSubscriptionManager` asks only for `#p` = the active identity, on `Relays.DefaultDMRelayList` | never fetched. If it arrived another way, `NostrDao.indexNostrEvent` stores a `GiftWrapMessage` and never opens it: only the active identity's key is tried |
| a peer proposes a kind 10044 for the group to sign | `FrostSigningManager.acceptProposal` | no refusal fires (the signer has no allowlist), so it is asked as "Event of kind 10044" and can be signed |
| a peer proposes a kind 13 | same | "Event of kind 13", signable. A member asked to sign a sealed ciphertext it cannot read is a rubber stamp, which is the thing [giza-wallet-removal.md](./giza-wallet-removal.md) says a Giza device must not be |
| either completes | `complete` → `applySignedEvent` → `ChatMessage.applyInnerEvent` | falls to `unsupported()`: a raw-JSON bubble on every device |
| a ChillDKG ceremony in a Marmot room | `ChillDkgRitualManager.proposeRitual` | allowed only as a subgroup's (`require` at `:267`); every completed `DkgSession` is a key `completedKey` and `getKeyHoldingSessions` may sign with |
| the user's own NIP-17 send | `NostrNip17Dao.persistAndBroadcastGiftWrap` | goes to `DefaultDMRelayList` only; the recipient's 10050 is looked up and the block that would use it is commented out (`:186-218`) |
Four things already exist and are reused unchanged:
- **ChillDKG accepts `t = 1`**, and with it every participant's share is the whole secret
([subgroups.md](./subgroups.md) notes that it "will happily generate one", which is
why `acceptProposal` refuses one for a signing key). That is D2.
- **`proposeSigningBatch` with `proposalTags`** carries hidden tags inside the MLS-encrypted
proposal, as the confederation's seal does. That is D11.
- **`approveIfVouched`** signs a key state a device can check for itself without asking its
owner. D5 uses the same door for a rotated key's announcement.
"announcement":<the recipient's signed 10044 as JSON, or null>}, …],
"group_copy":<index of the group's own seal>}
```
A member without the key sees that the group is signing so many seals, which is the number
of recipients plus one, and nothing else. That leak is stated in *Risks*.
### D12. Every signer reads the reply before signing it, and declines what does not add up
`InboxReplyRefusal` joins the others in the same four places. A signer:
1. decrypts the manifest with a key of the generation it names. A signer that holds no such
key **declines**, out loud: "This device holds no inbox key for this group". That is a
share-holder who is not a current admin (possible while share refresh is experimental),
or an admin whose device missed the ceremony. Signing a ciphertext it cannot read is the
rubber stamp Giza does not do;
2. checks the generation is one this device holds and the batch's every `n` tag is that
generation's `E`;
3. checks every `announcement` it is given: a valid 10044, authored by that seal's
recipient, whose `n` is that seal's `key`. A `null` announcement means the key must be
the recipient's identity;
4. opens every seal with `conv(e, key)` and checks they all hold the **same** rumor, byte
for byte;
5. checks that rumor: kind 14, pubkey the room id, no signature, non-blank content, and its
`p` tags exactly the manifest's recipients other than the group;
6. checks exactly one seal is the group's own copy, to `E`, and each `created_at` is within
two days before now and not in the future.
A proposer who wrote one thing to the group's copy and another to a recipient, sealed to a
key that is not the recipient's, or added a recipient the rumor does not name, is declined
by every honest signer. What a signer *cannot* check — that a recipient without a 10044
has not published one since, or that their app reads #2361's `n` tag — is a warning, not a
refusal, per the line [automatic-key-ceremony.md](./automatic-key-ceremony.md) drew.
The approval screen shows what the signer is agreeing to: the reply's text, the message it
answers, its recipients by name, and any warning.
### D13. A recipient without a 10044 gets the reply, with a warning
A seal encrypted from the inbox key opens only in an app that reads #2361's `n` tag. An app
that does not computes the conversation key from the group's npub, and fails. Giza cannot
tell which a recipient uses: a 10044 shows they do, its absence shows nothing.
So the composer and the approval screen warn when a recipient has no 10044 ("Their app may
not be able to open a message from a group"), and the reply goes anyway. Refusing would
refuse every recipient whose app reads the tag without announcing a key of its own, which
is every #2361 app whose user has not decoupled.
### D14. Rotation is a new ceremony, and old keys are kept for reading only
`InboxKey` has a generation. A rotation runs D2 again over the current admins, and once
its 10044 is signed (D5, unasked) and sent (D7), the new generation is the one replies are
sealed from. Until then the announced one stays in use, so there is never a moment where
the group seals from a key senders have not been told about. A reply proposed under one
generation and completed after a rotation is still valid: its seals' `n` names the key they
used.
What starts a rotation:
| trigger | how | asked? |
|---|---|---|
| an admin is removed, demoted or steps down | `GovernanceFollowThrough` owes one once the change has landed, as it owes a share rotation today, and runs it after that rotation (D4's `RotationHold`) | no. The group's signature on the change was the decision |
| an admin is promoted | the same, after the enrollment | no. The new admin needs a key |
| an admin asks for one | **Rotate the inbox key** in the inbox's settings, for a lost phone or a suspicion | no further approval: proposing is the proposer's, and nobody else is asked anything until the announcement, which is vouched |
| a rotation failed or was abandoned | the same button, offered on the failed ceremony's screen | as above |
Old keys are kept, marked retired, and used only to open: a sender may hold a 10044 from
before the rotation for a while, and messages from before are in the ledger to be reopened.
D8 tries the newest first.
What a rotation **cannot** do, and the screen does not pretend otherwise:
- A removed admin keeps every message they already read, and the keys they held. Their
Giza device wipes its inbox keys and inbox messages for the room when it sees itself
removed (as a share is wiped), but that is cooperation, not enforcement.
- A sender who has not refreshed the group's 10044 still encrypts to the old key, which the
removed admin also holds, until their app looks again. Nothing the group does reaches
that cache.
### D15. A promoted admin starts with an empty inbox
The rotation a promotion triggers gives the new admin the new key and none of the old ones,
so they read what arrives from then on. Handing a new admin the group's whole correspondence
is a different decision from making them an admin, and it is the quorum's to make, not a
side effect of a rotation. This plan does not make it (*Out of scope*). The inbox screen
says why a new admin sees nothing earlier.
### D16. Behind a flag
`ExperimentalFeatures.groupInbox`, `groupInboxOverride ?: isDevelopmentBuild()`, as
`confederation` is. Off in release until the device run (Phase 10) has passed and the two
pull requests have settled. The refusals (D5, D12) and the declines run whatever the flag
says, as every refusal does: a release build declines a peer's inbox proposal out loud
rather than signing it blind.
---
## Who is asked what
| step | who | asked? |
|---|---|---|
| set up an inbox (propose the first ceremony) | any admin | the button |
| take part in the ceremony | every admin | no (D4) |
| propose the first 10044 + 10050 | the ceremony's coordinator, on completion | no (it is the coordinator's follow-through) |
| sign the first 10044 + 10050 | `t` holders | **yes: the group's decision to have an inbox** (D5) |
| publish them | the proposer's device | no (D7) |
| read a message | every admin's device | no |
| propose a reply | any admin | the Send button |
| sign a reply | `t` holders | **yes: each reply** (D12) |
| wrap and send it | the proposer's device | no (D10) |
| a rotation's ceremony and its 10044 | every admin, `t` holders | no (D14, D5) |
---
## Phases
One commit per phase, in the repository's style (`feat: … (group-inbox, Phase n)`). Every
phase leaves `./gradlew :composeApp:jvmTest` and `:composeApp:m3Audit` green, and
`check`'s brand and wallet audits at budget.
### Phase 0: this document, and five checks
This document and its row in [README.md](./README.md). Then, before any code:
1.**`t = 1` ChillDKG** (D2). In bitcoin-kmp's tests or a scratch jvmTest: three
participants, `t = 1`; every `secretShare` is equal, and equals the threshold public
key's discrete log (`secretShare·G == thresholdPublicKey`). If the library refuses
`t = 1` or the shares differ, stop: the fallback is a `t = n` ceremony followed by a
reveal round to host keys, checked against `publicShares`, and D2 and Phase 4 change.
| 1. `t = 1` ChillDKG | holds. `InboxKeyPremiseTest` 3/3: three admins finish with one secret, that secret times `G` is the ceremony's threshold key, and NIP-44 between a stranger and the x-only inbox key agrees from both sides whatever the key's parity |
| 2. kinds | the plan's 30390–30396 **collide**: quartz 2.20.1 has 30392–30395 (experimental trusted lists). **30410–30416** are in none of the NIP README's table (whose 30300–30499 rows are 30311–30315, 30382–30384, 30402–30403), quartz, Curare at `dc1895ee`, Bennu at `2db6dde5`, `RetiredKinds` or the app. D3 now says 30410–30416. (The ceremony's own 30311–30315 and the confederation's 30382–30385 share numbers with public kinds; they travel only inside encryption, which is why that never mattered, and why it would not here either. A clean range costs nothing.) |
| 3. quartz | `Nip44v2.computeConversationKey`, `encrypt`, `encryptWithNonce` and `decrypt` take any secret and any x-only key. `EncryptionKeyListEvent` (kind 10044, `encryptionKey()`, `build(pubkey)`) and `KeyTag` read #1647's `["n", key]`. `EventTemplate<Event>(createdAt, 13, tags, content)` goes through `proposeSigningBatch` unchanged |
| 4. the premise | holds. `SignedGroupKeyStateTest`'s `a batch of seals the group signs verifies as the room's own`: two kind 13 events, signed by a quorum, authored by the room and passing `verifies()` on both devices |
| 5. the spec | #1647 read at its `per-device-keys` head (5 commits, last pushed 2025-10-08); #2361 at `bee7463` (2026-06-02). Neither merged. #2361 has one `p` on the wrap and the `n` on the seal, as this plan has it |
| `InboxKeyCeremony` | session id | room, generation, participants, coordinator, the ChillDKG inputs (randomness, host secret's tag), stage, the waiting-since time |
| `InboxKeyCeremonyMessage` | `(session, participant, kind)` | each received message, as `DkgParticipantMessage` |
| `InboxKey` | `(room, generation)` | `E`, `e`, recovery data, ceremony id, state (`HELD`, `ANNOUNCED`, `RETIRED`, `WIPED`), the signed 10044's id |
| `GroupInboxWrap` | wrap id | room, received at, opened by which generation or not yet |
| `GroupInboxMessage` | rumor id | room, wrap id, conversation id, sender, rumor JSON, created at, generation, outgoing or not |
| `GroupInboxOutbound` | `(signing session, seal id)` | recipient, the relays, the wrap once built, `publishedAt`, the backoff |
`e` is stored as a share is stored, and wiped as a share is wiped. DAOs beside them, and
`InboxStorageJvmTest`: redelivery of a wrap or a rumor is a no-op, wiping a generation
removes `e` and keeps `E`, and no `InboxKey` is visible to `getKeyHoldingSessions`,
`completedKey` or `ShareGenerations` (D3).
### Phase 4: the ceremony (D2, D3, D4)
-`InboxKeyRitualManager`: `propose` (refused unless the proposer is a current admin, the
room is a keyed Marmot room, the flag is on and `RotationHold` is clear), `process`
(store, then ask whether it can move), `advance` (the ChillDKG steps at `t = 1`),
`abandon`, `resumeRunning`. On completion, check `e·G == E` and write `InboxKey` at the
next generation.
- Inbound: an arm in `NostrDao.fileGroupEventResult`'s dispatch for the seven kinds, ahead
of content kinds as the ceremony's are.
- The sweep: `NostrRepository.resumeRunningCeremonies` resumes inbox ceremonies too.
- The transcript: `INBOX_KEY_TYPES`, rendered as `RitualNotice`s that open the ceremony's
screen. Wording says what a step does: "set up the group's inbox", "added their part to
the inbox key", "the group's inbox key is ready".
-`InboxKeyRitualScreen`: the ceremony's state, who it waits on and since when,
**Abandon**. M3 rules as in `CLAUDE.md`, and a back button.
- Tests, in the ritual harness that `CeremonyAcrossDevicesJvmTest` uses, three admins and
a member:
- every admin's device ends with the same `e`, and `e·G` is the announced `E`;
- the member's device files the lines and holds no `InboxKey`;
- a proposal naming a non-admin, or leaving an admin out, fails out loud on every admin's
device;
- a ceremony survives a restart mid-round (stored inputs, as `DkgSession`);
- a faulty contribution names its sender.
### Phase 5: announcing (D5, D6, D7)
-`InboxKeyRefusal`, in the four places.
-`ProposedEvent` arms: a 10044 is "The group's inbox key", with the key's fingerprint and
whether this device holds it; a 10050 is "Where the group receives messages", with the
relays.
- The follow-through: on the coordinator's device, a completed first-generation ceremony
proposes the 10044 and 10050 batch. A later generation proposes the 10044 alone, and
`approveIfVouched` signs it where D5's three conditions hold.
-`ChatMessage.applyInnerEvent` arms: a room-signed 10044 is "The group has an inbox" the
first time and "The group changed its inbox key" after; a 10050 is "The group changed
where it receives messages". Types in `GROUP_IDENTITY_TYPES`.
- On a signed 10044, `InboxKey.state` moves to `ANNOUNCED` for its generation and the
previous one to `RETIRED`.
-`InboxAnnouncementPublisher`, started by `SynchronizationViewModel` beside
`ConfederationPublisher`. `BROADCASTABLE_KINDS` gains 10044 and 10050.
- Tests: `InboxAnnouncementJvmTest` — the first batch is asked, a rotation's is not, a
10044 naming a stranger's key is declined with its reason and the proposer's device shows
the decline, the published event is identical to the signed one and writes no
`NostrEvent` or `Profile` row. Phase 1's 10044/10050 pins flip.
### Phase 6: reading (D8, D9)
-`live-group-inbox` in `LiveSubscriptionManager`, and catch-up with the two-day margin.
-`GroupInboxManager.receive(wrap)`: ledger, open, verify, file. Never through
`storeNostrEvent`: the subscription hands wraps straight to it, and
`indexNostrEvent` skips a wrap `p`-tagged to a room this device keeps an inbox for.
-`GroupInboxManager.reopen(room)`, run when a key arrives.
-`DirectMessagePeerSync.KINDS` gains 10044, so a correspondent's encryption key is known
when the group replies, and D8 can use a sender's 10044 for a seal with no `n` tag.
- Repository flows: conversations for a room (newest first, unread count), messages of a
conversation, the count of wraps no key opens.
- The wipe: a device that sees itself no longer an admin of a room wipes that room's
`InboxKey`s and `GroupInboxMessage`s, and writes a transcript line saying so.
- Tests: `GroupInboxReadJvmTest` — a stock NIP-17 message from an identity-only sender to a
group with a 10044, built with quartz's own `GiftWrapEvent.create` around a seal made to
`E`, opens on every admin's device and on no member's; a #2361 sender with an `n` tag
opens; a wrap to the group's npub is counted unopenable; the same rumor in two wraps is
one message; a wrap to a retired key still opens; the wipe. Phase 1's wrap pin flips.
### Phase 7: the inbox, seen
- Routes and screens, each with a back button, `readableContent()`, the four states and
`ScreenStateTransition`:
-`GroupInboxScreen`: conversations, each with its people by name, the last line and an
unread mark; the empty state says nobody has written yet, or for a new admin that
earlier messages were sent before they held the key (D15); the count of messages this
device cannot open, with a line on why.
-`GroupInboxConversationScreen`: the messages, incoming and outgoing, with outgoing ones
marked by state (being signed, sent, signed but not sent).
-`GroupInboxSettingsScreen`: the current key's generation and fingerprint, whether it is
announced, the 10050's relays with **Change**, **Rotate the inbox key**, and the
ceremony's state while one runs.
- The group's screen: an "Inbox" row with the unread count, shown only where this device
holds a key (D9). Where the group has no inbox and this device's identity is an admin, a
"Set up an inbox" row instead, which explains the decision and opens a setup screen with
the 10050 relays to edit before the ceremony is proposed.
- Strings in sentence case from the catalogue; nothing says Bennu, and nothing says
"NIP-4E" to a person.
- Tests: `GroupInboxScreenJvmTest` — the row is absent for a member and present for an
admin with a key; the empty states; the unopenable count.
### Phase 8: replying (D10, D11, D12, D13)
-`InboxReply.build(room, conversation, text, replyTo)`: the rumor, the seals and the
manifest, from the current announced generation and each recipient's latest 10044.
- The composer under `GroupInboxConversationScreen`: proposes through `proposeSigningBatch`
with the manifest tag, warns per D13, and says above the button that the group's quorum
has to sign it before it is sent.
-`InboxReplyRefusal`, in the four places, with D12's checks.
-`ProposedEvent` for a batch of seals: on a device with the key, "A reply from the group's
inbox" with the text and recipients; on one without, "A private reply from the group's
inbox". `FrostSigningScreen` shows the decrypted reply, what it answers, and the warnings.
-`ChatMessage.applyInnerEvent`: a room-signed kind 13 draws nothing in the room's
transcript. The signing session's own lines already say the group signed something, and
a line naming the reply would reach members who are not admins.
-`InboxReplyPublisher`: on completion, on the proposer's device, wrap each seal and send
it with backoff (D10); file the group's copy as an outgoing message at once. **Send
again** in the conversation, for any admin, on a reply whose session completed.
- Recipient relays: the recipient's 10050 if known, else the publish set. This is new code
rather than reuse: the personal path's equivalent is commented out, and fixing that is
not this plan's.
- Tests: `InboxReplyJvmTest`, three admins with threshold 2 and an outside recipient —
- a reply proposed by A and signed by B reaches the recipient's relays as #2361 wraps,
and opens with the recipient's encryption key, and with their identity key when they
have no 10044;
- the group's copy opens on C's device as an outgoing message;
- each D12 refusal on its own: a mismatched group copy, a seal to a key that is not the
recipient's, an extra recipient, a forged 10044, a blank reply, a manifest for a
generation the signer does not hold. Each is declined with its reason, and the
proposer's device shows it;
- a member's device without the key reads the proposal as "A private reply" and learns
no text and no recipient.
Phase 1's kind 13 pin flips.
### Phase 9: rotation (D14, D15)
-`GovernanceFollowThrough` owes an inbox rotation after a removal, demotion, step-down or
promotion has landed, and starts it once `RotationHold` is clear, after any share
rotation the same change owes.
- **Rotate the inbox key** in the settings screen, and on a failed ceremony's screen.
-`InboxReply.build` reads the announced generation, never the newest held one.
- Tests: `InboxRotationJvmTest` —
- removing an admin rotates the key with nobody asked, the new 10044 is vouched and
signed unasked, the removed admin's device wipes its keys, and a message sent to the
new key does not open on it;
- a message to the old key still opens on the remaining admins' devices;
- a promoted admin holds only the new generation and sees an empty inbox with D15's
explanation;
- a reply proposed before the rotation and completed after it still verifies and opens;
- an inbox ceremony does not start while a share rotation is pending.
### Phase 10: the record, and devices
- Mark this plan built, with a *what the plan said / what it turned out to be* table, and
update the README row.
- A *since* note on [confederation.md](./confederation.md) D5: something *can* now be
encrypted to a group, through its inbox key, for a group that has one. D5's seal stays as
it is; whether a confederation should use the inbox is its own question.
- Device run, three desktop clients or emulators in one keyed group with threshold 2, a
fourth member who is not an admin, and an outside identity on a NIP-17 client that
supports #2361 (and, separately, one that does not):
1. A sets up the inbox; the ceremony runs with nobody tapping; A and B sign the 10044 and
10050; a public client shows the group's 10044.
2. The outside identity writes to the group. A, B and C see it; D sees an inbox row
nowhere.
3. B replies; A signs; the outside identity's client shows the reply as from the group.
4. The same with the client that does not support #2361: confirm the warning was shown,
and record what that client does with the reply.
5. Remove C as admin; the rotation runs unasked; C's device wipes; a new message opens on
A and B and not on C.
6. Write to the group from an app with no NIP-4E at all; confirm the inbox counts it as
unopenable.
---
## Risks
| risk | what to do |
|---|---|
| #1647 or #2361 changes, or is not merged. #2361's main reviewer opposes it in base NIP-17 | the wire is one package with pinned tests (Phase 2); Phase 0 records the commits read. The flag stays off in release until they settle |
| a recipient's app does not read the seal's `n` tag, and the group's reply fails to open with nothing said on either side | D13's warning; the device run records what real clients do. The only fix that needs nobody else's cooperation is threshold ECDH (*Out of scope*) |
| senders whose apps ignore 10044 write to the group's npub, which nobody can open | counted and explained (D8), never hidden |
| every admin's device holds `e` in full: one compromised admin device reads the whole inbox, past and future, until the next rotation | inherent to "every admin can read". The rotation on every admin change, and **Rotate the inbox key**, are the mitigations, and D14 says what they cannot undo. It cannot sign a reply: that still takes `t` |
| members who are not admins see how many seals a reply has, so how many people it goes to | stated in D11. Padding the batch with decoy seals would hide it at the cost of signatures; not planned |
| ChillDKG at `t = 1` is refused by a future bitcoin-kmp, or behaves differently | Phase 0's check, kept as a test in `InboxKeyRitualJvmTest`, fails first |
| a `t = 1` key is mistaken for a signing key | D3: its own tables, and a test that no signing path can see it |
| trial decryption against every retired key, for every wrap | a NIP-44 decryption per key per wrap; a group that rotated twenty times tries twenty. Measure in Phase 6; retire keys past a horizon only if it shows |
| two admin devices both send a reply's wraps | only the proposer's sends unprompted (D10); **Send again** is a person's choice. The group's side collapses duplicates by rumor id |
| a group with a Bennu admin can never open an inbox | the ceremony's screen says why (D4) |
| the group's 10050 lists relays that drop gift wraps | the setup screen fills in the app's own DM relays, which take them |
---
## Out of scope
- **Threshold ECDH.** The one way to read mail sent to the group's *npub*, and to reply to
someone whose app ignores the `n` tag, with no help from anyone else: each share-holder
multiplies the sender's key by its share, and `t` of the results combine, by the same
Lagrange weights as a signature, into the conversation key nobody holds the secret for.
It needs the share scalars out of the signing library, the derivation's tweaks applied
to them, an interactive round per message, and its own plan.
- **The group starting a conversation.** A reply needs a conversation to answer. Writing
first is the same machinery with a recipient picker and is the natural next plan.
- **Handing a promoted admin the inbox's history** (D15). A group-signed decision to send
retired keys to a named admin, sealed to their host key.
- **Kind 15 (files) and reactions.** Filed and shown as "a message this screen cannot show
yet".
- **4454 and 4455** (D1), and a NIP-4E key for a person's own identity.
- **Notifications** for new inbox messages.
- **Chronicling** inbox announcements to late members: `ChronicleKinds` stays `NONE`.