Skip to content
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

Add ECRecover EVM precompile #504

Merged
merged 16 commits into from
Jan 13, 2025
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Update constantine/signatures/ecdsa.nim
Co-authored-by: Mamy Ratsimbazafy <mamy_github@numforge.co>
Vindaar and mratsim committed Jan 12, 2025
commit d75f96e1d5154e7220119c2b5551318780b7eb64
2 changes: 1 addition & 1 deletion constantine/signatures/ecdsa.nim
Original file line number Diff line number Diff line change
@@ -344,7 +344,7 @@ proc recoverPubkeyImpl_vartime*[Name: static Algebra; Sig](
# As we don't know if this is the case, we need to loop until we either find a valid signature,
# adding `M` each iteration or until we roll over again, in which case the signature is invalid.
# NOTE: For secp256k1 this is _extremely_ unlikely, because prime of the curve `p` and subgroup
# order `M` are so close!
# order `r` are so close!
var validSig = false
while (not validSig) and bool(x1.toBig() <= rInit):
# 1. Get base `R` point