ZKP basic formulas
Core concepts and formulas
Let's imagine, alice wants to send some secret information s
to bob and she doesn't want to share it with the verifier. then, she can simply hash the value of s
and submit this hash of secret information along with the proof prf
that proves h==s. so when the verifier runs verification function by providing h
and prf
as inputs, it would return true only when h==s
. so verifier can convenience himself that proof provided by alice is correct. here verifier has no idea about secret value s
and only knows hash of it.
ZKP Consists three major functions
Key Generation (G)
Prover Function (PF)
Verifier Function (VF)
1. Key Generator(G):
Key Generator function(G) takes lambda Λ
(a random generated constant larger sized number) as input and generates two publicly available keys like, proving Key(pk) and verifying key(vk). these keys are used in respective proving verfying function. here lambda value should be tricky and large in size. if anyone knows it, they can generate fake proofs in order to manipulate data.
2. Prover Function(PF):
Prover function takes previously generated proving key, secret value s,
and hash of secret h
as inputs and generates proof prf
. this proof will be verified by a verifier.
3. Verifier Function:
verifier function takes previously generated verifying key(vk), a hash of secret h
and prf
generated by prover as inputs and returns true or false based on proof submitted.
Last updated