Commit Graph
15 Commits
Author SHA1 Message Date
Kgothatso NgakoandClaude Opus 5.5 cc21d68356 feat: the Shares section says whose share a rotation takes away; the record (admin-change-rotation, Phases 7 and 8)
The running card names the members whose share it takes away because
the group removed them as admin, and their rows read Share being
rotated away instead of Holds a share. Removing an admin says nobody
is asked again.

The plan is marked built, with where the build chose differently, and
the notes it changes point to it.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-20 11:11:32 +02:00
Kgothatso NgakoandClaude Opus 5.5 e78dfe50cf Merge branch 'giza' into claude/rotate-shares-single-approval-338a7d
giza brought rotation-waits-for-key-state, built in parallel from the
same base, and robust-group-admins. The first overlaps this branch, and
the two agreed on not asking the proposer. Where they met:

- The proposer's dialog is this branch's, read from the proposal's own
  plan with its refusal, under giza's title and caveat; giza's dialog,
  which listed stale members from the summary, went. The preview's
  refusal carries rotationHold's reason, and ChatRoomDetailSharesJvmTest
  asks its question of the kept dialog.
- The proposer is approved to take part only; giza also set
  confirmApprovedAt, which nothing reads.
- The Shares section keeps both: giza's held button, its reason and
  'Ask the group to sign', and this branch's running card and abandon.
- giza's hold tests left the new key state unsigned by not signing it.
  It signs itself now, so they hold the signing messages after the
  proposal (signingHeldOpen). This branch's test of two rotations opened
  at once gave way to giza's, which asserts more.

jvmTest 1281/1281, compileDebugKotlinAndroid, m3Audit at its budgets,
brand and wallet audits.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-20 01:43:23 +02:00
Kgothatso NgakoandClaude Opus 5.5 99261876bf docs: taking part is the only approval, as built (rotate-shares-single-approval, Phase 7)
The plan gets a Built header and a table of where the build chose
differently: the proposer was asked twice not three times; two rotations
opened at once never reach the write-once rule; the stall-clock test had
to backdate its messages to catch anything; one full run died on a
SQLite SIGSEGV unrelated to this change. frost-share-refresh.md's gate
table shrinks to one row with the history of CONFIRM, its key-state step
names the rule that now signs it, and README says both notes are built.
automatic-key-ceremony.md points here for the second automated key
state.

Not done: the emulator session. Nothing here has run on a device.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-20 01:13:55 +02:00
Kgothatso NgakoandClaude Opus 5.5 2664f6ca47 docs: a rotation waits for the last one to be signed, built (Phase 5)
Material Design conformance / budgets (push) Canceled after 0s
Material Design conformance / tests (push) Canceled after 0s
frost-share-refresh.md records the new refusal (the proposer's own
check only), strikes "the proposer is auto-approved for nothing" for
the rule that replaced it, and gives the work a row. The plan is marked
built, with where the build chose differently.

./gradlew check: jvmTest 1240/1240, testDebugUnitTest 496/496, lint,
audits.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-20 00:51:51 +02:00
Kgothatso NgakoandClaude Opus 5.5 08b5c56f7e docs: the share refresh chain is pushed
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-19 23:55:50 +02:00
Kgothatso NgakoandClaude Opus 5.5 8278ffd5df docs: share refresh is built, phase by phase, and what is left
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-19 23:53:13 +02:00
Kgothatso NgakoandClaude Opus 5.5 4949f0fefe feat: the recovery walk, from the host key to the live share (frost-share-refresh, Phase 12)
ShareGenerations.recover rebuilds a device's share of every generation
from its host secret key alone: ChillDKG's recovery data gives generation
0, and each refresh's recovery data, applied to the generation before,
gives the next. It stops at a generation the host key was withheld from,
since a repaired share leaves no recovery data. Nothing calls it yet.

Tested three refreshes on, against every device's live share and each
generation's table. With the release-build test, jvmTest 1200/1200,
compileDebugKotlinAndroid and the audits pass.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-19 23:53:07 +02:00
Kgothatso NgakoandClaude Opus 5.5 1c3e0e934e feat: re-enrollment, a stale member repaired into the generation the group signs with (frost-share-refresh, Phase 10)
ShareRepairManager brings back a participant id a refresh left stale, with
FrostReducedEnrollment in repair mode, on kinds 30346-30349. t live helpers
approve and run it; their round-1.1 shares and round-1.2 sums are raw
additive shares, so each goes NIP-44-encrypted between the two parties'
ChillDKG host keys. The target checks the result against the public share
the group signed -- never one the helpers supply -- stores it, and proves
it with a Schnorr signature by the share, which every device checks before
marking the id live. The share is a point of the new polynomial that the
old device never had.

10b: a new identity at an id -- a lost device, a compromised account -- is
bound by a group-signed key state first (frost_member, GroupKeyState
.memberBindings, schema 40), applied only to an id that is not live. Until
then its request waits, with nothing sent. A key state amending one at the
same generation is stamped a second later, so a binding can never tie with
the state it adds to.

jvmTest 1198/1198, compileDebugKotlinAndroid, audits.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-19 23:46:38 +02:00
Kgothatso NgakoandClaude Opus 5.5 c4fe4c9c26 feat: rotating a group's shares without a member it removed (frost-share-refresh, Phase 9)
A removal takes a member out of the room, not out of the key: their share
still helps sign. After an admin removes a member who holds a live share,
the room screen offers to rotate without them -- a second act, never
folded into the removal, since it needs every remaining holder.
ShareRefreshManager.proposeWithout withholds them for good (RETIRED); the
refusals say when that would leave fewer than t holders (the group could
not sign at all) or not a majority (remove fewer at a time).

