rnp icon indicating copy to clipboard operation
rnp copied to clipboard

[#1783] FFI: Add rnp_signature_export()

Open andrey-utkin opened this issue 2 years ago • 5 comments

This changeset adds an FFI API function to export specifically a signature, in binary or armored form.

andrey-utkin avatar Jun 28 '22 15:06 andrey-utkin

Codecov Report

Base: 81.86% // Head: 81.88% // Increases project coverage by +0.01% :tada:

Coverage data is based on head (8ecf090) compared to base (4a96fc0). Patch coverage: 96.66% of modified lines in pull request are covered.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #1867      +/-   ##
==========================================
+ Coverage   81.86%   81.88%   +0.01%     
==========================================
  Files         141      141              
  Lines       28995    29025      +30     
==========================================
+ Hits        23737    23766      +29     
- Misses       5258     5259       +1     
Impacted Files Coverage Δ
src/lib/rnp.cpp 79.77% <94.11%> (+0.05%) :arrow_up:
src/tests/ffi-key-sig.cpp 82.71% <100.00%> (+0.45%) :arrow_up:

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

:umbrella: View full report at Codecov.
:loudspeaker: Do you have feedback about the report comment? Let us know in this issue.

codecov[bot] avatar Jun 28 '22 15:06 codecov[bot]

@ni4 a couple of things which I thought of doing here in addition to this bare minimum are armoring support in flags and a meaningful test. What else would you say we need here?

The test I have in mind is of a "user story" kind, dumping the idea here for your evaluation.

Carol sends her key to Bob. Carol claims Alice knows her. Bob has verified only Alice's key. Alice signs Carol's key and sends that signature to Bob. Bob imports Alice's signature and can prove that Carol is Alice's friend.

Case 2: Mallory instead of Carol, but liar.

andrey-utkin avatar Jun 29 '22 11:06 andrey-utkin

@ni4 a couple of things which I thought of doing here in addition to this bare minimum are armoring support in flags and a meaningful test. What else would you say we need here?

Yeah, having armoring here would be handy for users. This functionality was requested, as far as I remember, to be able to export selected revocation signature of the already loaded key. And it would be good to have it armored.

Carol sends her key to Bob. Carol claims Alice knows her. Bob has verified only Alice's key. Alice signs Carol's key and sends that signature to Bob. Bob imports Alice's signature and can prove that Carol is Alice's friend.

Case 2: Mallory instead of Carol, but liar.

This is sort of web of trust, but now we do not implement automatic web of trust checks and leave key trust settings to the FFI API user.

ni4 avatar Jul 08 '22 09:07 ni4

It would be nice to test that exported signature can be imported back and successfully verified.

antonsviridenko avatar Aug 24 '22 19:08 antonsviridenko

It would be nice to test that exported signature can be imported back and successfully verified.

Amended the test in the last commit. Please re-review.

andrey-utkin avatar Sep 01 '22 13:09 andrey-utkin

Thank you @ni4 @antonsviridenko !

ronaldtse avatar Dec 09 '22 09:12 ronaldtse