Python/Rust implementations and notes from Proofs Arguments and Zero Knowledge study group

Related tags

Command-line pazk
Overview

What is this?

This is where I'll be collecting resources related to the Study Group on Dr. Justin Thaler's Proofs Arguments And Zero Knowledge Book. The notes posted here will be copied out of my personal Obsidian note client; certain features like image and latex embedding will not render on Github, though should still be readable. If you would like to read them with latex rendering, a hack solution might be to copy them to a HackMD document.

The group open to everyone, and runs out of the ZK hack discord server by myself and the nice folks at the Zero Knowledge Podcast.

Have a nice repo of your own? I'd love to link to it! Questions about this resource? DM me on Twitter.

Links

  • Bryan's explainer on multilinear Lagrange interpolation
  • A Zoo to visit weird and wonderful Complexity classes (note that complexity theory is not required or even core knowledge for this book, but exists as one of many rabbit holes to dive into)
You might also like...
Rust Imaging Library's Python binding: A performant and high-level image processing library for Python written in Rust

ril-py Rust Imaging Library for Python: Python bindings for ril, a performant and high-level image processing library written in Rust. What's this? Th

An NTP implementation in Rust, supported by Internet Security Research Group's Prossimo project.

NTPD-rs NTPD-rs is an implementation of NTP completely written in Rust, with a focus on exposing a minimal attack surface. The project is currently in

Yet Another Kalman Filter Implementation. As well as Lie Theory (Lie group and algebra) on SE(3). [no_std] is supported by default.

yakf - Yet Another Kalman Filter Yet Another Kalman Filter Implementation, as well as, Lie Theory (Lie group, algebra, vector) on SO(3), SE(3), SO(2),

Create, reorder, group, and focus workspaces easily in i3. Fully configurable with enhanced polybar modules.
Create, reorder, group, and focus workspaces easily in i3. Fully configurable with enhanced polybar modules.

Create, reorder, group, and focus workspaces fast and easily in i3. Features Focus Mode: Eliminate Distractions Enable Focus Mode: Use groups and focu

`decaf377-rdsa` is a randomizable signature scheme using the `decaf377` group.

