mattosaurus / PgpCore

.NET Core class library for using PGP
MIT License
245 stars 98 forks source link

Verify the original data of a signature? #213

Open poolziee opened 1 year ago

poolziee commented 1 year ago

I would like to inquire whether PgpCore supports verification of the original data that was signed, in addition to verifying the signature itself. Currently, my workaround involves using ClearSignStream to sign the content and then utilizing VerifyAndReadClearStream to extract the original content. However, this process requires manual comparison with the given input.

Another solution could be to use BouncyCastle for verification, utilizing PgpSignature's InitVerify, Update and Verify functions, where we can provide the original data to the Update function.

I am seeking clarification on whether PgpCore provides a more direct way to include the input data alongside the signature during the verification process. This would allow for the validation of the original content without the need for additional steps and manual comparisons.

Any guidance or information on this matter would be greatly appreciated. Thank you for your time and assistance.