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 v5 keys/signatures. #2111

Merged
merged 13 commits into from
Dec 11, 2023
Merged

Conversation

ni4
Copy link
Contributor

@ni4 ni4 commented Jul 25, 2023

This is yet draft PR and now is intended to check added functionality via CI. MUST not be merged!
It includes:

  • v5 fingerprint support
  • v5 key/sig packets reading/writing
  • v5 key and document signatures verification
  • decryption of v5 secret keys
  • v5 document signature generation for v5 keys

What is going to be added:

  • reading of kbx blobs for v5 keys, if it is simple enough
  • parsing of Ed448 keys/signatures (but no verification support as Botan misses such functionality at the moment)

src/lib/crypto/signatures.cpp Fixed Show fixed Hide fixed
src/lib/crypto/signatures.cpp Fixed Show fixed Hide fixed
src/lib/crypto/signatures.cpp Fixed Show fixed Hide fixed
@codecov
Copy link

codecov bot commented Jul 25, 2023

Codecov Report

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

Comparison is base (60ff581) 76.97% compared to head (5c3f339) 77.07%.

Files Patch % Lines
src/tests/support.cpp 66.66% 11 Missing ⚠️
src/librepgp/stream-sig.cpp 82.75% 10 Missing ⚠️
src/lib/fingerprint.cpp 72.00% 7 Missing ⚠️
src/librepgp/stream-key.cpp 74.07% 7 Missing ⚠️
src/librepgp/stream-dump.cpp 79.31% 6 Missing ⚠️
src/librepgp/stream-write.cpp 90.90% 4 Missing ⚠️
src/lib/pgp-key.cpp 50.00% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #2111      +/-   ##
==========================================
+ Coverage   76.97%   77.07%   +0.10%     
==========================================
  Files         194      194              
  Lines       37074    37257     +183     
==========================================
+ Hits        28536    28715     +179     
- Misses       8538     8542       +4     

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

@ni4 ni4 force-pushed the ni4-821-basic-v5-keys-support branch from e5f35c7 to c1a099a Compare July 25, 2023 15:01
@ni4 ni4 force-pushed the ni4-821-basic-v5-keys-support branch from c1a099a to 6614927 Compare July 31, 2023 19:29
@@ -2573,19 +2583,22 @@ process_pgp_source(pgp_parse_handler_t *handler, pgp_source_t &src)
src_close(&datasrc);
} else {
if (handler->ctx->detached) {
RNP_LOG("Detached signature expected.");
RNP_LOG("Attached signature expected.");
Copy link
Contributor

Choose a reason for hiding this comment

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

-Detached
+Attached

is this correct?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@antonsviridenko Yeah, some sort of double-check with typo from early times. Noticed when worked on surrounding code.

@ni4 ni4 force-pushed the ni4-821-basic-v5-keys-support branch 2 times, most recently from 74460c6 to 7ff058e Compare September 27, 2023 11:24
@ni4 ni4 force-pushed the ni4-821-basic-v5-keys-support branch from 7ff058e to 769dbff Compare November 1, 2023 10:49
@ni4 ni4 force-pushed the ni4-821-basic-v5-keys-support branch from 769dbff to e0d75cc Compare December 1, 2023 15:20
@ni4 ni4 force-pushed the ni4-821-basic-v5-keys-support branch 2 times, most recently from 9957507 to 058888d Compare December 2, 2023 13:37
@ni4 ni4 force-pushed the ni4-821-basic-v5-keys-support branch from 058888d to 5c3f339 Compare December 10, 2023 10:24
@ni4 ni4 marked this pull request as ready for review December 10, 2023 11:46
@ni4 ni4 requested review from ronaldtse and maxirmx December 10, 2023 12:38
@ni4 ni4 requested a review from antonsviridenko December 10, 2023 12:38
Copy link
Contributor

@ronaldtse ronaldtse left a comment

Choose a reason for hiding this comment

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

Thank you @ni4 !

@ronaldtse ronaldtse merged commit 2cf8fd2 into main Dec 11, 2023
114 checks passed
@ronaldtse ronaldtse deleted the ni4-821-basic-v5-keys-support branch December 11, 2023 03:18
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