decaf377-rdsa is a variant of RedDSA, instantiated using the decaf377 group. Signatures are parameterized by domain (for instance, Binding and SpendAu

Librarian runs pre-configured commands against a group of files that match a set of filters

Filesystem Librarian Librarian runs pre-configured commands against a group of files that match a set of filters. The group of files is called a libra

Sky Island Showdown: CSE 125 Spring 2023 Group 5 Project, a Multiplayer, 3D Game

As the Wind Blows 💨 Project for CSE 125 Spring 2023, Group 5 Homepage » As the Wind Blows is a 3D multiplayer game, created with Rust, WGPU, and a to

An optimizing IK solver based on the Lie group of rigid transforms SE(3)
An optimizing IK solver based on the Lie group of rigid transforms SE(3)

OptIK A fast inverse kinematics solver for arbitrary serial chains, providing Rust and Python programming interfaces. The implementation is similar to

An ebpf knowledge base, based on llama_index and bpf-developer-tutorial

ebpf-knowledge-base An ebpf knowledge base, based on llama_index and bpf-developer-tutorial Usage First, you need to clone this repo: git clone --recu

Comments
  • Question on the 4.5.1 (Super-Efficient IP for counting triangle)

    Question on the 4.5.1 (Super-Efficient IP for counting triangle)

    I was thinking to post this question in the discord, but feeling the timeline style of conversion there is difficult to track of. Not sure if this is the best place to ask implementation questions relating the knowledge in the survey paper. If not, please let me know if there is an alternative.

    The sum check and the triangle counting example is intriguing. Currently I am making an implementation to demonstrate the sumcheck protocol over the triangle counting, with the MatMul IP optimization described in the section 4.4.2 of the survey paper. While implementing for the example definitely helps me understand the concepts thoroughly, I think this might serve as another examples to help others enhance the understanding the combination usage of the related concepts in addition to the existing vanilla sumcheck implementations.

    One area in the protocol puzzles me for quite a while is how the two sum check protocols used in the triangle counting example wire up. To describe the question in details, I outline my understanding of the procedures of invoking the sum check and MatMul IP protocols below.

    1st sumcheck

    1.1 Prover calculates the MLEs give the entries of matrix $A$ and $A^2$, and invokes the sumcheck protocol using the following equation and send univariate $g$ polynomial to verifier $$\tilde{f}_{A^2}(X, Y) \cdot \tilde{f}_A(X, Y)$$ 1.2 Verifier recursively checks $$g_{j-1}(r_{j-1})=g_j(0)+g_j(1)$$ 1.3 until the last round $$g_v\left(X_v\right)=g\left(r_1, \ldots, X_v\right)$$

    Because it is expensive for the verifier to validate the result in the last round by evaluating the $g(r_1,r_2,...,r_v)$, which corresponds to $\widetilde{f}_{A^{2}} \cdot \widetilde{f}_A$ given the entries of $A$ matrix, so it invokes the matmul IP to complete the check for the final round in the 1st sumcheck.

    2nd sumcheck

    2.1 Verifier chooses $(r_1, r_2)$ and invokes MatMul IP 2.2 Prover responses $$s(X):=\widetilde{f}_A\left(r_1, X\right) \cdot \widetilde{f}_A\left(X, r_2\right)=\left(r_1(1-X)+\left(1-r_1\right) X\right) \cdot\left(X\left(1-r_2\right)+r_2(1-X)\right)$$ 2.3 Verifier evaluates $$\tilde{f}_{A^2}\left(r_1, r_2\right)=s(0)+s(1)=r_1 r_2+\left(1-r_1\right)\left(1-r_2\right)$$, and multiplies it with $\tilde{f}_A\left(r_1, r_2\right)$ in order to get the target result $$\widetilde{f}_{A^{2}}\left(r_1, r_2\right) \cdot \widetilde{f}_A\left(r_1, r_2\right)$$ In my understanding, to convince the verifier the result of the double sumcheck protocol, the values from the equations of (1.3) and (2.3) should be equal.

    However, in the first sumcheck, the random values $(r_1, r_2,...,r_{v-1})$ are already bounded(or I should call it "determined"). But in the second sumcheck in the matmul IP, the $(r_1, r_2)$ are newly chosen random values, unrelated to the corresponding ones although synthetically the same.

    If $(r_1, r_2)$ doesn't represent the same random numbers as in the first sumcheck, the resulting value in the (1.3) won't be equal to (2.3). So I assume applying a new random number $r_3$ to both $s(X)$ in (2.2) and $g_v(X_v)$ in (1.3) neither makes them equal.

    Then how can the verifier be convinced of the whole process? It is probably something I am missing during the process described above. Appreciate any hints.

    opened by katat 1
Owner
Thor
zk wink
Thor
parse command-line arguments into a hashmap and vec of positional args

parse command-line arguments into a hashmap and vec of positional args This library doesn't populate custom structs, format help messages, or convert types.

James Halliday 17 Aug 11, 2022
ddi is a wrapper for dd. It takes all the same arguments, and all it really does is call dd in the background

ddi A safer dd Introduction If you ever used dd, the GNU coreutil that lets you copy data from one file to another, then you may have encountered a ty

Tomás Ralph 80 Sep 8, 2022
Parse command line arguments by defining a struct.

StructOpt Parse command line arguments by defining a struct. It combines clap with custom derive. Documentation Find it on Docs.rs. You can also check

Guillaume P. 2.6k Jan 5, 2023
Notes on learning the Rust programming language syntax.

notes-on-rust Notes on learning the Rust programming language syntax. Resources https://www.rust-lang.org/learn/get-started https://doc.rust-lang.org/

Fred Snyder 1 Jan 2, 2022
Create tasks and save notes offline from your terminal

Create tasks and save notes offline from your terminal

null 9 Dec 18, 2022
Bolik Timeline is local-first software for keeping notes and files.

Bolik monorepo Bolik Timeline is local-first software for keeping notes and files. This repo contains alpha-quality software. This means that we are e

Bolik Oy 18 Apr 11, 2023
An easy, fast and lightweight tool to create notes in terminal.

An easy and lightweight tool to create notes in terminal. Features Make notes faster. Manage your notes directly in terminal. Lightweight and fast. Ea

Konstantin Zhigaylo 5 May 24, 2023
⚡️ A blazing fast way of maintaining powerful notes with connections between them.

Zettl ⚡️ A blazing fast way of maintaining powerful notes with connections between them. Installing Zettl To install Zettl, you will need the Rust too

Tirth Jain 26 Dec 2, 2022
Simple, lightweight, markdown-based notes app I might actually finish eventually

Jupiter A simple markdown & git-based notes app for Linux. Features Lightweight with minimal dependencies Git integration for syncing & versioning Sea

Maxim 6 Jan 31, 2023
Core Lightning plugin for sending zap (NIP-57) notes

Core Lightning plugin for sending zap events You can add the plugin by copying it to CLN's plugin directory or by adding the following line to your co

null 8 Mar 13, 2023