What is a Zcash Viewing Key?
In most transparent blockchains like Bitcoin, all transactions are public. Anyone can see how much an address holds and who it paid. Zcash's shielded pools encrypt all of this information. However, privacy shouldn't mean a lack of accountability.
Zcash solves this through "Viewing Keys"—a cryptographic innovation that allows for selective disclosure.
Here is a breakdown of what Zcash Viewing Keys are and how they work.
1. The Concept (Selective Disclosure)
A Viewing Key is a cryptographic string that grants someone the mathematical ability to decrypt and view transaction details on the Zcash blockchain without giving them the ability to spend the funds. It allows users to enjoy strong privacy by default, while still being able to voluntarily "open their books" to specific parties (like an accountant or an auditor) when required.
2. Separation from Spending Keys
In Zcash, the power to "see" and the power to "spend" are completely decoupled.
- The Spending Key: This is the ultimate control key. It is used to generate the cryptographic signatures required to move ZEC. It must be guarded with your life.
- The Viewing Key: This key can only read data. If a hacker steals your Viewing Key, they can see your transaction history, but they cannot steal a single fraction of a ZEC.
3. The Full Viewing Key (FVK)
The Full Viewing Key is the master observation key for a specific Zcash account. If you give someone your FVK, they can see both the incoming transactions (funds you received) and the outgoing transactions (funds you sent) for that specific shielded address. They will also be able to read the encrypted memos attached to those transactions.
4. The Incoming Viewing Key (IVK)
Sometimes, you only want to share part of the picture. The Incoming Viewing Key allows the holder to see all the funds that have been sent to your address, but it hides all the funds you have sent away. This is particularly useful for a merchant or a charity that wants to transparently prove their revenue or donations without exposing how they are spending their capital.
5. The Outgoing Viewing Key (OVK)
Conversely, the Outgoing Viewing Key allows the holder to decrypt and see only the transactions where funds were sent out of the wallet. This is useful for auditing expenses or proving to a third party that a specific payment was made, without revealing the total incoming revenue of the account.
6. The Role in Blockchain Syncing
Viewing keys aren't just for sharing with auditors; they are essential for your own wallet software to function. Because all shielded transactions look like random noise on the blockchain, your local wallet software (like Zecboat) uses your Full Viewing Key to scan the blockchain in the background. It attempts to decrypt every transaction block. When it successfully decrypts one using your FVK, it knows that transaction belongs to you and updates your balance.
7. Compliance and Auditing
Viewing keys represent the bridge between strict privacy and regulatory compliance. If a business operates entirely in Zcash, they can maintain total competitive privacy from their rivals. At tax time, they simply hand their Full Viewing Key to the IRS or their certified public accountant. The auditor can verify every single transaction mathematically, proving that zero-knowledge privacy and financial compliance can coexist.
8. Viewing keys and Collections
Every Collection in the Zecboat Registry publishes its viewing key. Zecboat 0.7.0 uses it to check the Collection against your own node: supply, closure on chain, every unit bound to the collection key, every zatoshi the issuer spent. ✓ genuine · ✗ failed · ? not checked yet.