https://www.change.org/p/clemency-for-ross-ulbricht-condemned-to-die-in-prison-for-a-website1024Photo by Austin Distel on Unsplash

Proof That I Know Something… Proving I Know x for Hash(x)

--

We live in a digital world that gives too much away. Our systems are often set up to store sensitive information on us, and where we also pass this sensitive information through our applications. But, there is another way, and that’s the creation of Non-interactive Zero Knowledge Proofs (NI-ZKP). These magical little functions allow us to prove that we know something secret and give cryptographic proof for it.

So let’s take an example, and where Peggy has a secret value of x, and that Victor has stored a hash value such that:

y=H(x)

If Victor uses a 256-bit hash, there is virtually no chance that we will ever discover the value of x, with just the knowledge of y. x could thus be Peggy’s password, or my National Insurance number. It could even be the proof of a given 256-bit encryption key.

So let’s see if we can prove x with a knowledge of H(x), and run in a smart contract. As the smart contract can expose values, we need to keep the value of x secret. For this, we turn to Zokrates and Solidity.

Zokrates

ZKPs have been around since the mid-1980s, and have often been heavy in terms of their processing requirements. One new family has come along, though, and which provides fast and short proofs. This is zkSnark…

--

--

Prof Bill Buchanan OBE FRSE
ASecuritySite: When Bob Met Alice

Professor of Cryptography. Serial innovator. Believer in fairness, justice & freedom. Based in Edinburgh. Old World Breaker. New World Creator. Building trust.