{"id":22700419,"url":"https://github.com/uncomputable/zkp-workshop","last_synced_at":"2025-04-13T06:14:22.354Z","repository":{"id":167200915,"uuid":"642773965","full_name":"uncomputable/zkp-workshop","owner":"uncomputable","description":"Explore the world of zero-knowledge proofs from first principles.","archived":false,"fork":false,"pushed_at":"2024-11-30T14:52:06.000Z","size":611,"stargazers_count":39,"open_issues_count":5,"forks_count":6,"subscribers_count":2,"default_branch":"master","last_synced_at":"2024-11-30T15:36:11.809Z","etag":null,"topics":["cryptography","elliptic-curves","jupyter","jupyter-notebook","learning","math","mathematics","python","snarks","workshop","zero-knowledge","zkp"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"cc0-1.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/uncomputable.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2023-05-19T10:10:01.000Z","updated_at":"2024-11-30T14:52:10.000Z","dependencies_parsed_at":"2024-11-30T15:39:14.772Z","dependency_job_id":null,"html_url":"https://github.com/uncomputable/zkp-workshop","commit_stats":null,"previous_names":["uncomputable/zkp-workshop"],"tags_count":3,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/uncomputable%2Fzkp-workshop","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/uncomputable%2Fzkp-workshop/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/uncomputable%2Fzkp-workshop/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/uncomputable%2Fzkp-workshop/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/uncomputable","download_url":"https://codeload.github.com/uncomputable/zkp-workshop/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":229013251,"owners_count":18006191,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["cryptography","elliptic-curves","jupyter","jupyter-notebook","learning","math","mathematics","python","snarks","workshop","zero-knowledge","zkp"],"created_at":"2024-12-10T06:12:07.021Z","updated_at":"2024-12-10T06:12:07.666Z","avatar_url":"https://github.com/uncomputable.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Getting to Know Zero-Knowledge\n\nEveryone talks about zero-knowledge proofs (ZKP), but who understands them? How can a proof consist of bytes without leaking any knowledge? Why should I trust such a proof? 🤔\n\n## What this is\n\nThis is a workshop about ZKP written in Python. We use Jupyter as our interactive learning environment. Each notebook is a chapter. The chapters cover fundamentals, applications and much more. Explore and have fun 😜\n\n## What this _isn't_\n\nWe will not cover the latest and shiniest crypto. We will not build SNARKs, STARKs or validity rollups. The code you will see will not live up to the highest security standards _(we use insecure parameters and take shortcuts for easier learning)_ 🕵️\n\n## Rationale\n\nMaster the basics first, then move to the advanced stuff; that is my philosophy. Let's build an intuition for how ZKP works. We start small and work our way up. Things become simpler when we break them down into their constituent parts. Divide and conquer. Once there is understanding, we can take what we learned here and apply it to real problems 💪\n\n## Benefits of zero-knowledge proofs\n\nZero-knowledge proofs have clear benefits compared to ordinary plain-text proofs. These properties might seem impossible and have the potential to change our world.\n\n### Compact\n\nProofs grow logarithmically in size. If you double the size of the data, then the size of the proof grows by a single bit. This means, we can **compress data beyond entropy**!\n\n### Fast\n\nProofs take logarithmic time to verify. If you double the number of steps of a computation, then the verification of the proof only takes one step longer! This means, we can **compress computations**!\n\n### Zero-knowledge\n\nProofs reveal no information. Everything that is sent over the wire is randomized. This means, we can **work on private data without revealing it**!\n\n## Run the workshop\n\nRun the workshop online (binder) or locally (nix or pip).\n\nWe have come a long way since this workshop Sage (1 GB). The new dependencies take up less than 50 MB 🍃\n\nSee below how to set up the workshop.\n\nThen select a chapter to read 📖\n\n### Use binder\n\nClick the binder badge and wait for the workshop to be built on the server.\n\n[![Binder](https://mybinder.org/badge_logo.svg)](https://mybinder.org/v2/gh/uncomputable/zkp-workshop/master)\n\n### Use nix\n\nUse the provided nix flake to set up the runtime environment.\n\n```\nnix develop\n```\n\nRun Jupyter on the command line.\n\n```\njupyter notebook\n```\n\n### Use pip\n\nCreate a virtual environment and use pip to install the dependencies.\n\n```\npython3 -m venv venv \u0026\u0026 source venv/bin/activate\npip install -r requirements.txt\n```\n\nRun Jupyter on the command line.\n\n```\njupyter notebook\n```\n\n## Read the chapters\n\nSome chapters depend on lessons from other chapters.\n\nStart with chapters that depend on nothing else and work your way down the dependency tree, towards more advanced chapters.\n\nSkip / skim lessons you already know. Look at what interests you and ignore everything else. Have fun 🤓\n\n![Chapter dependency tree](chapter_dependencies.svg)\n\n## Explore extra content\n\n### See why the discrete logarithm is hard\n\nSee how the curve points jump in 2D space as you iterate through the curve.\n\nThis is explained in more detail in the chapter on elliptic curves 🌀\n\n```\npython3 hardness_dlog.py\n```\n\n### Play Sudoku\n\nPlay the side of Victor in an interactive proof of knowledge of a Sudoku solution. Accept or reject. Peggy might be lying! 🧩\n\n```\npython3 play_sudoku.py\n```\n\n### Customize the workshop\n\nLook at [the documentation](https://github.com/uncomputable/zkp-workshop/blob/master/customization.md) for how to further customize the workshop 🎨\n\n## Improve the workshop\n\nIf you see errors or room for improvement, then feel free to open a Github issue.\n\nPull requests are also welcome.\n\nLet's turn this workshop into the best it can be 🚀\n\n## Continue your journey\n\nThere is a lot more to learn about ZKP.\n\nCheck out these external resources. Happy learning 🧠\n\n- [Number theory explained from first principles](https://explained-from-first-principles.com/number-theory/)\n- [Tackling bulletproofs](https://github.com/uncomputable/tackling-bulletproofs)\n- [ZKP explained in 3 examples](https://www.circularise.com/blogs/zero-knowledge-proofs-explained-in-3-examples)\n- [Computer scientist explains ZKP in 5 levels of difficulty](https://www.youtube.com/watch?v=fOGdb1CTu5c)\n- [How to explain ZKP to your children](https://pages.cs.wisc.edu/~mkowalcz/628.pdf)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Funcomputable%2Fzkp-workshop","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Funcomputable%2Fzkp-workshop","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Funcomputable%2Fzkp-workshop/lists"}