Waivio

Recommended Posts

Is homomorphic encryption better than z-snarks?

1 comment

cordio4.83last year2 min read

https://cdn.pixabay.com/photo/2018/01/17/20/22/analytics-3088958_1280.jpg
pixabay

I am no expert in cryptography, so I can answer this in the best of my understanding. These are two different schemes, for two different purposes.
Homomorphic encryption, is an encryption scheme where you know a secret, so you encrypt with a private key. Nobody else can know what that secret is without the key, but they are still able to do certain calculations on that encrypted data, despite not knowing what the underlying encrypted secret is. So they have the secret, they just cant decipher it.

On the other hand, ZK-SNARK is a proving system. It is employed when you know a secret, and you want to prove that you in fact know the secret, with out revealing what that secret is. In this case the secret is not provided, just proof you know it. Homomorphic encryption is used in aspects of this proving system.

So in our case, we use ZK-SNARKs to prove the inputs of a transaction are as they are claimed to be. The inputs themselves are not included in the message, just the zero-knowledge proof. This is also where other projects can use zero-knowledge proofs to decrease size of messages, and increase speed. Because the data itself is not required in a encrypted form, it can make systems much faster when only proof of that data is needed. The ZK-SNARK system is very fast to verify and typically much smaller than the data it is proving.

Comments

Sort byBest