-
Notifications
You must be signed in to change notification settings - Fork 0
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 #9 from Portkey-Wallet/refactor/remove-old-circuits
Refactor: remove old circuits
- Loading branch information
Showing
66 changed files
with
359 additions
and
1,844 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
Binary file not shown.
This file was deleted.
Oops, something went wrong.
2 changes: 1 addition & 1 deletion
2
.../guardian-identifier-hash-poseidon.circom → circuits/helpers/idhash_poseidon.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
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,31 @@ | ||
pragma circom 2.0.0; | ||
include "./sha256.circom"; | ||
include "./utils.circom"; | ||
|
||
template IdHashSha256(sub_bytes, salt_bytes){ | ||
// inputs | ||
signal input sub[sub_bytes]; | ||
signal input sub_len; | ||
signal input salt[salt_bytes]; | ||
signal input salt_len; | ||
signal output out[32]; | ||
|
||
// Step 1: Hash the sub value | ||
component subHasher = Sha256PadAndHash(sub_bytes); | ||
subHasher.in <== sub; | ||
subHasher.in_len <== sub_len; | ||
|
||
// Step 2: Combine the hash with the salt | ||
var hash2_bytes = salt_bytes + 32; | ||
|
||
component concatenated = CombineBytes(32, salt_bytes); | ||
concatenated.first <== subHasher.out; | ||
concatenated.second <== salt; | ||
|
||
// Step 3: Hash the concatenated value | ||
component idHasher = Sha256PadAndHash(hash2_bytes); | ||
|
||
idHasher.in <== concatenated.out; | ||
idHasher.in_len <== hash2_bytes; | ||
out <== idHasher.out; | ||
} |
This file was deleted.
Oops, something went wrong.
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 was deleted.
Oops, something went wrong.
Oops, something went wrong.