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

Support compressed octets format in agreement::agree_ephemeral() #252

Closed
wants to merge 1 commit into from

Conversation

hansonchar
Copy link
Contributor

@hansonchar hansonchar commented Oct 21, 2023

Issues:

Addresses #1255

Description of changes:

  • Current behavior: agreement::agree_ephemeral() supports the peer public key in uncompressed octets format, but rejects if the peer public key is in compressed octets format.
  • Behavior after code change: supports the peer public key in either uncompressed or compressed octets format.
  • Added method compute_public_key_compressed to EphemeralPrivateKey so that users can retrieve the EC public key in compressed format when applicable.

Call-outs:

I've changed the test cases that used to disallow peer public key in compressed format to now allow them.

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 October 21, 2023 16:07
@hansonchar hansonchar changed the title Support compresssed octets format in agreement::agree_ephemeral() #1255 Support compresssed octets format in agreement::agree_ephemeral() Oct 21, 2023
@hansonchar hansonchar changed the title Support compresssed octets format in agreement::agree_ephemeral() Support compressed octets format in agreement::agree_ephemeral() Oct 21, 2023
@codecov-commenter
Copy link

codecov-commenter commented Oct 24, 2023

Codecov Report

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

Comparison is base (f6fd8a4) 95.65% compared to head (b83cbca) 95.67%.

Files Patch % Lines
aws-lc-rs/src/agreement.rs 96.22% 2 Missing ⚠️
aws-lc-rs/src/ec.rs 96.00% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #252      +/-   ##
==========================================
+ Coverage   95.65%   95.67%   +0.01%     
==========================================
  Files          57       57              
  Lines        7759     7818      +59     
==========================================
+ Hits         7422     7480      +58     
- Misses        337      338       +1     

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

@hansonchar hansonchar force-pushed the main branch 3 times, most recently from c62c256 to 50d210a Compare October 27, 2023 20:23
@hansonchar hansonchar force-pushed the main branch 3 times, most recently from c182a72 to 46e4b53 Compare November 16, 2023 00:23
@hansonchar hansonchar force-pushed the main branch 2 times, most recently from abcdc23 to 3116d68 Compare November 25, 2023 23:33
@hansonchar hansonchar force-pushed the main branch 2 times, most recently from fc633c6 to 88747f5 Compare December 6, 2023 00:25
@hansonchar hansonchar force-pushed the main branch 3 times, most recently from f34fd6a to dff147b Compare December 19, 2023 13:23
@hansonchar hansonchar force-pushed the main branch 2 times, most recently from 61de423 to da614a0 Compare January 9, 2024 06:17
+ Add EphemeralPrivateKey.compute_public_key_compressed()
+ Fix test cases for public keys in compressed format
@skmcgrail
Copy link
Member

I've stashed this PR contents at https://github.com/aws/aws-lc-rs/tree/hansonchar/main 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