-
Notifications
You must be signed in to change notification settings - Fork 14
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Circuits with different tree sizes for the trusted setup ceremony
- Loading branch information
1 parent
f97118a
commit a206acb
Showing
13 changed files
with
136 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
21 changes: 21 additions & 0 deletions
21
circuits/credentialAtomicQueryV3OnChain-16-16-64-16-16.circom
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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
21
circuits/credentialAtomicQueryV3OnChain-16-16-64-16-32.circom
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |