Questions tagged [zero-knowledge]
The zero-knowledge tag has no usage guidance.
58
questions
0
votes
0
answers
9
views
Secret Voting Without Commit/Reveal
I am building a voting contract where people (who hold a certain ERC20 token) can vote to determine a binary outcome. The votes should be weighted with the amount of ERC20 tokens that the voters ...
1
vote
0
answers
38
views
What does it mean to run a Polygon zkNode without the zkProver?
I was going through the "Setup Local zkNode" section in the Polygon zkEVM Developer Guides and came across the following line: If you are unable to meet the Prover requirements, you can ...
1
vote
0
answers
46
views
How to prevent replay attacks on ZK Proof Transactions?
Alice wants to prove a statement (let's say, she has a secret value x such that x * 2 = 10) to Bob without revealing x).
Alice generates a proof using the ZK-Snark protocol.
const { proof, ...
1
vote
1
answer
125
views
Why do we use circom circuit in zero knowledge?
As a smart contract developer, I am unable to understand why do we use circom circuits for zero knowledge proofs? All the examples like A*B = C can be done in javascript and solidity. We can also ...
1
vote
1
answer
466
views
How to implement Poseidon hash function into a smart contract
I am building a Merkle tree inside a smart contract, and I want to use the Poseidon hash function to later prove that an element belongs to the tree through a ZK proof. The problem is that I cannot ...
1
vote
1
answer
48
views
Why TornadoCash smart contract calls address = 8?
I've trying to understand how zkSNARK works in TornadoCash. I faced with the tricky thing in the code which I cannot understand. I researched the code of this smart contract at address: https://...
0
votes
0
answers
33
views
how to use snarkjs for NEAR protocol. how to make ZK prover/verify function in NEAR protocol with typescript?
i wanna make ZK-rollup whose L1 layer will be NEAR protocol.
what's the way to make Verifier function in Typescript of NEAR protocol ?
This function is not working:-
import { NearBindgen, view } from &...
5
votes
2
answers
123
views
zK learning, don't know where to start
I am thinking of learning zK (don't know where to start).
If someone with experience could point to the best resources to learn starting from 0, that would be awesome.
It exists already advanced ...
0
votes
0
answers
60
views
Can anyone point me to any zk-based application's codebase that features fuzz-tests for its core smart contract?
I'm working on a zk-based privacy application and we've started on the process of fuzz-testing our core (zk-snark based) smart contracts.
We started our approach with Echidna (utilizing etheno for E2E ...
2
votes
0
answers
64
views
Confidential Transactions on Polygon Network
I can see that Polygon Network has integrated zero knowledge proof based rollup technology using Hermez Network. I can also understand that Polygon is working on zkEVM based prover and verifier system....
1
vote
1
answer
439
views
What is the best lib to use for zero knowledge application?
This is a simple smart contract I found in the internet for a zero knowledge applications.
But there is no libs imported.
What is the best lib to use in this situation?
Can openzeppelin solve this ...
2
votes
0
answers
51
views
Decrypting a message using smart contract
Is this possible to send a message from address A to address B on Ethereum (or another type of blockchain), and it is so that address B can't open the message, unless a smart contract permits it ...
5
votes
0
answers
107
views
How the mimc bug from circomlib was safely exploited in practice on Tornado Cash?
Several years ago, there was an unenforced constraint on verification in the cirmcomlib library : a tool for building projects using ZsNarks. The error allowed to forge cryptographic nullifiers/proofs ...
1
vote
2
answers
442
views
Smart Contract with private data
I'm looking for a way to have private data in an Ethereum smart contract. I explored the ZK space, could work on some scenarios but not totally private. I wanted to ask if you know new tools, sdks etc ...
0
votes
1
answer
221
views
How to compute witness for Merkle tree proof using Zokrates?
I am trying to learn how Zero Knowledge proof for Merkle tree verification work. Therefore I am using this example from Zokrates:
import "hashes/pedersen/512bit" as hash;
import "hashes/...
12
votes
7
answers
3k
views
Does giving enough zero knowledge proofs give knowledge?
Let's say I want to use a zero-knowledge proof to prove that I am older than 18 to vote, without revealing my age.
But then, let's say I give another one to prove that I can 'drink', and am older than ...
1
vote
1
answer
70
views
Hide the value of a variable until a condition is fulfilled
Let's say i have a variable, whose value is set by a user calling a certain method
string commitment;
function setValue(x) public
{
commitment = x;
}
if I want to hide the value of ...
1
vote
0
answers
29
views
Understanding data availability for zk rollups
My understanding is that if a zkrollup operator suddenly ceases operation, you have to sync the rollup’s history from genesis to get the current state. In other words, if the transaction data has been ...
2
votes
1
answer
91
views
What is the current state of zkEVM development?
What is the current state of zkEVM? That is - a general-purpose (not specialized like Loopring or Immutable), EVM-compatible, Solidity-compatible zk-rollup layer 2. To my knowledge they are still ...
1
vote
0
answers
151
views
How to integrate zokrates proof into ethereum transactions?
I need some help with applying a Zokrates zero knowledge proof into ethereum transactions
I am using Goerli testnet and i have a full node that is fully synced to the ethereum blockchain.
I have ...
1
vote
1
answer
730
views
Create zkProof onchain
Is it possible to create ZK-SNARKS proofs and verify them, all onchain, with solidity, without reveling the witness?
The proving and verifying keys could be created offchain, but these two would have ...
0
votes
1
answer
646
views
Signing a transaction without exposing the private key to the user (or anyone else)
I would like to have a system that will only sign a transaction if x condition is met. It would need to be as trustless as possible; especially not trusting the user.
Optimally, the system would be a '...
0
votes
1
answer
176
views
Zokrates code not compiling in Remix
I am trying to work on Zokrates in Remix IDE
I am trying this code :
import "hashes/sha3/512bit" as sha256packed
def main(private field value, private field before, field valueHash, field ...
1
vote
0
answers
47
views
What part of zk blockchain is private?
What part of a ZK blockchain is private?
Let's say for example starknet or zksync, both of them use ZK technology.
If I execute a transaction and I send a native coin (none of them have it yet) ...
3
votes
1
answer
208
views
What data does Layer 2 Rollups commit to Layer 1?
Trying to understand what happens with rollups and other scaling solutions. What is confusing to me is that when reading about rollups I see that what gets updated is the Merkle root of the state of ...
2
votes
0
answers
138
views
zk-SNARKs: High level language options?
I would like to implement an idea that requires me to use a zero knowledge proof. What options do I currently have, assuming I want (need, due to lacking cryptography knowledge) to use a high level ...
3
votes
2
answers
205
views
Is it possible to prove ETH balance without revealing the holding address?
I want to prove that I own an amount of ETH without revealing the address which holds it. I don't know if this is possible at all, whether with zk-snarks technology or any other way. I've found ...
2
votes
0
answers
169
views
How does zero knowledge proof prevent frontrunning
I have learned about that zkp can hide the information of orders, e.g. the type and the number of assets, but it's still confusing. Is there any paper or project about using zero-knowledge proof to ...
2
votes
0
answers
22
views
Can you tell how much money a user sent and sender/reciever when it comes to Zero Knowledge Proofs? [duplicate]
As I understand Zero-Knowledge Proofs:
You can tell someone sent a certain amount of money
You can tell someone received a certain amount of money
But you can't cryptographically tie the two together....
0
votes
1
answer
102
views
What is a ZKRollup? And how does it work in scaling a DAPP?
I have tried looking into existing solutions such as ZKSync. I couldn't understand why you would rewrite your smart contracts in a different language - Zinc (as opposed to Solidity/Vyper).
2
votes
1
answer
40
views
“Universal Proof of Work” with SNARKs?
If SNARKs are able to prove computations of arbitrary complexity and difficulty were executed correctly, would it be possible to use them to create a Proof of Work system where ANY computation can be ...
1
vote
0
answers
270
views
How to compute pairing in a smart contract
I am working on the elliptic curve and pairing stuff in Ethereum smart contract. How can I compute pairing such e(p1,p2)?
I know that we have a pre-compile pairing check in Ethereum client which is ...
1
vote
1
answer
75
views
AZTEC validateProof and validateProofByHash sender / signer addresses
The AZTEC Crypto Engine lets you validate proofs and cache them for future re-use, since they are fairly expensive (around 800,000 gas for a 4-note join-split proof before Istanbul, and now about 200,...
0
votes
2
answers
83
views
Why Should I use Ethereum in an Online-Election(Vote) System based on ZKP(Zero-Knowledge Proof)?
I am an undergraduate student studying Ethereum in South Korea.
Currently, I am developing an online election system that can be applied.
At first, I came up with this idea:
The system has an ETC ...
2
votes
0
answers
133
views
Why is NOT a protocol with a Turing-complete smart contract language able to use SNARKs to prove the validity of the chain?
In the following article (Link to the article: https://medium.com/nearprotocol/unsolved-problems-in-blockchain-sharding-2327d6517f43), the challenges of zk-SNARKs are mentioned as
follows:
The ...
1
vote
0
answers
43
views
How can I combine Quorum and Zero Knowledge Range Proofs
How can I combine Quorum and Zero Knowledge Range Proofs
I have 20 years of experience at java JEE coding, and 10 years in devops as well,
but no experience with blockchains, or the Go language.
I ...
2
votes
2
answers
1k
views
Can Ethereum verify zk-SNARK proofs?
I am wondering if the Ethereum Virtual Machine can verify a proof generated from a certain statement? Are there any precompiled contracts for verifying a proof?
2
votes
1
answer
270
views
Javascript library to use zkSnark circuit
I would like to generate the proofs for zkSnarks on client side and therefore would need a library in javascript that helps to read a circuit and generate proofs. I found one combination here which ...
3
votes
0
answers
183
views
Zero Knowledge Range Proofs
I am new to the world of Zero Knowledge Range Proofs. I read the following on GitHub: https://github.com/ing-bank/zkproofs
The Zero Knowledge Range Proof allows the blockchain network to validate ...
3
votes
1
answer
66
views
What mathematical concepts do I need to master in order to understand the Aztec Procotol?
What mathematical concepts do I need to master in order to understand how privacy in the Aztec Protocol works?
When I look at the white paper, I have no idea what is going on; however, I am confident ...
4
votes
1
answer
308
views
Zero Knowledge v Multi Party Computation (MPC)
I am struggling with understanding the difference between the two. From what I am putting together, they have different adversarial models, MPC adds the condition of collusion between parties i.e. ...
0
votes
1
answer
1k
views
crypto-signing in a smart contract -> verify the identity of a smart contract
my Question in short is:
-> is it possible to digitally sign some data by a smart contract (e.g. with a secret key of the contract) and thus confirm that it was exactly this smart contract, who ...
42
votes
4
answers
13k
views
zk-SNARKs vs. Zk-STARKs vs. BulletProofs? (Updated)
zk-SNARKs, Zk-STARKs and BulletProofs are three major zero knowledge proofs to provide privacy for the blockchain technology.
If we can compare them,
(1) Bulletproofs and Zk-STARKs require no ...
0
votes
1
answer
119
views
Meaning of "fungibility" in "Zerocash (Zcash)"? [closed]
According to the following article, Zcash provide a high level of "fungibility". compared to other crypto-currencies.
Article link: https://www.investopedia.com/terms/z/zcash.asp
fungibility ...
2
votes
1
answer
788
views
Zero Trust vs Zero Knowledge -- Difference [closed]
What is the difference between Zero Trust and Zero Knowledge?
4
votes
2
answers
490
views
Is "Pinocchio zk-SNARK" a specific type of zk-SNARK?
Is "Pinocchio zk-SNARK" a specific type of "zk-SNARK"? And if yes, what is difference?
3
votes
1
answer
3k
views
An example on using "zk-SNARK" in "smart contract"?
I read this article: https://media.consensys.net/introduction-to-zksnarks-with-examples-3283b554fc3b
However, it's not clear to me a function such as zksnarkverify has been already implemented in ...
6
votes
2
answers
2k
views
Updated: Is it possible to hide the sender or receiver of transactions by "zk-SNARK" or "Bulletproofs"?
To support the user privacy, is it possible to hide the sender address or receiver address of transactions by "zk-SNARK" or "Bulletproofs" ? Or we’ll be able only to hide the value that is mapped to ...
4
votes
3
answers
2k
views
Is there a decentralized zk-SNARK (zero-knowledge Succinct Non-Interactive ARgument of Knowledge)?
Normally, in zk-SNARK, we need to generate two public keys: one for prover and one for verifier. However, the input parameter of this generator algorithm must be secret, meaning that it must be hidden ...
3
votes
2
answers
878
views
zk-SNARK use cases in blockchain (except payment)?
Is there other examples of using zk-SNARK for supporting "private transactions" except Zerocoin or Zchach ? (For example, is it possible to use zk-SNARK for health data ? or any other use cases in ...