Repository navigation
Conversation
Co-authored-by: Codex <codex@openai.com> Signed-off-by: Jordan Mecom <jm@squareup.com>
Co-authored-by: Codex <codex@openai.com> Signed-off-by: Jordan Mecom <jm@squareup.com>
Co-authored-by: Codex <codex@openai.com> Signed-off-by: Jordan Mecom <jm@squareup.com>
Co-authored-by: Codex <codex@openai.com> Signed-off-by: Jordan Mecom <jm@squareup.com>
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Desktop relay signature requests already arrive in groups, but previously verified each signature separately. Use BIP-340 batch verification for bounded groups with repeated authors, retaining libsecp256k1 for small/diverse groups and failed-batch fallback. Preserve ordered per-event results, event-body hashing, and the existing blocking-worker boundary.
The weighted equation accumulation is adapted locally from Zcash Foundation FROST. Signature preparation is separate from accumulation. The adaptation keeps Nostr's x-only encoding, transcript-bound nonzero coefficients, repeated-author grouping, and k256's multiscalar multiplication. The pinned source, Apache-2.0 attribution, and modifications are documented in NOTICE.md. No FROST dependency or benchmark artifacts are included.
Fresh release measurements on Apple M4 Max (arm64, macOS 26.7.2, Rust 1.98.1) show 1.24–1.43× faster repeated-author verification. Each case used four warmups and seven alternating-order rounds, comparing the previous desktop loop including parsing and result allocation. Signing, IPC, networking, and rendering were excluded. Medians per call:
The 128-signature/one-author case reached 1.43×. Small/diverse groups stayed within 2.4% of the original loop in this run. Invalid batches cost approximately 1.8× because they require individual checks after the batch attempt. These are native verification measurements, not whole-app or other-architecture results. Measured verifier SHA-256:
2f039c3fff22a5d2a6071d529b783569d1cd8fd73cf1b46ba5e809a53bf4f12f.All eight crypto tests pass, including every official BIP-340 vector row (the Nostr API rejects the four non-32-byte messages), mixed vector batches, and seeded mutations/permutations checked against individual libsecp256k1 results. Existing tests cover cancellation attacks and failed-batch fallback; the native async-command integration test also passed. Negative controls using fixed coefficients or excluding signatures from the coefficient seed each fail for the intended forged-signature acceptance. Independent review found no blockers. Mandatory push hooks pass: TypeScript/related frontend tests, design checks, and workspace Clippy. The earlier focused frontend run passed 285 tests.
An earlier full desktop-suite run failed in
host_command::tests::stdin_is_exact_data_and_output_is_drained_concurrentlyand then received SIGSEGV inwindow_state::tests::onboarding_snapshot_is_kept_until_next_launch_restoreon macOS. Those tests were unchanged. A native WKWebView diagnostic exercised catch-up with synthetic signed events through the production IPC verifier. Normal live-relay acceptance, human acceptance, and measurements on other architectures remain outstanding. This PR remains a draft; the local adaptation does not inherit upstream cryptographic audit coverage.