This is the pre-requisite module to be completed before the program begins. Everything in this module was designed to be easy to learn without much need for external mentorship support. However, if you find that you need additional support, don't hesitate to reach out!
Complete this module in its entirety before the program begins!
It's important to ask questions early and often. Many of the topics discussed are complex, and reaching out to others for different perspectives can be very helpful. The following section details how and where to ask questions.
When asking questions, it is important to consider several things before sending them off:
- Structure for the Reader: 📋 Organize your question clearly to make it easy to follow.
- Describe the Problem: 🛠️ Clearly explain the problem you are facing, including the issues or errors you have encountered.
- Detail Your Attempts: 🔍 Mention what you have already tried to solve the problem.
- Provide Context: 🌐 If relevant, give enough context, including code snippets or examples, so the reader can replicate the situation.
- Specify Your Environment: 💻 Mention your development environment, tools, and versions, if applicable.
- Be Polite and Patient: 🙏 Remember to be courteous and patient while waiting for a response.
- Core Program Discord - This is a good place to start as other students will have likely encountered similar questions and be able to help out.
- PSE Discord - This is the Discord chat for the entire PSE team. It consists of experts in the space doing active research and can answer some of your most technical questions. We recommend posting in the "#❓ask-any-question" channel.
- Core Program Telegram - Some of you might prefer Telegram. While this might be less focused than Discord, it's still worth posting your questions here if you are looking for more help.
It's important to understand how to work with GitHub PR workflow in core program. Watch this 3 minutes video to understand how to work with GitHub PR workflow.
This course was originally designed to help build the next generation of open-source contributors in the space of Zero Knowledge Proofs (ZKPs). The scope has since expanded to include concepts like Multi-Party Computation (MPC) and Fully Homomorphic Encryption (FHE). These topics can be encapsualted under a broader umbrella called Programmable Cryptography (ProgCrypto).
It's not only enough to know the fundamentals of ProgCrypto, but it's necessary to understand the culture of open-source development, public goods, and how to use Git and Github effectively.
A good summary of open-source culture, Git, and GitHub can be found in the following presentation by Adrian Li (the original author of this curriculum).
🎥 The Way of Open Source (video) [18:28]: Watch here
📊 The Way of Open Source (slides): View here
Take sometime to watch the video and afterwards review the following links as further reference:
- Git Cheat Sheet (by Github) - A concise list of common commands provided by Github Education.
- Comparing Git Workflow (by Atlassian) - This article by Atlassian compares popular workflows when using Git. For this course, a basic Feature Branching workflow should be sufficient.
A useful approach to learning complex topics is to "blackbox" the concepts. This means focusing on high-level ideas first and saving the detailed exploration for later. This way, you won't get intimidated by the complexity.
When studying a topic for the first time, only read the required materials. Skip the optional readings unless you're particularly curious about the details. This strategy will help you grasp the main concepts without feeling overwhelmed.
Before we delve into the core content of the module, consider acquainting yourself with some high-level concepts of Zero-Knowledge Proofs. Skim the following introductory articles to build a strong foundational understanding:
- Zero-knowledge proofs | ethereum.org
- A Primer on Zero-Knowledge Proofs 🔏
- Zero Knowledge Proofs: An illustrated primer [Part 1]
- Zero Knowledge Proofs: An illustrated primer [Part 2]
Throughout this course, we will provide you with a set of reflection questions to check your understanding.
:::info 🤔 Consider the following:
- What are Zero-Knowledge Proofs?
- What are the principles of soundness, completeness, and zero-knowledge?
- What distinguishes interactive from non-interactive proofs? :::
Engaging with these thought experiments will make abstract concepts more tangible and facilitate a deeper understanding of ZKPs. Each of these examples offers a unique perspective on the concept of zero-knowledge proofs:
- Example 1: Where’s Waldo?
- Example 2: Colored Balls (interactive)
- Example 3: Sudoku (non-interactive)
:::info 🤔 Consider the following:
- Which example did you find most enlightening, and why?
- How do these examples demonstrate the principles of zero-knowledge proofs?
- Can you think of any potential applications of these concepts in everyday life?
- Can you explain these thought experiments to someone non-technical? Try it with a friend or family member! :::
To connect theory with practice, let's explore the practical applications of ZKPs. The following resources illustrate how ZKPs are employed in real-world applications, particularly in the domain of blockchain:
:::info 🤔 Consider the following:
- Which application of ZKP do you find most intriguing, and why?
- Can you imagine any other potential applications of ZKP? :::
For more content (especially for those who prefer videos), check out the following:
- Video Lectures:
- Thinking in Zero Knowledge
By this point in the module, you should have a broad and multifaceted understanding of ZKPs. However, we're not done yet. Next, we'll tackle some key mathematical concepts that underpin this topic.
Building a solid foundation in number theory is essential for understanding the upcoming modules. The following module from Khan Academy provides an excellent introduction to this topic:
Below are topics that you will need to research independently (or with a teammate). This could mean searching these specific terms on Google, YouTube, Wikipedia, or even asking ChatGPT.
Don't forget to reach out for help when you're stuck!
-
Fundamentals:
- Prime Numbers and Composite Numbers
- Greatest Common Divisors (GCD)
-
Modular Arithmetic and Congruence
- What is modular arithmetic?
- Exploring congruence classes
-
Group Theory
- What is a group structure?
- What is a group operation?
-
Diving Deeper:
- What is a finite group?
- What is a cyclic group?
- What is a generator?
- What are finite fields?
:::info 🤔 Consider the following:
- Which of these concepts did you find most challenging, and why?
- Can you explain these concepts in your own words? :::
Here are the exercises for this module. Collaborate with others to find the answers, and remember to support each other!
Summarize each of the following concepts in a few sentences:
- Three-Colouring Graph problem with Hats
- Ali Baba’s Cave analogy
- The difference between interactive and non-interactive proofs
Solve the following problems and gain a practical understanding of modular arithmetic:
$7\ mod\ 13$ $15\ mod\ 13$ $(7+15)\ mod\ 13$ $(7\ mod\ 13 + 15\ mod\ 13)\ mod\ 13$
If the results of the third and fourth calculations match, they follow a "group structure". Can you determine if these do?
Consider the cyclic group
- What does the term 'generator' mean?
- Can you find a generator for this group?
- Are there other generators for this group? If yes, what are they?
Your task is to implement a simple modular arithmetic calculator in JavaScript (or similar high-level language of your choice). The calculator should support three operations: addition, subtraction, and multiplication.
The function modularCalculator
should take four parameters:
- A string,
op
, indicating the operation. It will be one of '+', '-', or '*'. - Two integers,
num1
andnum2
, which are the operands for the operation. - An integer,
mod
, which is the modulus.
The function should return the result of performing the indicated operation on num1
and num2
, then taking the result modulo mod
.
Remember, the result of subtraction could be negative, and in this case, you should add mod
to the result to ensure it's positive.
For addition and multiplication, remember that JavaScript's %
operator gives the remainder, not the modulus, but these will be the same for positive numbers.
Code Template:
function modularCalculator(op, num1, num2, mod) {
// Your code here
}
modularCalculator('+', 10, 15, 12); // Should return: 1
modularCalculator('-', 10, 15, 12); // Should return: 7
modularCalculator('*', 10, 15, 12); // Should return: 6
Feel free to use console.log
statements in your code to verify that your function is working as expected. For convenience, consider using https://repljs.com/ and pasting in the above code snippet to get started.
Congratulations on completing the Course Primer! You now have the foundational knowledge to dive deeper into Zero Knowledge Proofs and related cryptographic technologies.
Remember to stay curious, collaborate with peers, practice regularly, and be patient with your learning process. We're excited to see your progress and contributions to Programmable Cryptography. Good luck, and don't forget to reach out for help whenever needed!