Skip to content

Stellar stealth cryptography deep-dive page #3

@truthixify

Description

@truthixify

Labels: Stellar Wave, stellar, docs, crypto, drips, help-wanted
Tier: M (2–4 days)
Type: writing

Context

The existing docs/sdk/chains/stellar.mdx shows how to call the SDK. It does not explain why the Stellar implementation looks the way it does — why ed25519 instead of secp256k1, why X25519 ECDH, why the specific domain-separation strings ("wraith:scalar:", "wraith:tag:"), why we have a custom signWithScalar.

Without this context, contributors can't safely extend the protocol, and security reviewers (see sdk/01) have to reverse-engineer intent. We want one definitive page.

Scope

Write docs/architecture/stellar-cryptography.mdx:

  1. Choice of curve — why ed25519. Comparison to secp256k1 (the EVM/CKB choice). Verifier ecosystem on Stellar.
  2. ECDH via X25519 — why we convert Edwards → Montgomery for the shared secret, why this is safe, and a citation chain to RFC 7748 / Curve25519 birational equivalence.
  3. Domain separation — list every prefix used ("wraith:spending:", "wraith:viewing:", "wraith:scalar:", "wraith:tag:"), explain what each is separating from what, and link to the file/line where each is used.
  4. View tag — how it's computed, what false-positive rate it achieves, what it costs (one extra SHA-256 vs. saved ECDH on rejected announcements).
  5. signWithScalar — why standard ed25519 isn't enough (we don't have a seed, we have a derived scalar), how the custom signing path stays compatible with standard verifiers, link to the RFC 8032 audit (sdk/02).
  6. Encoding — how meta-addresses are encoded as st:xlm: prefix + StrKey, address derivation as StrKey of the stealth public key.

Style

  • Diagrams welcome — keep them in the existing SVG style (use the assets/diagrams/ neighbors as a starting point).
  • Every cryptographic claim must cite the line in the SDK where it's implemented.
  • Mathematical notation: prefer plain text "P_stealth = K_spend + s_h * G" over LaTeX unless absolutely necessary. Mintlify renders LaTeX inconsistently.

Acceptance criteria

  • stellar-cryptography.mdx committed.
  • Added to docs.json under Architecture.
  • At least 2 new diagrams (key derivation, scanning flow with view tag).
  • Reviewed by someone who has not implemented the code (e.g., the Stellar SDK audit assignee from sdk/01).

Why this matters

This is the page we'll point every external auditor at. Investing in it now saves dozens of repetitive walkthroughs later.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Stellar WaveIssues in the Stellar wave programcryptoCryptographic codedocsDocumentationdripsFunded via Drips Networkhelp wantedExtra attention is neededstellarTouches Stellar / Soroban code

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions