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

Cannot DecryptAndVerify file, but can Decrypt #300

Open
poiug07 opened this issue Oct 12, 2024 · 0 comments
Open

Cannot DecryptAndVerify file, but can Decrypt #300

poiug07 opened this issue Oct 12, 2024 · 0 comments

Comments

@poiug07
Copy link

poiug07 commented Oct 12, 2024

I try to decrypt and verify the file given to me by an external party(most likely using gpg), but DecryptAndVerify fails due to verification exception. However, I can successfully Decrypt and get the contents of the file. I suspect the issue is the following:

  • I have a public key with 2 subkeys (as viewed in Kleopatra).
  • gpg --list-packets looks like this, schematically as I don't have keys/files now and cannot provide them anyway:
[0] their_key
[1] my_key
[2] data
[3] signature
  • I debugged into the following code in the library that causes Verification to fail:
_verificationKeys = new Lazy<IEnumerable<PgpPublicKey>>(() => publicKeyRings.Select(Utilities.FindBestVerificationKey).ToArray());

_verificationKeys contains only one subkey of two (that is marked as primary key in Kleopatra), the other one is missing. When message is viewed with --list-packets, it shows keyId of that missing subkey.

I am a complete noob in PGP and cannot generate minimal sample with given properties myself. I am really sorry, that I cannot provide more context.

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

No branches or pull requests

1 participant