|
1 | 1 | --- |
2 | 2 | title: "Stellar Cryptography" |
3 | 3 | description: "Design rationale, view tag derivation, and RFC-compatible cryptography for Stellar stealth payments." |
| 4 | +keywords: "Stellar, soroban, freighter, xlm, lumen, friendbot, stellar.expert, path payment, meta-address" |
4 | 5 | --- |
5 | 6 |
|
6 | 7 | Wraith Protocol implements a non-interactive stealth payment scheme on Stellar. This page documents the cryptography decisions behind the implementation and exactly where each concept is realized in the SDK. |
@@ -43,6 +44,8 @@ view_tag = SHA-256("wraith:stellar:view-tag:v2:" || R_ephemeral || V_recipient)[ |
43 | 44 | - **Performance impact**: This creates a cheap public prefilter before the X25519 shared secret computation (`scan.ts:12`). |
44 | 45 | - **False-positive rate**: A 1-byte tag produces a false-positive rate of `1/256` (~0.39%). For non-matching announcements, the protocol skips the expensive elliptic curve operations 99.61% of the time. |
45 | 46 |
|
| 47 | + |
| 48 | + |
46 | 49 | ```mermaid |
47 | 50 | sequenceDiagram |
48 | 51 | participant Network |
@@ -83,16 +86,14 @@ To accept stealth payments, users publish a single "meta-address" that encapsula |
83 | 86 |
|
84 | 87 | ## Key Derivation Overview |
85 | 88 |
|
86 | | -```mermaid |
87 | | -flowchart TD |
88 | | - S(Sender) -->|Generates| r(Ephemeral Private Key 'r') |
89 | | - r --> R(Ephemeral Public Key 'R') |
90 | | - S --> |Recipient's| V(Viewing Public Key 'V') |
91 | | - S --> |Recipient's| K(Spending Public Key 'K') |
92 | | - r & V --> X25519(X25519 ECDH) |
93 | | - X25519 --> SS(Shared Secret) |
94 | | - R & V --> VT(View Tag) |
95 | | - SS --> |Hash mod L| HS(Hash Scalar) |
96 | | - HS & K --> |Point Addition| SP(Stealth Public Key) |
97 | | - SP --> |StrKey Encoding| SA(Stellar Address 'G...') |
98 | | -``` |
| 89 | + |
| 90 | + |
| 91 | +### Stealth Payment Flow |
| 92 | + |
| 93 | + |
| 94 | + |
| 95 | +### Gas-Sponsored Withdrawals |
| 96 | + |
| 97 | +Stealth accounts often lack XLM for transaction fees. A sponsor wraps the withdrawal transaction with a fee bump. |
| 98 | + |
| 99 | + |
0 commit comments