The main goal of this work is to allow developers to use zero knowledge proof in their applications – this is achieved by minimizing the requirements for knowledge of cryptography.
What is zero knowledge proof (ZKP)?
First of all, let’s briefly remind ourselves what ZKP is. This is some piece of data that proves that we have done the calculations correctly; for example that we used the private key to send to someone NFTs, or that we have some kind of attribute that allows us to update the state of the application. Also, it allows us to keep some data private if we so choose; for example, we don’t need to reveal the private key we used to send NFTs. And proof data is also much smaller than all calculations, so it will require much less storage space (on the chain) and will be faster to transfer.
Review by Leo
Leo is a Rust-based, statically typed programming language designed for writing private applications. It is designed for developers who can intuitively build a blockchain Aleo, providing the foundation for a private decentralized ecosystem. It is the first known programming language that introduces a testing framework, package registry, import resolver, remote compiler, and theorem generator for ZKP applications.
What’s going on under the hood?
Let’s go deeper and say you wrote a bubble sort – what is Leo actually doing when you run the program?
It takes your code, creates a validation schema that represents the calculation you want to run, populates the inputs with the values you want, runs the schema, generates validation keys, and then concatenates all relevant data into a ZKP. For example, you can run it on the input in the image below.
But we know that Leo doesn’t require much knowledge of cryptography to use, so what’s the deal with creating “evidence”? To summarize, Leo outputs a proof that you did your calculations correctly, which means that if you run the above scheme on some array and present the output array along with the proof, any observer can confirm that the array was indeed sorted by proof check, not by array.
This may not seem so fast if the array only has 10 elements, but when we start working with data structures that have millions of elements and more complex calculations, checking the proof (which is always the same size!) starts to add a lot more value.
Leo also does more than just create a diagram for you and generate a proof from it. It is filled with functionality that helps to reduce development time as much as possible. The test framework, the package registry, and the import resolver work together to save developers a lot of time, ensuring that external functions are easily imported and that the code actually does what is expected of it.
When you are building an ecosystem whose main goal is to develop scalable and secure applications, one of the best ways to improve scaling is to remove as many application development barriers as possible. This is what Leo helps to achieve. If you want to know more, check out documentation.