Score:0

Summarized steps for zero knowledge proof on a public blockchain transaction

kg flag

Im triying to understand Zero knowledge proof and its applications, my first instict is a blockchain (I will use Bitcoin-like for simplicity sake)

Im triying to wrap my head around it by describing the logical steps for a public blockchain transaction. Everything I read talks about poving values to others by interchanging messages with another party (interactive zkp), but I found nothing to check if the values are valid or not in a public space (non interactive zkp), to avoid double spending or even storing the data securely. My intuition is that it also requires homomorphic evaluations on the values so that only the reciever can actually know what value is stored bu talso allowing comparisons between the encrypted values. So far this is what I have (in logical steps)

  A and B are key pairs each with the following properties;
  A(pub): Public key
  A(priv): Private key
  A(env): Public (evaluation) key
  V is a validator

  A wants to transfer 12 coins to B and has 15 coins on his wallet, based on its last UTxI added up.
  A encrypts the UTxI and UTxO values (12 and 3) of the Tx with (B)env so its now H(i) and H(o)
  A creates proof for each encrypted value (H) as PH(i) and PH(o), and sends the transaction.

  Tx = H, UTxI => H(i), UTxO => H(o), In => A(pub), Out => B(pub), Proof of In => PH(i), Proof of Out => PH(o), 

  V wants to know if A has enough coins to send the Tx to B.
  V uses homomorphic evaluation to add all the UTxO (H(o)) of TX and compares against all inputs on A(pub), which are also encrypted.
  V should do the same with the UTxI + UTxO, to check if they are equal to the balance in A(pub)
  V verifies the proofs PH(i) and PH(o), if valid, proceeds to accept Tx. 

  B recieves Tx and should be able to decrypt all UTxI and UTxO to know how many coins he recieved using (B)priv
  and B(env) to reverse the homomorphic calculation.

  He also has proof of each one of them for third parties to validate he has that ammount exactly.

This example uses some Bitcoin like UTx system where the amount of coins in the wallet is calculated by adding up the unspent transactions inputs to this adress (sorry if it has some errors on the logic), but what im triying to understand above is how would the blockchain need to be upgraded in order to allow completely private transactions and still be validated by third parties.

Is the logic described correct or am I missing something?

Thanks for the time!

Vadym Fedyukovych avatar
in flag
Would you read Zcash protocol?
mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.