Introduction

Stealth Addresses

Stealth addresses are a cryptographic mechanism that allows senders to create unique, one-time addresses for recipients, enabling privacy onchain.

Definition

A stealth address is a cryptographically generated address that is created by the sender using the stealth meta-address of the recipient. Each stealth address is unique for every transaction, ensuring that the recipient can claim the funds sent to that address without revealing their identity or the link between different transactions.

How it works

Stealth addresses leverage elliptic curve cryptography to generate unique addresses. Here’s a step-by-step outline of how it works:

  1. Key Generation: The recipient generates a pair of keys, known as the "scan" and "spend" keys. These keys are derived from the recipient's signature.
  2. Stealth Meta-Address: The recipient shares their stealth meta-address, which consists of their "scan" and "spend" public keys.
  3. Stealth Address Creation: Using the recipient’s public keys, the sender generates a unique stealth address for each transaction. This is done using an ephemeral public key (a temporary key generated by the sender) and the recipient’s public keys.
  4. Transaction Announcement: The sender sends the transaction to the generated stealth address. The details of the transaction, including the ephemeral public key and metadata, are broadcast onchain.
  5. Address Recovery: The recipient uses their private scan key to detect transactions addressed to their stealth addresses. Once detected, the recipient can use their private spend key to claim the funds sent to the stealth address.

Example

Consider the use case of Alice sending funds to Bob using a stealth address mechanism:

  1. Bob registers a stealth meta-address on the canonical registry contract ERC6538Registry.
  2. Alice creates a unique stealth address for Bob using Bob’s stealth meta-address and an ephemeral public key she generates.
  3. Alice sends the funds to the generated stealth address.
  4. Alice announces the transaction on the canonical announcer contract ERC5564Announcer.
  5. Bob monitors the blockchain for transactions that correspond to his scan key. Upon detecting Alice's transaction, he uses his spend key to claim the funds from the stealth address.

Further Readings