Spartan- part 1

Table of Contents

R1CS encoding

R1CS instance \(x=(\mathbb{F},A,B,C,io,m,n)\)

let \(Z=(io,1,w)\), then we have for example

\(\underbrace{\begin{bmatrix}0&1&1&0\\0&0&1&0\\…&…&…&..\\…&…&…&..\end{bmatrix}}_{A}\begin{pmatrix}w_1\\1\\w_2\\w_3\end{pmatrix}\circ \underbrace{\begin{bmatrix}0&1&0&0\\0&0&1&0\\…&…&…&..\\…&…&…&..\end{bmatrix}}_{B}\begin{pmatrix}w_1\\1\\w_2\\w_3\end{pmatrix}\)

\(=\underbrace{\begin{bmatrix}1&0&0&0\\0&0&0&1\\…&…&…&..\\…&…&…&..\end{bmatrix}}_{C}\begin{pmatrix}w_1\\1\\w_2\\w_3\end{pmatrix}\)

This express the constraints:

$$(1+w_2) \cdot 1=w_1$$

$$w_2 \cdot w_2=w_3$$

In order to use the sum-check protocol, we need to encode R1CS in a different way, as sum-check is about …

arkwork ark-poly

Modules

domain

This module contains different evaluation domains used for polynomial arithmetic, especially those friendly to fast Fourier transforms (FFTs).

GeneralEvaluationDomain

Contains the GeneralEvaluationDomain for FFT-friendly fields.

mixed_radix

Contains the MixedRadixEvaluationDomain for fields that do not …

Docker

What is Docker?

Docker is an open-source platform designed to automate the deployment, scaling, and management of applications. It uses container technology to package applications and their dependencies into lightweight, portable containers. These containers ensure that your application runs consistently regardless of where it’s deployed.

Why use docker?

Docker offers …

Rust notes

crate and trait

Crate
  1. Definition

Rust Coding notes

BTreeMap

std::collections::BTreeMap

BTreeMap is a type from Rust’s standard …

Brainfuck VM instance

This blog is the learning note for Brainfuck VM

GKR Part 2 -example

Using the following example to go through GKR protocol

this blogs follows the example in Spartan 预备知识:GKR with ZK Argument

zero knowledge version of GKR, Hyrax approach.