Privacy currencies and zk-SNARK: how do they work?
- Zk-SNARKs are a form of cryptography that allows privacy coins like Zcash to work.
- Here’s everything you need to know about how they work in crypto and other places you might see them appear.
A significant segment of the crypto industry revolves around so-called “privacy coins,” which promise highly anonymous transactions. Privacy coins, notably Zcash (ZEC), are based on a technology called zk-SNARKs, which stands for Zero-Knowledge Succinct Non-Interactive Argument of Knowledge. This field is also called zero-knowledge cryptography.
The concept of “zero knowledge” can be somewhat confusing, and zk-SNARKs get complicated quickly, so let’s start from the beginning.
In a nutshell, cryptography is the study of secure communication techniques. People often use cryptography when they only want a sender and a recipient to see the contents of a message.
Cryptography has been around for centuries. One of the earliest examples of cryptography was born in ancient Egypt where the followers of Khumhotep II inscribed his tomb with encrypted symbols that marked a departure from traditional Egyptian hieroglyphics.
One of the most common elements of cryptography in the cryptocurrency world is hash functions, the backbone of any blockchain. Hash functions – especially SHA-256, a hash function found in most blockchains – essentially turn an entry such as a word phrase or number into fixed-length encrypted information that looks like this:
Hash functions (you can find out more here) allow blockchains like Bitcoin to process transactions, link blocks together and ensure the integrity of blockchain data.
Like hash functions, zk-SNARKs are a form of cryptography. They are used to ensure stronger privacy than what users would otherwise have on a blockchain.
Zcash: zk-SNARKs in action
Zk-SNARKs are a form of “zero-knowledge” cryptography – hence the zk.
Zk-SNARKs allow crypto users to send transactions over a blockchain in a fully encrypted fashion – meaning no one can read them – while also signifying that the transactions took place legitimately. But how is this possible?
Zero-knowledge proofs allow person A to prove to person B that statement X is true without revealing any information beyond the validity of statement X itself. Imagine verifying to someone that you are over 21 without revealing your birthday or the fact that you are 25. This is a useful way to imagine how zk-SNARKs work.
This is exactly what happens when two people make a transaction in Zcash, one of the major privacy rooms in the cryptocurrency industry. Zcash’s goal is to anonymize as much information as possible about users and transactions.
“Zcash’s strong privacy guarantee is derived from the fact that transactions protected in Zcash can be fully encrypted on the blockchain, while still being verified as valid according to network consensus rules using zk-SNARK evidence,” the Zcash website bed.
Basically, this type of protected transaction is the opposite of what we see, for example, in the Bitcoin blockchain, where the addresses of the sender and recipient – as well as the value of a transaction – are accessible to everyone.
In a protected transaction, Zcash uses zk-SNARK to show that a sender has the funds they want to transmit and that the transaction cannot be changed by a third party.
For these protected transactions to work, they must meet certain conditions. Specifically, in Zcash, they involve users posting an “engagement” and revealing a “void”.
A commitment refers to an unspent balance on the Zcash blockchain. Much like Bitcoin, nodes on Zcash’s network maintain a list of these balances, showing that funds are indeed available.
Someone who wants to send Zcash posts a pledge to say, “See, I have this amount of money” (but not revealing how much). In turn, the canceller is used to say “this same amount of money is requested – it has been sent to someone else”.
In other words, cancellers are tied to commitments – these are numbers that must be revealed before a commitment can be spent. If Alice is to send Bob Zcash, she must use a pledge to prove that she has authority to spend the funds, and a void to show that the required amount has been reserved exclusively for Bob (without, of course, revealing that Bob is. the receiver ).
Each new protected payment gives rise to three types of records on the blockchain: records protected by a hash. The hashes in question represent: the address of the recipient of the transaction, the amount that was sent, and a number unique to the transaction itself.
The result is that protected transactions rely on hash functions like Bitcoin, but it’s the zk-SNARKs that add a new layer of privacy.
Pieces like Zcash and Monero– another popular privacy currency in the crypto sphere – are popular with some users given that the crypto industry is made up of many libertarians. Both coins attempt to distinguish themselves from more popular cryptocurrencies like Bitcoin by claiming that no one could break into your private financial life if you used their coins.
However, given worries As cryptocurrencies in general – and privacy coins in particular – can serve as tools for criminals, these projects are far from popular with law enforcement agencies and regulators.
The future of zk-SNARKs
zk-SNARKs is a useful tool for anonymizing crypto transactions. But they’re also helping to power a growing number of other applications beyond privacy rooms. Celo, for example, is a cryptocurrency protocol which focuses on mobile payments and aspires to create a more inclusive financial world.
Decrypt spoke to Pranay Mohan, who works on products and engineering at Celo. He suggested that Zcash might be where people first hear about zk-SNARK, but that the potential of the technology extends far beyond privacy hawks. Mohan highlights in particular how zk-SNARK can help people in developing countries.
“If we think about how these people are able to use cryptocurrency now, it’s almost impossible, they don’t use Metamask and throw $ 10,000 into a random DeFi project,” he said. declared. By using zk-SNARKs, Mohan adds, mobile phone users can instantly sync with a blockchain – retaining the same crypto properties without trust, but on devices that don’t have a high degree of technical capability.
Despite their promise, zk-SNARKs remain very niche. Even in a highly technical industry like crypto, a lot of people don’t know what they are. But that may change as more companies start to adopt the technology.
These included Aleo, a startup that recently raised $ 28 million from blue chip venture capitalists, to create tools that will allow web developers to embed zero-knowledge proofs into a wide variety of internet applications – a project that promises to allow consumers to browse the web without revealing a treasure trove of personal data.
But that didn’t deter EY, one of the world’s largest accounting firms, from experimenting with this advanced crypto.
Paul Brody, global blockchain leader at EY, says the company does not use any proof of knowledge like zk-SNARKs to enable customers to take advantage of the potential of blockchain without sacrificing user privacy.
According to Brody, the accounting firm’s Nightfall solution provides a way to transact over the Ethereum network with absolute privacy, while providing businesses – and not just individuals – these benefits.
And while there are regulatory concerns about highly private financial transactions, Brody believes zk-SNARKs are going to gain momentum in the future.
“Privacy is essential for business users,” he said, adding, “For businesses, some of their most sensitive information is about what they buy, from whom, how much they pay and how much they buy in. volume.”