# Generation

## Generating Stealth Addresses

This process is executed by the sender to create a stealth address for a transaction.

### Steps

1. **Obtain Recipient’s Meta-Address**
   * Format: `st:sol:<spendingPubKey><viewingPubKey>`.
2. **Generate Ephemeral Key Pair**
   * Create a random 32-byte private key (`e`).
   * Compute the ephemeral public key: `E = e × G`.
3. **Compute Shared Secret**
   * Extract `S` (spending public key) and `V` (viewing public key) from the meta-address.
   * Calculate `P = e × V`.
   * Hash `P` to derive `h`.
   * Extract a one-byte view tag from `h`.
4. **Derive Stealth Public Key**
   * Compute `R = S + (h × G)`.
   * The stealth address is `StealthAddr = PubKey(R)`.
5. **Return Artifacts**
   * **Stealth Address**: `StealthAddr`
   * **Ephemeral Public Key**: `E`
   * **View Tag**: The derived view tag
