Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Circuits with different tree sizes for the trusted setup ceremony #137

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 16 additions & 0 deletions circuits/authV3-16-32.circom
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
pragma circom 2.1.1;

include "auth/authV3.circom";

/*
* The identity authorization circuit.
* User ownership of the identity verified by signed challenge.
* Auth claim should be in the user state and not revoked.
* User state should be genesis or added to the global state tree (available in the smart contract).
* The state is verified out of circuits by a verifier.
* public signals:
- userID
- challenge
- gistRoot
*/
component main {public [challenge, gistRoot]} = AuthV3(16, 32); // IdOwnershipLevels, onChainLevels
16 changes: 16 additions & 0 deletions circuits/authV3-8-16.circom
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
pragma circom 2.1.1;

include "auth/authV3.circom";

/*
* The identity authorization circuit.
* User ownership of the identity verified by signed challenge.
* Auth claim should be in the user state and not revoked.
* User state should be genesis or added to the global state tree (available in the smart contract).
* The state is verified out of circuits by a verifier.
* public signals:
- userID
- challenge
- gistRoot
*/
component main {public [challenge, gistRoot]} = AuthV3(8, 16); // IdOwnershipLevels, onChainLevels
16 changes: 16 additions & 0 deletions circuits/authV3-8-32.circom
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
pragma circom 2.1.1;

include "auth/authV3.circom";

/*
* The identity authorization circuit.
* User ownership of the identity verified by signed challenge.
* Auth claim should be in the user state and not revoked.
* User state should be genesis or added to the global state tree (available in the smart contract).
* The state is verified out of circuits by a verifier.
* public signals:
- userID
- challenge
- gistRoot
*/
component main {public [challenge, gistRoot]} = AuthV3(8, 32); // IdOwnershipLevels, onChainLevels
2 changes: 1 addition & 1 deletion circuits/authV3.circom
Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,4 @@ include "auth/authV3.circom";
- challenge
- gistRoot
*/
component main {public [challenge, gistRoot]} = AuthV3(40, 64);
component main {public [challenge, gistRoot]} = AuthV3(40, 64); // IdOwnershipLevels, onChainLevels
27 changes: 27 additions & 0 deletions circuits/credentialAtomicQueryV3-16-16-64.circom
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
pragma circom 2.1.1;

include "offchain/credentialAtomicQueryV3OffChain.circom";

/*
public output signals:
userID - user profile id
merklized - `1` if claim is merklized
issuerState - equals to issuerAuthState for sig, and to issuerClaimIdenState for mtp
nullifier - sybil resistant user identifier for session id
linkID - linked proof identifier
*/
component main{public [requestID,
issuerID,
issuerClaimNonRevState,
claimSchema,
slotIndex,
claimPathKey,
operator,
value,
valueArraySize,
timestamp,
isRevocationChecked,
proofType,
verifierID,
nullifierSessionID
]} = credentialAtomicQueryV3OffChain(16, 16, 64); // issuerLevels, claimLevels, maxValueArraySize
2 changes: 1 addition & 1 deletion circuits/credentialAtomicQueryV3.circom
Original file line number Diff line number Diff line change
Expand Up @@ -24,4 +24,4 @@ component main{public [requestID,
proofType,
verifierID,
nullifierSessionID
]} = credentialAtomicQueryV3OffChain(40, 32, 64);
]} = credentialAtomicQueryV3OffChain(40, 32, 64); // issuerLevels, claimLevels, maxValueArraySize
21 changes: 21 additions & 0 deletions circuits/credentialAtomicQueryV3OnChain-16-16-64-16-16.circom
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
pragma circom 2.1.1;

include "./onchain/credentialAtomicQueryV3OnChain.circom";

/*
public output signals:
userID - user profile id
merklized - `1` if claim is merklized
issuerState - equals to issuerAuthState for sig, and to issuerClaimIdenState for mtp
nullifier - sybil resistant user identifier for session id
linkID - linked proof identifier
*/
component main{public [requestID,
issuerID,
issuerClaimNonRevState,
timestamp,
challenge,
gistRoot,
proofType,
isBJJAuthEnabled
]} = credentialAtomicQueryV3OnChain(16, 16, 64, 16, 16); // issuerLevels, claimLevels, maxValueArraySize, idOwnershipLevels, onChainLevels
21 changes: 21 additions & 0 deletions circuits/credentialAtomicQueryV3OnChain-16-16-64-16-32.circom
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
pragma circom 2.1.1;

include "./onchain/credentialAtomicQueryV3OnChain.circom";

/*
public output signals:
userID - user profile id
merklized - `1` if claim is merklized
issuerState - equals to issuerAuthState for sig, and to issuerClaimIdenState for mtp
nullifier - sybil resistant user identifier for session id
linkID - linked proof identifier
*/
component main{public [requestID,
issuerID,
issuerClaimNonRevState,
timestamp,
challenge,
gistRoot,
proofType,
isBJJAuthEnabled
]} = credentialAtomicQueryV3OnChain(16, 16, 64, 16, 32); // issuerLevels, claimLevels, maxValueArraySize, idOwnershipLevels, onChainLevels
2 changes: 1 addition & 1 deletion circuits/credentialAtomicQueryV3OnChain.circom
Original file line number Diff line number Diff line change
Expand Up @@ -18,4 +18,4 @@ component main{public [requestID,
gistRoot,
proofType,
isBJJAuthEnabled
]} = credentialAtomicQueryV3OnChain(40, 32, 64, 40, 64);
]} = credentialAtomicQueryV3OnChain(40, 32, 64, 40, 64); // issuerLevels, claimLevels, maxValueArraySize, idOwnershipLevels, onChainLevels
5 changes: 5 additions & 0 deletions circuits/linkedMultiQuery10-16-64.circom
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
pragma circom 2.1.1;

include "linked/multiQuery.circom";

component main = LinkedMultiQuery(10, 16, 64); // N, claimLevels, maxValueArraySize
2 changes: 1 addition & 1 deletion circuits/linkedMultiQuery10.circom
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@ pragma circom 2.1.1;

include "linked/multiQuery.circom";

component main = LinkedMultiQuery(10, 32, 64); // 175331 constraints
component main = LinkedMultiQuery(10, 32, 64); // N, claimLevels, maxValueArraySize
5 changes: 5 additions & 0 deletions circuits/linkedMultiQuery3-16-64.circom
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
pragma circom 2.1.1;

include "linked/multiQuery.circom";

component main = LinkedMultiQuery(3, 16, 64); // N, claimLevels, maxValueArraySize
5 changes: 5 additions & 0 deletions circuits/linkedMultiQuery3.circom
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
pragma circom 2.1.1;

include "linked/multiQuery.circom";

component main = LinkedMultiQuery(3, 32, 64); // N, claimLevels, maxValueArraySize
Loading