-
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.
Merge pull request #110 from iden3/feature/optimization-after-archive
Nullifier & ProofType changes. Archive old circuits. Optimizations
- Loading branch information
Showing
128 changed files
with
1,188 additions
and
1,209 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
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
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
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
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
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
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 |
---|---|---|
@@ -1,26 +1,30 @@ | ||
pragma circom 2.1.1; | ||
|
||
include "../../../node_modules/circomlib/circuits/comparators.circom"; | ||
include "../../../node_modules/circomlib/circuits/mux2.circom"; | ||
include "../../../node_modules/circomlib/circuits/gates.circom"; | ||
include "../../../node_modules/circomlib/circuits/mux1.circom"; | ||
include "../../../node_modules/circomlib/circuits/poseidon.circom"; | ||
|
||
template Nullify() { | ||
signal input genesisID; | ||
signal input claimSubjectProfileNonce; | ||
signal input claimSchema; | ||
signal input fieldValue; | ||
signal input verifierID; | ||
signal input crs; | ||
signal input verifierSessionID; | ||
|
||
signal output nullifier; | ||
|
||
signal isZeroNonce <== IsZero()(claimSubjectProfileNonce); | ||
signal isZeroVerifierID <== IsZero()(verifierID); | ||
signal isZeroVerifierSessionID <== IsZero()(verifierSessionID); | ||
|
||
signal hash <== Poseidon(6)([genesisID, claimSubjectProfileNonce, claimSchema, fieldValue, verifierID, crs]); | ||
signal hash <== Poseidon(5)([genesisID, claimSubjectProfileNonce, claimSchema, verifierID, verifierSessionID]); | ||
|
||
nullifier <== Mux2()( | ||
[hash, 0, 0, 0], | ||
[isZeroNonce, isZeroVerifierID] | ||
signal isZero1 <== OR()(isZeroNonce, isZeroVerifierID); | ||
signal isZero2 <== OR()(isZero1, isZeroVerifierSessionID); | ||
|
||
nullifier <== Mux1()( | ||
[hash, 0], | ||
isZero2 | ||
); | ||
} |
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
Oops, something went wrong.