Skip to content

Commit ebb9a9b

Browse files
authored
Merge branch 'develop' into docs/stellar-payment-links
2 parents b909048 + 7a71d37 commit ebb9a9b

21 files changed

Lines changed: 834 additions & 15 deletions

architecture/stellar-cryptography.mdx

Lines changed: 14 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
---
22
title: "Stellar Cryptography"
33
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"
45
---
56

67
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)[
4344
- **Performance impact**: This creates a cheap public prefilter before the X25519 shared secret computation (`scan.ts:12`).
4445
- **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.
4546

47+
![View Tag Scan](/assets/diagrams/stellar/view-tag-scan-stellar.svg)
48+
4649
```mermaid
4750
sequenceDiagram
4851
participant Network
@@ -83,16 +86,14 @@ To accept stealth payments, users publish a single "meta-address" that encapsula
8386

8487
## Key Derivation Overview
8588

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+
![Stellar Key Derivation](/assets/diagrams/stellar/key-derivation-stellar.svg)
90+
91+
### Stealth Payment Flow
92+
93+
![Stellar Stealth Flow](/assets/diagrams/stellar/stealth-flow-stellar.svg)
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+
![Fee Bump Withdrawal](/assets/diagrams/stellar/fee-bump-withdrawal-stellar.svg)
Lines changed: 53 additions & 0 deletions
Loading
Lines changed: 58 additions & 0 deletions
Loading
Lines changed: 48 additions & 0 deletions
Loading
Lines changed: 52 additions & 0 deletions
Loading

0 commit comments

Comments
 (0)