feat(audit): Stellar chain module cryptographic audit report and fixes#93
Conversation
…raith-protocol#45) * perf(stellar): prefilter scans with public view tags * test(stellar): cover legacy view-tag scanner
…fixes Completes independent cryptographic audit of the Stellar chain module. (issue wraith-protocol#55) Findings: - 0 Critical, 0 High, 2 Medium, 2 Low, 9 Informational - All cryptographic primitives verified correct - Custom signWithScalar implementation justified and cross-validated Fixes applied: - Add zero-scalar guard in signWithScalar (scalar must be in (0, L)) - Add stealth private scalar validation in deriveStealthPrivateScalar - Skip zero-scalar candidates in scanAnnouncements - Verify signatures with @noble/curves ed25519.verify() New test coverage: - signWithScalar test vectors (17 tests): determinism, edge cases, boundary values (scalar=1, scalar=L-1), empty/1MB messages, LE encoding - Clamping reproducer test (keys.test.ts) - signStellarTransaction cross-validation (spend.test.ts) - E2e signing step added Closes wraith-protocol#55
|
@Timrossid Great news! 🎉 Based on an automated assessment of this PR, the linked Wave issue(s) no longer count against your application limits. You can now already apply to more issues while waiting for a review of this PR. Keep up the great work! 🚀 |
|
The audit doc is solid. 13 findings with right severity tiers, the Same blocker as #88/#89/#91/#92: branch predates view-tag batching landing on develop, so the diff includes those files as conflicts. git fetch origin
git rebase origin/develop
# during rebase, drop changes to src/chains/stellar/scan.ts, stealth.ts (the view-tag bits), test/chains/stellar/scan.test.ts, test/chains/stellar/bench/scan.bench.ts, docs/chains/stellar-view-tag-batching.md
# keep: audits/2026-06-author-stellar-module.md, test/chains/stellar/signwithscalar-vectors.test.ts, your spend.test.ts/keys.test.ts/e2e.test.ts additions, the scalar.ts 3-line fix, src/chains/stellar/spend.ts changes, the index.ts re-exports
git push --force-with-leaseOnce rebased the audit + test fixtures land cleanly. |
|
Clean merge. The audit report (236 lines), view-tag-batching doc, scalar/scan/spend/stealth fixes, and signWithScalar vectors are exactly what we needed. Bench harness is a nice bonus. Thanks @Timrossid. |
Summary
This PR delivers the independent cryptographic audit of the Stellar chain module (issue #55).
Deliverables
Audit report
\�udits/2026-06-author-stellar-module.md\ — covers every primitive in \src/chains/stellar/:
Findings & Fixes
Tests
Files changed
Closes #55