Skip to content

Conversation

@chfast
Copy link
Member

@chfast chfast commented Sep 23, 2025

This implements the p256_verify precompile which verifies
an ECDSA signature from the P256 / secp256r1 curve.
See EIP-7951: https://eips.ethereum.org/EIPS/eip-7951.

@codecov
Copy link

codecov bot commented Sep 23, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 87.06%. Comparing base (6586b45) to head (ae126d9).
⚠️ Report is 4 commits behind head on master.

Additional details and impacted files
@@ Coverage Diff @@ ## master #1321 +/- ## ========================================== + Coverage 87.04% 87.06% +0.01%  ========================================== Files 167 168 +1 Lines 24728 24788 +60 Branches 4064 4070 +6 ========================================== + Hits 21525 21582 +57  Misses 547 547 - Partials 2656 2659 +3 
Flag Coverage Δ
eest-develop 84.15% <100.00%> (+0.16%) ⬆️
eest-develop-gmp 15.86% <0.00%> (-0.04%) ⬇️
eest-legacy 11.10% <0.00%> (-0.03%) ⬇️
eest-legacy-silkpre 17.60% <24.09%> (-0.07%) ⬇️
evmone-unittests 83.51% <24.09%> (-0.25%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

Components Coverage Δ
core 93.53% <100.00%> (+0.01%) ⬆️
tooling 86.19% <ø> (ø)
tests 84.12% <ø> (ø)
Files with missing lines Coverage Δ
lib/evmone_precompiles/ecc.hpp 96.06% <100.00%> (-1.06%) ⬇️
lib/evmone_precompiles/secp256r1.cpp 100.00% <100.00%> (ø)
test/state/precompiles.cpp 94.97% <100.00%> (+0.12%) ⬆️
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
Copy link
Member

@pdobacz pdobacz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍 👍

Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR implements the secp256r1/P256 signature verification precompile according to EIP-7951, which adds cryptographic support for the P256 elliptic curve commonly used in modern cryptographic applications.

  • Adds a new secp256r1 module with curve parameters and signature verification logic
  • Implements the p256verify_execute function to handle signature verification requests
  • Extends the ECC library to support curves with A ≠ 0 (specifically A = P-3 for secp256r1)

Reviewed Changes

Copilot reviewed 6 out of 6 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
test/state/precompiles.cpp Implements the p256verify_execute precompile function with input validation and signature verification
lib/evmone_precompiles/secp256r1.hpp Defines secp256r1 curve parameters and verification function interface
lib/evmone_precompiles/secp256r1.cpp Implements ECDSA signature verification algorithm for secp256r1 curve
lib/evmone_precompiles/ecc.hpp Extends ECC library to support curves with A = P-3 by adding conditional doubling formulas
lib/evmone_precompiles/CMakeLists.txt Adds secp256r1 source files to build configuration
circle.yml Removes test filters that were excluding p256verify precompile tests

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

This implements the `p256_verify` precompile which verifies an ECDSA signature from the P256 / secp256r1 curve. See EIP-7951: https://eips.ethereum.org/EIPS/eip-7951.
@chfast chfast merged commit ae93d5d into master Sep 26, 2025
23 checks passed
@chfast chfast deleted the p256_verify branch September 26, 2025 09:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

3 participants