-
Notifications
You must be signed in to change notification settings - Fork 79
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
Use Poseidon for DKIM hash #115
Conversation
115c272
to
db7e01e
Compare
No top level dependency changes detected. Learn more about Socket for GitHub ↗︎ |
6390845
to
8764f31
Compare
8764f31
to
751fae9
Compare
|
||
Run | ||
```bash | ||
./7_gen_solidity_verifier.sh |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
finally haha -- thanks for this
dkimPublicKeyHashes["hotmail.com"] = bytes32(uint256(2431254542644577945126644490189743659677343436440304264654087065353925216026)); | ||
dkimPublicKeyHashes["twitter.com"] = bytes32(uint256(5857406240302475676709141738935898448223932090884766940073913110146444539372)); | ||
dkimPublicKeyHashes["ethereum.org"] = bytes32(uint256(1064717399289379939765004128465682276424933518837235377976999291216925329691)); | ||
dkimPublicKeyHashes["skiff.com"] = bytes32(uint256(7901875575997183258695482461141301358756276811120772965768802311294654527542)); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For people to verify, I wonder if we should make this more legible in solidity. So i.e. if we have comments with the original raw key and a link to a 3 line repl.it that gets from dns and hashes it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
True. We can add something.
But the raw key is also just is a large number array. Users would still need the selector and some method to convert to dns dkim value to 17*121 chunk
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Right -- so the 3 line repl could just show this decomposition. Like these numbers are just completely illegible for the public to verify
"scripts": { | ||
"test": "NODE_OPTIONS=--max_old_space_size=16384 jest" | ||
}, | ||
"dependencies": { | ||
"@zk-email/circuits": "workspace:^", | ||
"@zk-email/helpers": "workspace:^", | ||
"big-integer": "^1.6.51", | ||
"snarkjs": "https://github.com/sampritipanda/snarkjs.git#fef81fc51d17a734637555c6edbd585ecda02d9e" | ||
"snarkjs": "git+https://github.com/vb7401/snarkjs.git#24981febe8826b6ab76ae4d76cf7f9142919d2b8" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Wait this doesn't work well with the frontend; sampritipanda's fork was needed for that. Are you sure this works?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is only twitter-circuits package.json where we use snarkjs for zkey generation and all. We are using vb fork anyway in the sh file when generating chunked zkeys. Just made that as the default in package.json for this package. Its same either way as the scripts override to use this when needed.
Can revert if it dont make sense. FE works fine.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Huh weird. I don't remember why we use vb7401 to generate chunked zkeys instead of sampritipanda. Should be fine then I guess.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍
Hmm, next time we need to change circuit, I will compare the commits.
ZkRepl to generate DKIM hash for other domains - https://zkrepl.dev/?gist=43ce7dce2466c63812f6efec5b13aa73