-
Notifications
You must be signed in to change notification settings - Fork 16
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Feat/circuits update (#10) * Update the zk-email version * Update groth16 verifier * Modify the proving key path * Update the proving key in circuits README * feat: add permitted wallets (#11) * Feat/docs (#12) * Reflect the latest changes on the main branch to the audit branch. (#7) * Change modal server name. * Add test to invitation code. * Update zk-regex versions. * update readme. * Update modal server version. * Fix typo. * Fix contract unit tests. * Fix Dockerfile in prover. * feat: Add Relayer (#3) * Add ECDSAOwnedDKIMRegistry. * Update dev-setup.ts that generates Groth16Verifier.sol. * Implement verifyEmailProof function. * [WIP] Add implementations regarding authEmail function till step 7. * Add isValidSignature function. * Add EmailAccountRecovery. * Move usedNullifiers from Verifier to EmailAuth. * Tweak variable name. * Update correct timestamp validation condition. * Update isValidSignature function. * Add unit test functions. * Add testAuthEmail. * Remove comment. * Delete unused mock directory. * Add testIsValidSignature. * Format solidity files. * Add deploy script. * Modify ECSDSAOwnedDKIMRegistry to be independent of the chain id. * Refactor EmailAuth contracts. * Refactor EmailAccountRecovery. * Add simple wallet to be recovered with emails. * Fix EmailAuth.t.sol. * Add DeploymentHelper. * Add create SimpleWallet instance in setUp function. * Add test EmailAccountRecovery. * Fix EmailAccountRecovery.t.sol. * Fix parameter decoding in recoverWallet method. * Rename recoverWallet to processRecovery and add completeRecovery. * Add recipient's email address commitment to the circuit. * Add script to generate circuit inputs. * Add prover. * Add relayer. * Update utils and relayer. * Fix database. * Remove unused code. * Update database and web_server * Fix config.rs * Add ECDSAOwnedDKIMRegistry. * Implement verifyEmailProof function. * [WIP] Add implementations regarding authEmail function till step 7. * Add isValidSignature function. * Add EmailAccountRecovery. * Move usedNullifiers from Verifier to EmailAuth. * Tweak variable name. * Update correct timestamp validation condition. * Update isValidSignature function. * Add unit test functions. * Add testAuthEmail. * Remove comment. * Delete unused mock directory. * Add testIsValidSignature. * Format solidity files. * Add deploy script. * Modify ECSDSAOwnedDKIMRegistry to be independent of the chain id. * Refactor EmailAuth contracts. * Refactor EmailAccountRecovery. * Add simple wallet to be recovered with emails. * Fix EmailAuth.t.sol. * Add DeploymentHelper. * Add create SimpleWallet instance in setUp function. * Add test EmailAccountRecovery. * Fix EmailAccountRecovery.t.sol. * Fix parameter decoding in recoverWallet method. * Rename recoverWallet to processRecovery and add completeRecovery. * Add recipient's email address commitment to the circuit. * Add relayer. * Update deployment helper. * Fix unit testing * Create Integration.t.sol. * Add integration test for acceptance. * Add integration test for recovery. * Update README.md * Call handleAcceptance and handleRecovery. * Add require conditions and check the simpleWallet owner change. * Add blank line. * Fix database. * Remove unused code. * Update database and web_server * Fix config.rs * feat: relayer init * feat: basic changes * feat: changes * feat: partial accept api * feat: rebase * feat: fixes * feat: finish accept api before handling email * feat: handle email stub * feat: clean up * feat: add all apis * chore: refactor * feat: add email templates * feat: handle email * Fix contract deployment scripts. * Add github workflow. * Add ETHERSCAN_API_KEY to env.sample. * Add unit test functions. * Add deploy script. * Refactor EmailAuth contracts. * feat: rebase * feat: fixes * Fix modal server name. * feat: fixes * feat: fixes * Fix typo of EmailAccountRecoery.t.sol. * feat: complete flow * feat: fixes and refactoring * chore: update .env.example * Update utils package. * feat: fixes * feat: add k8s manifests (cherry picked from commit 6f154f5) * chore: fix Dockerfile * Update the version of zk-regex-utils --------- Co-authored-by: wshino <wshinohara@gmail.com> Co-authored-by: SoraSuegami <suegamisora@gmail.com> * Update OpenZeppelin libraries (#5) * Update @zk-email/contracts ^4.1.0 -> ^6.0.0. Update @OpenZeppelin ^4.9.2 -> ^5.0.0. * Regenerate verifier contract. * Update integration test contract with regenerate eml files. * Remove uniswap dependencies. * Remove account abstraction dependency. * Update the link for build_integration in google drive. * forge install: forge-std v1.8.1 * Re-generate yarn.lock. * chore: update k8s manifests (cherry picked from commit 72783078e6170f93665e5b6012d7ddd765fb44f9) * Fix DeploySimpleWallet script to add initial owner. * fix DeploySimpleWallet about init owner. * Fix Groth16Verifier. * Feat/unit testing for contracts (#6) * Add configureTimelockPeriod to SimpleWallet. --------- Co-authored-by: Aditya Bisht <44467788+Bisht13@users.noreply.github.com> Co-authored-by: wshino <wshinohara@gmail.com> Co-authored-by: Aditya Bisht <adityabisht64@gmail.com> * Add more docs. * Add Security Notes. * Add Application. * Add UX of the account recovery. * Fix mistakes in README * small modifications in README * small modification to README * Add remaining subsections. * Write Integration to your Wallet. * Fix mistakes. * Add fronend description. * Update specs. * Complete the contracts spec. * Add README to relayer. --------- Co-authored-by: Aditya Bisht <44467788+Bisht13@users.noreply.github.com> Co-authored-by: wshino <wshinohara@gmail.com> Co-authored-by: Aditya Bisht <adityabisht64@gmail.com> --------- Co-authored-by: Aditya Bisht <44467788+Bisht13@users.noreply.github.com> Co-authored-by: wshino <wshinohara@gmail.com> Co-authored-by: Aditya Bisht <adityabisht64@gmail.com>
- Loading branch information
1 parent
514df0c
commit 92a86f5
Showing
25 changed files
with
803 additions
and
681 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
pragma circom 2.1.5; | ||
pragma circom 2.1.6; | ||
|
||
include "./email_auth_template.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 |
---|---|---|
@@ -1,4 +1,4 @@ | ||
pragma circom 2.1.5; | ||
pragma circom 2.1.6; | ||
|
||
include "circomlib/circuits/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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,41 +1,19 @@ | ||
|
||
pragma circom 2.1.5; | ||
pragma circom 2.1.6; | ||
|
||
include "circomlib/circuits/bitify.circom"; | ||
include "circomlib/circuits/comparators.circom"; | ||
include "circomlib/circuits/poseidon.circom"; | ||
include "./constants.circom"; | ||
include "@zk-email/circuits/utils/bytes.circom"; | ||
|
||
function compute_ints_size(bytes_size) { | ||
var pack_bytes = pack_bytes_const(); | ||
var remain = bytes_size % pack_bytes; | ||
var num_chunk = (bytes_size - remain) / pack_bytes; | ||
if(remain>0) { | ||
num_chunk += 1; | ||
} | ||
return num_chunk; | ||
return computeIntChunkLength(bytes_size); | ||
} | ||
|
||
template Bytes2Ints(bytes_size) { | ||
var num_chunk = compute_ints_size(bytes_size); | ||
signal input bytes[bytes_size]; | ||
signal output ints[num_chunk]; | ||
|
||
var pack_bytes = pack_bytes_const(); | ||
signal ints_sums[num_chunk][pack_bytes]; | ||
for(var i=0; i<num_chunk; i++) { | ||
for(var j=0; j<pack_bytes; j++) { | ||
var idx = pack_bytes*i+j; | ||
if(idx>=bytes_size) { | ||
ints_sums[i][j] <== ints_sums[i][j-1]; | ||
} else if (j==0){ | ||
ints_sums[i][j] <== bytes[idx]; | ||
} else { | ||
ints_sums[i][j] <== ints_sums[i][j-1] + (1<<(8*j)) * bytes[idx]; | ||
} | ||
} | ||
} | ||
for(var i=0; i<num_chunk; i++) { | ||
ints[i] <== ints_sums[i][pack_bytes-1]; | ||
} | ||
ints <== PackBytes(bytes_size)(bytes); | ||
} |
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,5 +1,4 @@ | ||
|
||
pragma circom 2.1.5; | ||
pragma circom 2.1.6; | ||
|
||
include "circomlib/circuits/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
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.