# Zero-knowledge Proofs and Leo

By [Nataliiiiii](https://paragraph.com/@iamcryptogirl) · 2024-05-01

---

**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 performed the calculations correctly; for example, that we used a private key to send an NFT to someone, or that we have some attribute that allows us to update the application state. In addition, it allows us to keep some data secret if we so wish; for example, we do not need to disclose the private key that we used to send the NFT. And the evidence data is also much smaller than all the calculations, so it will require much less storage space (in the chain) and will be faster to transfer.

![](https://storage.googleapis.com/papyrus_images/0de8c06ab1f7da3a984f68baa0ab95f60d9d161b6c7f0d8d02f87afb62450cf8.png)

**What is Leo**

Leo is a Rust—based, statically typed programming language designed for writing private applications. It is designed for developers who can intuitively build the Aleo blockchain, providing the foundation for a private decentralized ecosystem. It is the first known programming language that provides a testing environment, a package registry, an import converter, a remote compiler and a theorem generator for applications with ZKP.

The Leo syntax is made in the likeness of Javascript and Typescript, so JS/TS developers will have a very simple learning curve.

![](https://storage.googleapis.com/papyrus_images/818855b65671edd2a088059b6c6065595871894a666e323ca5bbedea45785e0e.png)

Let's go deeper and say that you wrote bubble sorting — what does Leo actually do when you run the program?

It takes your code, creates a validation schema that represents the calculation you want to run, fills in the input data with the desired values, runs the schema, generates validation keys, and then combines all the relevant data into a ZKP. For example, you can run it on the input data in the image below.

![](https://storage.googleapis.com/papyrus_images/1b41231f468030c1511e6b4dbb806de548584e6a8be30af7f5ef1bbeb6935902.png)

But we know that using Leo does not require any special knowledge in cryptography at all, so what is this thing about creating “evidence”? To summarize, Leo outputs a proof that you performed 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 will be able to confirm that the array was indeed sorted by checking the proof, and not the array.

This may not seem so fast if the array contains only 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!) it starts to bring a lot more value.

Leo also does more than just create a schema for you and generate a proof based on it. It is packed with functionality that helps to reduce development time as much as possible. The testing platform, package registry, and import converter work together to save developers a lot of time by ensuring that external functions are easily imported and that the code actually does what was expected of it.

Thus, it can be concluded that Leo is an integral component of the Aleo blockchain, embodying a unique programming language that was developed to ensure the privacy and security of users. With a particular focus on maintaining confidentiality, Leo uses advanced cryptographic techniques, in particular zero-knowledge proofs (ZKPS), to verify transactions and perform calculations, while ensuring data confidentiality.

This gives developers the opportunity to create decentralized applications (gapps) that operate with a higher degree of privacy and security compared to traditional blockchain solutions. Leo's design takes into account complex logic, allowing you to create complex smart contracts and dApps.

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 eliminate as many obstacles as possible in application development. This is what Leo helps to achieve. If you want to know more, take a look at the documentation.

[https://developer.aleo.org/aleo/getting\_started/overview/](https://developer.aleo.org/aleo/getting_started/overview/)

*   Website ~ [https://www.aleo.org/](https://www.aleo.org/)
    
*   Twitter ~ [https://twitter.com/AleoHQ](https://twitter.com/AleoHQ)
    
*   Community Twitter ~ [https://twitter.com/aleocommunity](https://twitter.com/aleocommunity)
    
*   GitHub ~ [https://github.com/AleoHQ](https://github.com/AleoHQ)
    
*   Community Forum — [https://community.aleo.org/](https://community.aleo.org/)
    
*   Community Calendar ~ [https://www.aleo.org/community/calendar](https://www.aleo.org/community/calendar)
    
*   YouTube — [https://www.youtube.com/channel/UCS\_HKT2heOC\_q88YQLiJt0g](https://www.youtube.com/channel/UCS_HKT2heOC_q88YQLiJt0g)
    
*   Developer Documentation ~ [https://developer.aleo.org/](https://developer.aleo.org/)
    
*   Leo Playground ~ [https://play.leo-lang.org/](https://play.leo-lang.org/)
    
*   Aleo Block Explorer ~ [https://www.aleo.network/](https://www.aleo.network/)
    
*   Community Blog ~ [https://medium.com/@AleoHQ](https://medium.com/@AleoHQ)
    
*   Announcements Blog ~ [https://www.aleo.org/blog](https://www.aleo.org/blog)

---

*Originally published on [Nataliiiiii](https://paragraph.com/@iamcryptogirl/zero-knowledge-proofs-and-leo)*
