Umbra is protocol for enabling stealth payments on the Ethereum blockchain. It enables privacy preserving transactions where the receiver's identity is only known to the sender and receiver.
Below is a high level description of the mechanics of the Umbra protocol:
We'll walk through the above description and cover the technologies used at each interaction with the Umbra protocol.
When a recipient first sets up their account, they need to purchase an ENS domain. Their Umbra private key signs a message, and this signature is stored as a text record associated with their ENS domain. This allows anyone to recover the recipient's public key from the signature associated with their ENS domain.
When sending funds, a random number is generated with ethers, and we again use ethers to recover the public key and the elliptic library to compute the stealth address. The eccrypto library is used to encrypt the random number with the recipient's private key. The payer then calls a function on a Solidity smart contract to send the funds and announce the encrypted random number and associated cryptographic parameters.
When the recipient retrieves funds, ethers is used to scan for all emitted announcements from the contract, and eccrypto is used to decrypt the announcements so the random number is accessible to the receiver. We use ethers to compute the new stealth private key.
If ETH was sent, the user just transfers the ETH from the stealth address to any address of their choice. If tokens were sent, the GSN is used so they can withdraw tokens without needing to fund the stealth address with ETH.
The frontend was built with Vue.js and Quasar Framework, and the contract testing and deployment was managed with various OpenZeppelin tools