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

runtime-sdk: remove compressed format requirement from ECDSA precompiles #1570

Merged
merged 1 commit into from Nov 27, 2023

Conversation

nhynes
Copy link
Contributor

@nhynes nhynes commented Nov 27, 2023

This PR removes the requirement that public keys provided to the ECDSA precompiles be in compressed format. Sometimes all the user has is an uncompressed one and the curve is not gas-efficient in Solidity. The restriction seems to be for no particular reason, so I removed it because it significantly limits the utility of the precompiles.

Copy link

codecov bot commented Nov 27, 2023

Codecov Report

Attention: 3 lines in your changes are missing coverage. Please review.

Comparison is base (0641464) 60.44% compared to head (e7f87c0) 60.41%.

Files Patch % Lines
runtime-sdk/src/crypto/signature/secp256k1.rs 50.00% 1 Missing ⚠️
runtime-sdk/src/crypto/signature/secp256r1.rs 50.00% 1 Missing ⚠️
runtime-sdk/src/crypto/signature/secp384r1.rs 50.00% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1570      +/-   ##
==========================================
- Coverage   60.44%   60.41%   -0.03%     
==========================================
  Files         139      139              
  Lines        9955     9949       -6     
==========================================
- Hits         6017     6011       -6     
  Misses       3896     3896              
  Partials       42       42              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link
Contributor

@peternose peternose left a comment

Choose a reason for hiding this comment

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

I also have no idea why we had this restriction.

@nhynes nhynes merged commit f2026f0 into main Nov 27, 2023
26 of 28 checks passed
@nhynes nhynes deleted the nhynes/ec-precompile-more-key-formats branch November 27, 2023 15:57
github-actions bot added a commit that referenced this pull request Nov 27, 2023
…hynes/ec-precompile-more-key-formats

runtime-sdk: remove compressed format requirement from ECDSA precompiles f2026f0
github-actions bot added a commit that referenced this pull request Nov 27, 2023
…/nhynes/ec-precompile-more-key-formats

runtime-sdk: remove compressed format requirement from ECDSA precompiles f2026f0
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants