feat(tbtc/signer): add offline-authorized FROST share repair - #4240
feat(tbtc/signer): add offline-authorized FROST share repair#4240mswilkison wants to merge 5 commits into
Conversation
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Plus Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
|
Resolved in The failed job stopped before running any model because the v1.8.0 release |
|
Addressed the latest security-review findings in
Verification: full The runbook now states the remaining trust boundary explicitly: roster entries |
|
Addressed the latest restart-mixing review finding in The finding was valid: Part1 previously generated a fresh random repair row for every call, while the wire namespace remained the same authorization digest. A helper restarting before installation could therefore combine a new self-delta with peers' old retransmissions, and the target's final public-share check would reject the mixed transcript. The fix makes the plaintext Part1 transcript deterministic for the exact signed bundle and frozen transport version. Each non-residual delta is independently HKDF/rejection-sampled inside native custody from the root/store/provider-bound transport secret and binds the authorization digest, signed roster digest, sender, recipient, derivation version, and counter. The final slot remains the canonical residual. ECIES stays freshly randomized, so no deterministic ciphertext/nonces were introduced. Any future derivation change must bump the transport/AAD/ABI version and use a fresh authorization/roster. Regression coverage now proves:
Validation: full Rust suite (379 passed, 4 ignored), clippy with warnings denied, fmt/diff checks, and the explicit 51-of-100 production-scale launch gate all pass. CI follow-up: |
Summary
recovery epoch, endpoints, expiry, authorization nonce, and a separately
authority-signed helper-then-target transport roster
Rust; expose only public keys and fixed-size authenticated ciphertexts
stream-combine deltas/sigmas so complete scalar sets and raw signing shares
never cross the ABI
share-repair contract
fail closed and activation remains blocked after restart
Safety properties
The base authorization and exact transport roster are independently signed by
the offline authority already pinned by the state-anchor trust configuration.
Every scalar endpoint independently revalidates the authorization, roster,
current durable store, current state-root-derived transport key, exact sender
set, and fixed envelope shape before native arithmetic. Initial install requires
the signed replacement-store fingerprint. An exact durable replay is idempotent
for crash recovery; later recovery requires a strictly newer epoch.
Plaintext repair values use non-
Copy, zeroizing byte-backed ownership. Nativearithmetic scalars are narrowly scoped zeroizing temporaries, and both envelope
encryption/decryption and aggregation stay inside Rust. The host receives no
plaintext Delta/Sigma collection or transport private key.
Roster issuance is a trusted incident ceremony. The authority must collect
native/KMS or independently workload-attested preflight evidence and must not
sign caller-invented public keys. This in-process FFI minimizes host-language
secret residency; it is not a hardware isolation boundary against arbitrary
same-address-space code.
The existing Go state-anchor barrier wraps install, so repaired state is not
reported as installed until the independent anchor acknowledges the durable
mutation. This remains disaster recovery only; it does not increase signer
capacity, group size, threshold, or anchor-history capacity.
Verification
cargo fmt --all -- --checkcargo test --all-targetscargo clippy --all-targets -- -D warningsmalformed-input, replay, and production-scale tests
pkg/tbtc/signer/scripts/formal/run_tla_models.shagainst the pinned officialTLC release (all five configurations pass)
Stack
This PR is intentionally stacked on #4227 (
fix/anchor-validator-parity). Thecompanion Go orchestration and activation PR is #4241 and pins this PR's exact
commit. Review/merge this PR before #4241.