forked from ethereum-optimism/op-geth
-
Notifications
You must be signed in to change notification settings - Fork 2
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
(WIP) Add pre-compile: verification for ed25519 sig made via GPG #2
Open
nkrishang
wants to merge
11
commits into
teaxyz:optimism
Choose a base branch
from
nkrishang:gpg-ed25519
base: optimism
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from 2 commits
Commits
Show all changes
11 commits
Select commit
Hold shift + click to select a range
67bd272
add gpg-ed25519
nkrishang cbc7d3a
Add tests
nkrishang 051364b
Return bytes32(0) for verification failure
nkrishang 528401f
bypass public key expiration check
nkrishang 72aaf0b
precompile expects dearmored bytes inputs
nkrishang 8b33d68
limit message size to 32 bytes
nkrishang d3c407b
update expected input abi encoding
nkrishang cdf66f7
input is abi.encode not abi.encodePacked
nkrishang 4e8cd56
decode using /abi
nkrishang 72d0145
move decode into helper func
zobront c08cefc
Update gas for gpgEd25519Verify
nkrishang File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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 |
---|---|---|
@@ -0,0 +1,9 @@ | ||
[ | ||
{ | ||
"Input": "000000000000000000000000000000000000000000000000000000000000000c48656c6c6f2c20576f726c6400000000000000000000000000000000000000000000000000000000000002932d2d2d2d2d424547494e20504750205055424c4943204b455920424c4f434b2d2d2d2d2d0a0a6d444d455a3270644468594a4b7759424241486152773842415164415852437247514d50696a3763724f453944685a6a5a394b563865455537346649387743630a32704d61447575304b30747961584e6f5957356e494535685a4764686457526849447872636d6c7a614746755a7935756233526c5147647459576c734c6d4e760a625436496b77515446676f414f785968424d4443334e69684230626b66485778675a5a326376684652454f3442514a6e616c304f416873444251734a434163430a416949434268554b4351674c4167515741674d42416834484168654141416f4a454a5a326376684652454f34496b49412f33584556616c50354d6775624646760a556a72734764516f562f4636644f48485143514256412b6531777764415034714c6b342f57684e67684c7931716c396f364a6c6164622b4e4370504d416b554a0a3542566b51374e51424c6734424764715851345343697347415151426c31554242514542423041564530447175367235436e336168574b3449585174426f30610a51576764666855753737397a4243796a4c674d42434165496541515946676f4149425968424d4443334e69684230626b66485778675a5a326376684652454f340a42514a6e616c304f4168734d41416f4a454a5a326376684652454f343255674241503268773168454c6856574576344b3931667937726c50366d585a2b5133610a705875724e3267346b4d47664150774a7a323448736a6a3445324874756377526e3868327556396f7167416467776a565059382f6d647a3841673d3d0a3d3367346b0a2d2d2d2d2d454e4420504750205055424c4943204b455920424c4f434b2d2d2d2d2d00000000000000000000000000000000000000000000000000000000000000e32d2d2d2d2d424547494e20504750205349474e41545552452d2d2d2d2d0a0a694855454142594b414230574951544177747a596f5164473548783173594757646e4c3452555244754155435a3271616b41414b43524357646e4c34525552440a7545304841503942314d67646c31364a5463324647554f4e67455a6c746d783439694a6c4a773979756145497551747746414541374636745a7a72505a37366f0a796d705439354366484e327964794d734870424855513270446b4a4f4a67383d0a3d2f692f4d0a2d2d2d2d2d454e4420504750205349474e41545552452d2d2d2d2d", | ||
"Expected": "0000000000000000000000000000000000000000000000000000000000000001", | ||
"Gas": 2000, | ||
"Name": "verify_valid_gpg_ed25519", | ||
"NoBenchmark": false | ||
} | ||
] |
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.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
Is there a specific length the pubKey is supposed to be that we should verify?
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.
Similar to the comment on signature length. The armored public key length is non-deterministic (exported via
gpg --export --armor <your-key-id>
).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.
Agreed, no way to do this. I'm going to leave this comment open as a reminder that I need to talk to the Tea team to figure out a reasonable upper bound to make sure that (a) there is sufficient gas to handle it, and (b) that there is no DOS risk based on whatever gas params we choose.