Blockchains are built for transparency and verifiability. Most of the data on a blockchain is publicly verifiable. For example, all transactions sent to bitcoin are public and anyone could query the balance of any account. Generally, this is not an issue because blockchain accounts are random strings and it is not easy to link an account to a human. This property of blockchains is also called pseudo anonymity.
However, sometimes we need privacy on blockchains for some use cases. For example, let’s say two supply chain participants want to transact over a blockchain and they don’t want to disclose their vendor costs to other participants who could be their competitors. In such a scenario, we need a way to hide data on the blockchain. Zero-knowledge proofs are one way of doing it.
Zero-knowledge proofs allow a prover to prove that they have some data without disclosing the actual data itself.