zcash fork自bitcoin v0.11.2版本。以下内容主要摘自 https://electriccoin.co/blog/zsl
On the Bitcoin blockchain, creating a valid transaction involves proving three things:
Proof that the coins have not been spent previously is obtained from the ledger itself, and requires no effort by the Sender.
The Sender proves ownership of the coins he wants to transfer by digitally signing the transaction using the secret key that corresponds to the address that currently holds the coins. To allow this signature to be verified, the Sending address must be disclosed. In turn, the Recipient will only be able to spend the coins, if his address is also disclosed.
With Bitcoin, verifying that the transaction’s inputs equal its outputs is trivial because the amount being transferred is disclosed.
Zcash uses zero-knowledge proofs (specifically, zk-SNARKs) to prove the same three facts, without revealing any information about the Sender, Recipient or the assets that are being transferred. Each valid transaction is accompanied by a zk-SNARK which proves that: the Input assets exist and have not been spent previously, the creator of the transaction has authority to spend the Input assets, and the quantity and type of the Inputs equals the quantity and type of the Outputs.
The information required to spend the Outputs (by creating a new zk-SNARK) is attached to the transaction, encrypted using the Recipient’s public key, and can only be used by the Recipient.
The result is effectively a new type of distributed ledger, which we call the zero-knowledge security layer, or ZSL.
Zcash is an implementation of ZSL, using a fork of the Bitcoin codebase to enable transparent transactions.
In building Zcash, we could have implemented ZSL by itself (i.e. without support for transparent transactions) but we believe that users were more likely to be comfortable with a cryptocurrency that also supports the sort of transparent transactions they’re already familiar with. Enabling Bitcoin-style transparent transactions also makes it simple to integrate with Zcash using existing tools and infrastructure that were built to support Bitcoin.
Zcash 的ZSL(Zero-knowledge Security Layer)层可根据需要对不同的平台进行适配。