Tested in the ritual harness: in a 2-of-3, the other two sign at
generation 1 and the removed member's old share signs nothing with a new
one. jvmTest 1195/1195, compileDebugKotlinAndroid, audits.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-19 23:36:48 +02:00
Kgothatso NgakoandClaude Opus 5.5 51615992ee feat: the group signs its new generation, and every device deletes the old share (frost-share-refresh, Phase 8)
When a refresh completes the coordinator asks the group to sign the key
state at the new generation -- the same room, key, path and parentage, plus
frost_generation, a hash of the public-share table, the refresh and any
retired ids. It is the new shares' first signature, and what D6 waits on:
a device that files that state, holds the generation active and agrees
with the group's table fails every signing session left at an older
generation, out loud, and deletes the older shares, the ceremony's
randomness that rebuilds generation 0's, and the WAL's page images of them.

A key state at a higher generation wins whatever its timestamp, in the
DAO and among signed events. A proposal at a generation this device has
confirmed and is still waiting on the certificate for waits instead of
declining, and resumes when the generation activates.

jvmTest 1193/1193, compileDebugKotlinAndroid, audits.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-19 23:32:14 +02:00
Kgothatso NgakoandClaude Opus 5.5 f8974aec81 feat: a group rotates its shares, end to end between devices (frost-share-refresh, Phase 7)
ShareRefreshManager runs a FROST share refresh in the Marmot room the key
derives, on kinds 30340-30345, in the image of ChillDkgRitualManager:
every inbound message stored, every step recomputed from stored inputs,
nothing of a member's own published before they approve, at two gates
(DEAL, CONFIRM). Recipients are at least t and a majority of the ids not
retired, and a device confirms one refresh per base generation --
ShareRefreshConfirmation, written in the same transaction as the pending
generation it confirms -- so two refreshes from one generation cannot both
complete. The certificate activates the new generation; a withheld device
learns its table from the recovery data and files it with no share.

Schema 39 (AutoMigration): ShareRefreshSession, ShareRefreshMessage,
ShareRefreshConfirmation. Transcript lines as system lines; dispatch in
the Marmot inbound path.

ShareRefreshRitualJvmTest: three devices with real host keys refresh
through bitcoin-kmp's FrostRefresh and then sign at generation 1 as the
same room. jvmTest 1190/1190, compileDebugKotlinAndroid, audits.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-19 23:25:45 +02:00
Kgothatso NgakoandClaude Opus 5.5 c8a529a178 build: lightning-kmp-app with FROST share refresh down the chain (frost-share-refresh, Phase 4)
e4779ff..3794eb8, every level on a local claude/frost-share-refresh branch:

  lightning-kmp-app  3794eb8   (e4779ff + this bump)
  lightning-kmp      2043f254  (df778bc4 + bump)
  bitcoin-kmp        3cd82d1   (1982eba + bump + FrostRefresh)
  secp256k1-kmp      0f5a710   (ce05021 + bump + frostRefresh* bindings + tests)
  secp256k1-zkp      31ea015c  (a04dc1ed + the frost_refresh module)

None of it is pushed; the pins are to local commits until it is. Giza
does not call the refresh yet (Phase 7).

compileDebugKotlinAndroid, jvmTest 1183/1183 and the M3, brand and wallet
audits pass.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-19 23:15:46 +02:00
Kgothatso NgakoandClaude Opus 5.5 fce51e20f6 feat: a key's shares have generations, and signing reads the one it names (frost-share-refresh, Phase 6)
Schema 38 (AutoMigration): KeyShareGeneration and KeyShareMember for every
generation a refresh makes, FrostSigningSession.generation, and
GroupKeyState.generation and publicSharesHash. Generation 0 has no row: it
stays where ChillDKG wrote it, with ids derived from the host keys as
before.

ShareGenerations is the one door signing reads a share through.
FrostSigningManager fixes a session to the generation the group signs with
when it is proposed, carries it as frost_generation from generation 1 (a
generation-0 proposal is byte for byte what it was), and a device holding
no share of the named generation declines out loud with
GENERATION_REFUSAL instead of waiting or signing with the wrong share.

ShareGenerationsJvmTest refreshes a 2-of-3 group's shares by hand with a
zero-constant polynomial; the new shares sign and the signature verifies
as the unchanged room. jvmTest 1183/1183, compileDebugKotlinAndroid, and
the M3, brand and wallet audits pass.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-19 22:48:42 +02:00
Kgothatso NgakoandClaude Opus 5.5 4040ae7424 fix: a deleted share is gone from aux.db, and aux.db leaves the phone in no backup (frost-share-refresh, Phase 5)
Every connection opens with PRAGMA secure_delete = ON (SecureDeleteDriver),
and GizaDatabase.scrubFreedPages truncates the write-ahead log, which keeps
whole page images of a share after its row is gone. Android backups and
device-to-device transfers carry none of the app's data: aux.db holds FROST
shares in plaintext, and a share copied somewhere the app cannot reach
cannot be rotated away from.

SecureDeleteJvmTest reads the database's files byte by byte; its two
controls find the share with secure_delete off and before the scrub.
jvmTest 1176/1176.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-19 22:40:17 +02:00
Kgothatso NgakoandClaude Opus 5.5 8dd710a156 docs: rotating a group's shares without moving its key (plan)
Enrollment evaluates the same polynomial, so it cannot rotate a share; a
zero-sum refresh can. Thirteen phases from a frost_refresh module in
secp256k1-zkp to the cutover, removal, repair and UI in Giza. D1-D8 are
decided as recommended.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-19 22:32:48 +02:00