Getting snarky with security. Let's unlock the mystery of zkSNARKs.

29 Aug 2023, 20:50
Getting snarky with security! Let's unlock the mystery of zkSNARKs🗝️🔒 Think of zkSNARKS as truth's secret keepers, proving facts without revealing more than the truth itself. zkSNARKs cover 4⃣ key components, let’s discuss them with the following example: Alice wants to prove to Bob that she knows the square root of 16 without revealing the actual square root. Alice turns the problem into a math equation: x^2 - 16 = 0. This equation is only correct if Alice has the right answer for x, which is 4 (the square root of 16). Bob picks a secret, and names it 's', and Alice proves that the equation works for 's' without telling what x is. This makes things simpler and needs less info to check. Alice and Bob have a secret code (encryption) that lets them solve the problem without saying what x is. They can do math with hidden numbers, so Alice can show Bob that the equation is right using their secret code. Alice makes the numbers secret by multiplying them with random ones. This stops Bob from knowing the real square root, but he can still check if the first equation is right. zkSNARKS also have a special starting step to make secret keys for the system to work. In the example, Alice and Bob make rules for their game. They ask trusted friends to help and create secret codes. These codes let Alice show Bob she knows the square root without saying it. This process includes several people giving bits of info to create parameters, so no one knows everything. But if this setup is at risk, the whole system could be too. Let's dive into each piece: Zero Knowledge lets the prover prove a fact is true to the verifier without sharing extra details. 1⃣ Succinct means the proof is brief and the verifier can check it swiftly. 2⃣ Non-Interactive means the prover and verifier interact just once to prove the statement. 3⃣Argument, The prover creates a zkSNARK proof to show they know a statement, meeting the soundness rule. This blocks attackers from making fake proof that the verifier thinks is real. 4⃣ (Of) Knowledge, the prover persuades the verifier they hold secret info without saying what. The prover makes proof only with secret access.