Questions tagged [snarks]

SNARKS (short non-interactive arguments of knowledge) are space efficient zero-knowledge proof that do not require input from a verifier.

Filter by
Sorted by
Tagged with
0 votes
0 answers
24 views

How to prove that a line belongs to a final hash without knowing/re-hashing all other lines?

Let's suppose : I have a record/database (D) of 754 lines and each line correspond to a SHA256 hash.(Hn) I hash all this record to a final and unique SHA256 hash like this : ...
0 votes
0 answers
25 views

How to add unused public signals in circom

In my usecase, i want to attach a public key to a proof generated by a circom circuit. If my circuit is like follows: ...
1 vote
0 answers
18 views

Generic name for R1CS vs. AIR

In the zero-knowledge cryptography nomenclature, we have multiple representations of arbitrary computation suitable for submission to various proof backends (e.g. Groth16). Two specific examples ...
  • 111
0 votes
0 answers
29 views

How to validate a proving key and verification key are generated correctly in SNARKs?

If Alice does the trusted setup, how does Bob validate the proving key and verification key are well formed, i.e., they are actually a pair derived from the said circuit and same toxic waste? Alice ...
0 votes
0 answers
39 views

Compiling a ZK-SNARK into a Signature of Knowledge by way of FS/BCS transformations

In a sigma protocol, a well known transformation to a signature is Fiat-Shamir, where message derived randomness is mixed into the randomness of the challenge. A natural example is Schnorr signatures. ...
  • 178
0 votes
1 answer
46 views

Privacy-conserving prover delegation in ZKP

If a user cannot generate a proof locally for a large circuit in SNARK in his phone or browser, he can delegate it to a server. However, he has to tell the witness to the server(s), which violates the ...
0 votes
0 answers
20 views

Is it possible to reuse someone else's PLONK reference string?

So PLONK has "universal updateable public parameters". Does that mean that you can copy it from someone else as long as the max degree is sufficient? For example, Dusk Network updates the ...
  • 121
1 vote
0 answers
105 views

Creating a basic SHA256 hasher in Circom

I want to create a SHA256 hasher in Circom so I can validate that a person knows the pre-image of a SHA256 hash without revealing the pre-image. This is my current code but it doesn't work: ...
0 votes
1 answer
163 views

Simplest recursive SNARK working example

I have been doing some research into recursive SNARKs. But I haven't found a working code example such as this one using Zokrates or this one using snarkjs. Anyone knows one such example, say, for ...
2 votes
0 answers
28 views

Question about Ligero protocol

I have a question for those that might be familiar with the ligero protocol: Ligero In this protocol to be using an MPC in the head paradigm: described here. However, in the description of their ...
0 votes
1 answer
44 views

Unsolveability of the quintic on SNARK

All examples I find on SNARKs show polynomials of up to degree 3 or 4 but what about polynomials of degree over 5, what is the mechanism that allow SNARK not to be affected by the unsolvability of the ...
  • 101
1 vote
0 answers
50 views

Verifiable computation examples where verification is much faster than re-execution

Verifiable computation (VC) has been practical since Pinocchio and the field has evolved significantly since. What are some of the best examples today where computation is significantly faster than ...
0 votes
0 answers
25 views

Pinocchio protocol: what if no extractability check

In Pinocchio protocol, prover submits extractability terms below so that counterfeiting fake proof is infeasible under q-PKE assumption. But, I don't understand why it is even necessary. What kind of ...
  • 23
2 votes
1 answer
50 views

Pinocchio protocol: Is this equation meaning polynomial's dot product or multiplication?

In Pinocchio paper, I'm confused by the equation in section 2.2.1. (image below) Is the product of two polynomials $v_0(x)+\sum(cv(x))$ and $w_0(x)+\sum(c_w(x))$ of dot product or just a simple ...
  • 23
1 vote
1 answer
129 views

Why is the SHA256 in libsnark so slow?

When I use the merkle proof example of libsnark, I find that it takes more time to calculate the merkle tree than to calculate the proof. As shown in the log below, it takes 0.04s to calculate a ...
1 vote
0 answers
68 views

Extractor in knowledge-soundness vs extractor in witness-extended emulation

In the knowledge soundness definition page 8 of Groth16, it says: The extractor gets full access to the adversary’s state, including any random coins. My question is why full access? Why we just don't ...
  • 325
0 votes
0 answers
119 views

Can a circuit in a zk-SNARK be reversed-engineered?

The definition of zk-SNARK involves not leaking any information from the prover-verifier interaction, but what about leaking information from the circuit itself? e.g., could there be a circuit to ...
  • 1
0 votes
0 answers
12 views

What do we mean by "Efficient Computing" of a Span Program (SP)?

I'm reading "Quadratic Span Programs and Succinct NIZKs without PCPs" and I'm having trouble understanding the "Efficiency" of a span program. I can see that a span program cannot ...
1 vote
0 answers
186 views

