19 questions
0
votes
0
answers
16
views
Getting error while trying to generate wtns file in ZKP
Actullay I was trying to generate a witness file in a zero knowledge project. Here is my circom code
pragma circom 2.0.0;
include "./node_modules/circomlib/circuits/poseidon.circom";
...
0
votes
0
answers
8
views
The issue of public/private signals when generating zero-knowledge proofs with Circom
Circom is a circuit language capable of generating zero-knowledge proofs, which involves some input signals and output signals. I have a question: if all the input and output signals during the ...
1
vote
2
answers
200
views
Circom: Syntax Error When Compiling Simple Circuit (Expecting 'EOF', 'function', 'IDENTIFIER')
I am following this Circom tutorial to compile a simple circuit. Here is my code:
pragma circom 2.0.0;
template Multiplier2() {
signal input a;
signal input b;
signal output c;
c <== a*b;
}
...
0
votes
1
answer
178
views
How to use ark-circom to provide an array of input signals?
I need to provide an array of input signals using rust based crate ark-circom. Throughout the documentation there are examples with simple input variables only. Neither did I find any resource online ...
1
vote
0
answers
44
views
Why Does Iden3 Use 253-bit Slots for Claims
I'm exploring the Iden3 protocol, and I noticed that Iden3 designs its claim slots to be 253 bits in size, rather than the more common 256-bit size. I'm curious about the specific reasoning behind ...
1
vote
0
answers
73
views
Implementing grpc in gnark v0.8.1, how to convert Proof, Verification Key & Public Witness to go-native type?
In gnark v0.8.1,
We first need to convert those 3 to go-native i.e. we convert them to []byte.
I tried implementing Serialize() and DeSerialize(), but I am facing errors.
Issue: groth16.Proof is an ...
1
vote
0
answers
154
views
How to implement a >=0 check in gnark for unsigned integers when a can be any integer (negative or positive) in the clear?
I have the following block of code in golang in the clear.
for i := 0; i < 10; i++ {
if val[i]>=0{
postcheck[i] = val[i]
bitpostcheck[i] = 1
} else {
postcheck[...
1
vote
2
answers
574
views
Converting felt252 to ContractAddress in Cairo
How do I create a ContractAddress from a hex value like 0x06D98dC7ea54CF77eeD141F423f6007Dd61fbd2b6bD429Facdf5d4803353063f?
let addr : ContractAddress = ...
4
votes
2
answers
405
views
Number of wires in a ZKP Circom circuit is greater than expected
I compile this simple circuit:
pragma circom 2.0.0;
template Multiplier2() {
signal input a;
signal input b;
signal output c;
c <== a*b;
}
component main = Multiplier2();
and ...
1
vote
1
answer
57
views
Zero-knowledge sequencing of messages
I have multiple servers (for redundancy) sending data to clients. The clients need to process these messages in sequence and ignore duplicates.
We use external information to determine a special ...
3
votes
1
answer
629
views
Input string of variable length in circom?
I would like to show that a user knows a preimage to a sha256 hash in circom. The preimage can be of any length, but realistically between 100-700 bytes. I tried code:
template ArbitraryLengthSha256 ()...
1
vote
1
answer
157
views
How to Convert type byte to Kyber.Scalar in Go
I am using the kyber.scalar method in Go. I would like to send my data(kyber.scalar) with socket programing and can read other program. When i read, i can't turn back into kyber.scalar type again.
...
3
votes
1
answer
202
views
ZKP, Gnark: Does AssertIsLessOrEqual work with negative numbers?
Does gnarks (ZeroKnowledgeProof framework) AssertIsLessOrEqual work with negative numbers and ecc.BN254 curve?
https://pkg.go.dev/github.com/consensys/[email protected]/frontend
It seems most computations ...
0
votes
0
answers
62
views
Asymmetric Encryption: without knowing the signer's public key owner
I am working for a big consulting firm and we have a platform that exchanges data with couple of big companies. We are trying to enhance then platform on which enterprises will be able to deposit data....
1
vote
2
answers
703
views
How to run a loop with unknown number of iterations in Circom?
I have the following circuit in Circom cicuit compiler:
pragma circom 2.0.0;
template MAIN() {
signal len;
len <== 32;
for (k = 0; k < maplen; k++) {
// do something
}...
2
votes
1
answer
1k
views
How to write a constraint that depends on a condition in Circom?
I have code of the following form in Circom circuit compiler
template DecodeUint(len) {
signal input x;
signal input pos;
signal output value;
signal output nextpos;
component ...
2
votes
1
answer
426
views
How to use & (AND) operator in a signal in Circom
I'm trying to use & operator on a signal and get another signal in Circom circuit compiler language like so:
pragma circom 2.0.0;
template MAIN() {
signal input a;
signal output x;
...
4
votes
1
answer
1k
views
How to access array element with an "Unknown" index in Circom?
I have the following Circom (circuit compiler language) program:
pragma circom 2.0.0;
template MAIN() {
signal input array[2512];
signal output d;
signal v;
v <== 168;
d <...
1
vote
1
answer
372
views
How to pass function argument by reference in Circom?
How to pass function argument by reference in the circom circuit language?
I'm trying to do the following:
pragma circom 2.0.0;
function increment(foo) {
foo++;
}
template MyTemplate() {
...