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 support for signature verification using public key in X509 DER encoding format. #275

Closed

Conversation

hansonchar
Copy link
Contributor

Issues:

Addresses #274

Description of changes:

Currently signature can only be verified with public key provided in Octet String format. This PR would additionally allow signature to be verified with public key provided in X509 DER encoding format.

Call-outs:

This PR is built on top of #259

Testing:

cargo test

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license and the ISC license.

@hansonchar hansonchar requested a review from a team as a code owner November 15, 2023 05:49
@codecov-commenter
Copy link

codecov-commenter commented Nov 15, 2023

Codecov Report

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

Comparison is base (f6fd8a4) 95.65% compared to head (4ce3cad) 95.59%.

Files Patch % Lines
aws-lc-rs/src/ec.rs 88.37% 10 Missing ⚠️
aws-lc-rs/src/public_key.rs 90.00% 4 Missing ⚠️
aws-lc-rs/src/ed25519.rs 96.66% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #275      +/-   ##
==========================================
- Coverage   95.65%   95.59%   -0.06%     
==========================================
  Files          57       58       +1     
  Lines        7759     7973     +214     
==========================================
+ Hits         7422     7622     +200     
- Misses        337      351      +14     

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

@hansonchar hansonchar force-pushed the ec-raw-api_verify_sig_with_x509_pubkey branch 3 times, most recently from 1ca187e to fc668d5 Compare November 21, 2023 18:29
@hansonchar hansonchar force-pushed the ec-raw-api_verify_sig_with_x509_pubkey branch 2 times, most recently from 385a831 to f3ffe79 Compare November 29, 2023 05:17
@hansonchar hansonchar force-pushed the ec-raw-api_verify_sig_with_x509_pubkey branch from f3ffe79 to 7028729 Compare December 6, 2023 00:34
@hansonchar hansonchar force-pushed the ec-raw-api_verify_sig_with_x509_pubkey branch 3 times, most recently from 9260f9c to 2519e0c Compare December 19, 2023 13:25
@hansonchar hansonchar force-pushed the ec-raw-api_verify_sig_with_x509_pubkey branch from 2519e0c to dea1906 Compare December 22, 2023 10:14
@hansonchar hansonchar force-pushed the ec-raw-api_verify_sig_with_x509_pubkey branch 2 times, most recently from 2810a7c to 55669ad Compare January 9, 2024 06:37
Hanson Char added 2 commits January 10, 2024 23:34
public key in X509 DER encoding format.
This includes RSA, Ed25519 and EC.  Specifically, the changes include:
* Add signature::UnparsedPublicKey.new_with_x509()
* Add verify_sig_with_x509_pubkey in addition to verify_sig
* Add verify_ed25519_signature
* Check ed25519 X509 public key prefix
@hansonchar hansonchar force-pushed the ec-raw-api_verify_sig_with_x509_pubkey branch from 55669ad to 4ce3cad Compare January 11, 2024 07:35
@skmcgrail
Copy link
Member

I've stashed this PR contents at https://github.com/aws/aws-lc-rs/tree/hansonchar/ec-raw-api_verify_sig_with_x509_pubkey until we have time to review this work as part of the broader service teams' requirements.

@skmcgrail skmcgrail closed this Feb 13, 2024
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.

3 participants