What is required to verify a zk-SNARK?

I am trying to verify a zk-SNARK from a solidity contract offline, in Rust. This is the verifying contract that checks the proof in the solidity side. And this is the transaction that carries the ...
0 votes
1 answer
72 views

zkSNARKs: Doing the setup for the Single Variable Operand Polynomial

I am reading this explanation of zkSnarks written by Maksym Petkus - http://www.petkus.info/papers/WhyAndHowZkSnarkWorks.pdf My question is about Section 4.6.1 Setup construct the respective operand ...
  • 1,873
1 vote
1 answer
69 views

Proof of knowledge of constant discrete log in the bilinear setting

Consider a pairing $\mathbb{e}: \mathbb{G}_1\times \mathbb{G}_2\longrightarrow \mathbb{G}_T$ with generators $g_1$, $g_2$ for $\mathbb{G}_1$, $\mathbb{G}_2$ respectively. The groups $\mathbb{G}_1$, $\...
1 vote
1 answer
138 views

zkSnarks: Ensuring that a variable has a single value across all the operations it is used in

I am reading this explanation of zkSnarks written by Maksym Petkus - http://www.petkus.info/papers/WhyAndHowZkSnarkWorks.pdf In section 4.5, the pdf explains how to represent the following operations $...
  • 1,873
1 vote
1 answer
84 views

zkSnarks: Why does the target polynomial $t(s)$ need to be kept a secret if it's known to both prover & verifier?

I am reading this explanation of zkSnark written by Maksym Petkus - http://www.petkus.info/papers/WhyAndHowZkSnarkWorks.pdf The example used here is that there is a polynomial of degree 3 which the ...
  • 1,873
1 vote
1 answer
137 views

zkSNARKS: If we are already using Homomorphic Encryption/Hiding, why is the shift by $\delta$ required for Zero Knowledge?

I am reading this explanation of zkSnark written by Maksym Petkus - http://www.petkus.info/papers/WhyAndHowZkSnarkWorks.pdf From Section 3.5 Because verifier can extract knowledge about the unknown ...
  • 1,873
1 vote
1 answer
80 views

zkSNARKS: What prevents the prover from chosing a different polynomial than the one he is expected to know

I am reading this explanation of zkSnark written by Maksym Petkus - http://www.petkus.info/papers/WhyAndHowZkSnarkWorks.pdf Here the Prover knows a polynomial of degree 3, 2 of the solutions of the ...
  • 1,873
1 vote
2 answers
118 views

zkSNARKS - unable to understand the usage of polynomial to verify some condition

From Vitalik Buterin's Blogpost - An approximate introduction to how zk-SNARKs are possible From the sub-topic "Comparing a polynomial to itself", I understood till here In other words, any ...
  • 1,873
1 vote
0 answers
41 views

Proving the output of a generic function

Is there any generic construction to prove the correctness of the output of a function? In other words, is there a general way to produce a witness for the statement $y = f(x)$? More formally, let $f: ...
  • 1,461
1 vote
1 answer
161 views

Why Zk-SNARKs are Argument of Knowledge if a Knowledge Extractor exists?

From what I know, proving the existance of a Knowledge Extractor implies perfect soundness. So why in zk-SNARKs (and similar) we talk about Arguments of Knowledge, where the soundness property is only ...
1 vote
0 answers
125 views

Why the Kate Commitment and the Algebraic Group Model is used a lot in zk-SNARKs proving system since 2019?

I am engaged in the research of zk-SNARKs. After I read some papers about zk-SNARKs, I realize the Kate Commitment and the Algebraic Group Model is used a lot since 2019. They are used in Sonic, Plonk,...
2 votes
2 answers
198 views

A field element as the exponent of a group element

The R1CS constraints are expressed over finite fields. Many proofing systems, such as zk-SNARK, use prover keys such as $g^{\alpha^0}, g^{\alpha^1}, ..., g^{\alpha^n}$ where $\alpha$ is a field ...
  • 57
2 votes
0 answers
117 views

It is possible to verify the computation of a hash function without actually proving it in zero knowledge?

Let me first introduce the context: Let's say that we have a hash function evaluation: $$h = H(x, y),$$ where $x$ and $y$ are the public and the private input of the hash function $H$, respectively. ...
  • 573
4 votes
1 answer
173 views

Definition of Circuit Satisfiability In The Context of zk-SNARKs

A standard theorem is that boolean circuit satisfiability is NP-complete (shown in CLRS, for example). I am interested in what these statements formally mean. From CLRS, I can cite that $$\text{...
  • 227
0 votes
0 answers
196 views

How does one construct a SNARK circuit for proving the knowledge of a SHA256 pre-image?

Usually one explains how the R1CS/QAPs and SNARKs work using examples of circuits with multiplication and addition nodes, and constructing polynomials from that is relatively straightforward. SHA-2 ...
4 votes
1 answer
406 views

Which is the relation between Zero-Knowledge Proofs of Knowledge and circuits?

With the risen popularity of Zero-Knowledge Proofs of Knowledge (ZKPoKs) such as Pinocchio, Groth16 and Sonic, to name some ZKPoKs that are popularly known as zk-SNARKs, I got engaged to understand ...
  • 573
1 vote
1 answer
75 views

ZK-SNARK basics: knowing t(x), what prevents the prover from creating random h(x) to forge L, R, and O

After reading a number of ZK-SNARK explainers from here, here, and here, I still don't understand a few things. The setup of the algorithm uses QAP to calculate polynomial P(x) = L(x) * R(x) - O(x), ...
  • 13
2 votes
1 answer
402 views

IS zk-SNARK not suitable for constructing anonymous authentication scheme?

zk-SNARK was a powerful tool for privacy-respecting e-cash. However, recent years, in the literatures about anonymous authentication scheme, such as group signatures, anonymous credential, blind ...
  • 196
5 votes
3 answers
2k views

Why it is said that “zk-SNARKs need a trusted setup” to work?

What is the meaning of a "trusted setup" in this context? It is often said all around that zk-STARKs and Bulletproofs does not require a trusted setup. How do zk-STARKs and Bulletproofs ...
  • 151
5 votes
1 answer
484 views

CRS vs SRS in zk-SNARK

Are Common Reference String (CRS) and Structured Reference String (SRS) is the same in preprocessing phase of zk-SNARK? Is there any difference between them?
1 vote
1 answer
297 views

Hash and (MAC) based signatures using zk-SNARK

I was wondering if we could use any general symmetric key MAC, a collision resistant hash $H$ and zk-SNARK (or any general NIZK scheme) to construct a signature scheme. I have a MAC key $k$, which is ...
1 vote
1 answer
645 views

Construction of R1CS vs QAP

I have been following the medium post of Vitalik, where he shows step by step how to convert program --> Circuit --> R1CS --> QAP. I am aware of the Pinocchio protocol, where they utilize the ...
  • 11
0 votes
1 answer
206 views

Difference between a Polynomial Opening & a Polynomial Commitment

Going through the literature led me to think I understood the difference between these two things, but thinking about I am not actually certain. Could you help me correct my definitions of these two ...
  • 135
2 votes
0 answers
162 views

Efficiently prove the correctness of Paillier encryption in or "outside" a zk-SNARK

I'm working with a zk-SNARK library [1] that allows me to prove the correctness of arbitrary arithmetic circuits, and I now want to use these zk-SNARKs to prove that some Paillier [2] ciphertext $c$ ...
  • 21
4 votes
1 answer
957 views

How to construct a circuit in zkSNARK

I have a few questions about how to use zk-snark. Since the basic logic of using zk-snark is: using a circuit to represent a problem, generate an R1CS from the circuit, transform R1CS to QAP and then ...
  • 65
1 vote
1 answer
223 views

Conditional decryption

Is it possible for one party to encrypt some data and have another party (unknown to the first party) view that original data if a certain condition is met? I cannot find any information about this ...
  • 11
3 votes
1 answer
153 views

libsnark generator toxic waste

I'm looking through the test and examples of libsnark, let's take for example here: https://github.com/christianlundkvist/libsnark-tutorial/blob/master/src/test-gadget.cpp at line 19 there's: ...
  • 177
1 vote
0 answers
153 views

two-to-one hash in libsnark, what is it "exactly"?

I'm reviewing this test which prepares a zero knowledge proof of the preimage of an hash: https://github.com/mariogemoll/libsnark-tutorial/blob/sha256/src/test-knowledge-of-preimage.cpp In my (wrong) ...
  • 177
1 vote
1 answer
77 views

Fixed variable in Groth16

In the paper On the Size of Pairing-based Non-interactive Arguments by Jens Groth, it is always referred in the equations to satisfy that $a_0 = 1$ and the others $a_1, ..., a_m \in \mathbb{F}$. I am ...
  • 388
4 votes
2 answers
194 views

Can zksnark prove DLP?

Can one use zksnark to prove the knowledge of a discrete logarithm? In another word, can zksnark (R1CS) encode exponentiation?
  • 83
9 votes
1 answer
844 views

Why invent new hash functions for zero-knowledge proofs?

Recently, new hash functions were invented. Their primary purpose is serving the needs of zero-knowledge proof systems. I'm talking about Poseidon-256, Starkad-256, etc. See the paper. What is the ...
1 vote
1 answer
362 views

Examples of flattening code to create an R1CS

When preparing logic for use in a zkSnark, one needs to first "flatten" the code so it can be written as a series of constraints. I'm finding it hard to find examples of doing this. For instance, how ...
  • 223