I have a question related on GPG: I'm searching for an option to check if my own public key was used to encrypt a gpg file. I don't want to decrypt the file, I just want to check if I can decrypt the file. I don't want to pass my private key to do that, so I only need to check if I could. In my tool I want to show the users in different colors which files they can decrypt and which they can't - that's the reason of my question.
Asked
Active
Viewed 155 times
0
-
What is the input then? Your public key and an encrypted gpg file? – rene Jan 31 '18 at 07:38
-
Yes, input is a gpg-file and the own public key – Jannik153 Jan 31 '18 at 07:46
-
The encrypted file shows the fingerprint of necessary private key. You can compare it with your key and assume it will work. There is no "test" mode like the function in WinRAR where you can check the integrity of archive. – i486 Jan 31 '18 at 08:21
-
Thanks! Do you know the cmd command which does that? I only know "gpg --list-packets --list-only" which prints all the users with there keyid, but I only need the ID not the keyID. It is more comfortable for me to get less output. – Jannik153 Jan 31 '18 at 08:45