Skip to content

Latest commit

 

History

History
217 lines (141 loc) · 12 KB

week0_course_primer.md

File metadata and controls

217 lines (141 loc) · 12 KB

Week 0 - The Course Primer

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! ⚠️📚⚠️

Getting Help

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.

How 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.

Where to Ask Questions

  • 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.

How to Work with GitHub PR Workflow?

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.

Course Info

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.

Open-Source Culture, Git, and Github

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:

Prerequisite Knowledge

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.

A Primer for Zero Knowledge Proofs

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:

Throughout this course, we will provide you with a set of reflection questions to check your understanding.

:::info 🤔 Consider the following:

  1. What are Zero-Knowledge Proofs?
  2. What are the principles of soundness, completeness, and zero-knowledge?
  3. What distinguishes interactive from non-interactive proofs? :::

Thought Experiments

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:

:::info 🤔 Consider the following:

  1. Which example did you find most enlightening, and why?
  2. How do these examples demonstrate the principles of zero-knowledge proofs?
  3. Can you think of any potential applications of these concepts in everyday life?
  4. Can you explain these thought experiments to someone non-technical? Try it with a friend or family member! :::

Use-Cases and Applications

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:

  1. Which application of ZKP do you find most intriguing, and why?
  2. Can you imagine any other potential applications of ZKP? :::

Supplemental materials on ZKPs [optional]

For more content (especially for those who prefer videos), check out the following:

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.

Number Theory

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!

Topics to Research

  • 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:

  1. Which of these concepts did you find most challenging, and why?
  2. Can you explain these concepts in your own words? :::

💪 Exercises

Here are the exercises for this module. Collaborate with others to find the answers, and remember to support each other!

Comprehension

Summarize each of the following concepts in a few sentences:

  1. Three-Colouring Graph problem with Hats
  2. Ali Baba’s Cave analogy
  3. The difference between interactive and non-interactive proofs

Modular Arithmetic

Solve the following problems and gain a practical understanding of modular arithmetic:

  1. $7\ mod\ 13$
  2. $15\ mod\ 13$
  3. $(7+15)\ mod\ 13$
  4. $(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?

Generators

Consider the cyclic group $(Z_{12}, +\ mod\ 12)$, commonly referred to as the "additive group of integers modulo 12". Address the following points:

  1. What does the term 'generator' mean?
  2. Can you find a generator for this group?
  3. Are there other generators for this group? If yes, what are they?

Implementing a Modular Arithmetic Calculator

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 and num2, 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.

Conclusion

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!