Index > Scribe > gpg private keys not found | |
---|---|
Author/Date | gpg private keys not found |
minnie 11/04/2017 10:45am | Inscribe 2.1 build41, Windows 7
If I address a new mail to an account for which a GPG key exists, I get the message: One or more addresses have no key for encryption. This is similar to http://www.memecode.com/xyz/view.php?id=4090 From a command line, gpg --list-secret-keys works fine. The install directory of GPG is at F:\Program Files\GNU\GnuPG\gpg.exe and listed in HKCU\Software\GNU\GnuPg\gpgProgram and HKLM\SOFTWARE\Wow6432Node\GNU\GnuPG\Install Directory. The home directory is at G:\xxx\GPG and listed in HKCU\Software\GNU\GnuPG\HomeDir. |
fret 12/04/2017 10:20am | If I address a new mail to an account for which a GPG key exists To email someone you need their public key. Not a private key... so the GPG command you're looking for is: gpg --list-keys Is the destination email in that list of keys? If it is, then there may be a parsing bug, in which case do you mind sending me the output of the list keys command? (Via email) If it's not there, then Scribe is behaving correctly, and you just don't have the right key yet. Encrypting to someone uses your private key and their public key. |
minnie 12/04/2017 11:46am | Let's see if we can do it in (redacted) public first, as it may help others.
G:\Desktop\todo>gpg --list-keys G:/name4/GPG\pubring.gpg ----------------------- pub 1024D/50B11328 2003-01-31 uid name1 <name3@isp1.com> uid name1 <name4p@isp2.edu> uid name1 <name3@isp3.fm> uid name1 <name4@isp4.net> sub 2048g/0D9B327F 2003-01-31 pub 1024D/F287EDDF 1999-09-08 uid name2 <name5@isp5.edu> uid name2 <name6@isp6.edu> sub 1024g/F6D74432 1999-09-08 pub 1024D/F0D6B1E0 2004-06-06 uid TrueCrypt Foundation <info@truecrypt-foundation.org> sub 4077g/6B136ECF 2004-06-06 There are more entries after this as well. Email will encrypt to <name3@isp1.com> but no other entries. Now this is interesting. In the message box in which I am typing there are leftanglebracket-email-rightanglebracket entries for each of the uids in the output as well as a leftanglebracket-email-rightanglebracket entry in the first paragraph after the the code output. Below is what the first half of this message looks like with the left angle brackets replaced by carets: G:\Desktop\todo>gpg --list-keys G:/name4/GPG\pubring.gpg ----------------------- pub 1024D/50B11328 2003-01-31 uid name1 ^name3@isp1.com> uid name1 ^name4p@isp2.edu> uid name1 ^name3@isp3.fm> uid name1 ^name4@isp4.net> sub 2048g/0D9B327F 2003-01-31 pub 1024D/F287EDDF 1999-09-08 uid name2 ^name5@isp5.edu> uid name2 ^name6@isp6.edu> sub 1024g/F6D74432 1999-09-08 pub 1024D/F0D6B1E0 2004-06-06 uid TrueCrypt Foundation ^info@truecrypt-foundation.org> sub 4077g/6B136ECF 2004-06-06 There are more entries after this as well. Email will encrypt to ^name3@isp1.com> but no other entries. The only active emails in the first two entries are name4@isp4.net and name6@isp6.edu, and I would assume this is typically how these keys evolve. So I didn't actually test that the encryption works since name3@isp1.com is dead, but it would let me check the encrypt box in the compose mail window. |
minnie 12/04/2017 11:49am | Now that previous post looks silly.
In the preview box at the bottom of the post screen, no email except <name3@isp1.com> appeared when composing the previous post, but they are all there in the actual output. If that preview box uses the same parsing method, there is the issue. |
minnie 24/04/2017 7:04am | I deleted my pubring.gpg, and then imported an .asc file with two uids:
G:\xyz\GPG>gpg --import "xyz.asc" ... gpg: Total number processed: 1 gpg: imported: 1 G:\xyz\GPG>gpg --list-keys G:/xyz/GPG\pubring.gpg ----------------------- pub 1024D/50B11328 2003-01-31 uid User <user@isp1.net> uid User <user@isp2.net> sub 2048g/0D9B327F 2003-01-31 G:\ronp\GPG> As before, I can encrypt a mail sent with Scribe to the first address(user@isp1.net), but not to the second address(user@isp2.net). |
minnie 24/04/2017 9:29am | All of the above was done with Windows 7 64-bit and GPG1.4.9.
Now I upgraded to 2.1.20, but still with the executable and homedir not in the usual places. The previous registry settings don't work with the new version, so now there are no entries in the registry pertaining to GPG. The only way I could find to change the home directory is to add an environment variable to Windows(Control Panel > System > Advanced System Settings > Environment Variables). The variable GNUPGHOME is set equal to G:\xyz\GPG\. The executable is in F:\Program Files\GNU\GnuPG\bin and this has been added to the Path environment variable(Control Panel > System > Advanced System Settings > Environment Variables). From any directory gpg works fine on the command line, but no addresses can be sent to with Scribe. G:\Desktop\back a>gpg --version gpg (GnuPG) 2.1.20 libgcrypt 1.7.6 Copyright (C) 2017 Free Software Foundation, Inc. License GPLv3+: GNU GPL version 3 or later <https://gnu.org/licenses/gpl.html> This is free software: you are free to change and redistribute it. There is NO WARRANTY, to the extent permitted by law. Home: G:/xyz/GPG/ Supported algorithms: Pubkey: RSA, ELG, DSA, ECDH, ECDSA, EDDSA Cipher: IDEA, 3DES, CAST5, BLOWFISH, AES, AES192, AES256, TWOFISH, CAMELLIA128, CAMELLIA192, CAMELLIA256 Hash: SHA1, RIPEMD160, SHA256, SHA384, SHA512, SHA224 Compression: Uncompressed, ZIP, ZLIB, BZIP2 G:\Desktop\back a>gpg --list-keys G:/xyz/GPG//pubring.gpg ------------------------ pub dsa1024 2003-01-31 [SC] BA1ADD7416DAA8322F28D4E045651E7C50B11328 uid [ unknown] user1 <user1@isp1.com> uid [ unknown] user1 <user1@isp2.com> uid [ unknown] user1 <user1@isp3.com> sub elg2048 2003-01-31 [E] uid [ unknown] user1 <user1@isp3.com> sub elg2048 2003-01-31 [E] sub elg2048 2003-01-31 [E] uid [ unknown] user1 <user1@isp3.com> sub elg2048 2003-01-31 [E] pub dsa1024 1999-09-08 [SCA] 24F36EE9C37181288A8CC13118C599C3F287EDDF uid [ultimate] user2 <user2@isp4.com> uid [ultimate] user2 <user2@isp5.com> sub elg1024 1999-09-08 [E] pub dsa1024 1998-07-07 [SCA] [expired: 2005-12-31] 6BD9050FD8FC941B43412DCC68B7AB8957548DCD uid [ expired] Werner Koch (gnupg sig) <dd9jn@gnu.org> pub rsa2048 2011-01-12 [SC] [expires: 2019-12-31] D8692123C4065DEA5E0F3AB5249B39D24F25E3B6 uid [ unknown] Werner Koch (dist sig) pub rsa2048 2014-10-29 [SC] [expires: 2019-12-31] 46CC730865BB5C78EBABADCF04376F3EE0856959 uid [ unknown] David Shaw (GnuPG Release Signing Key) <dshaw@jabberwoc ky.com> pub rsa2048 2014-10-29 [SC] [expires: 2020-10-30] 031EC2536E580D8EA286A9F22071B08A33BD3F06 uid [ unknown] NIIBE Yutaka (GnuPG Release Key) <gniibe@fsij.org> pub rsa2048 2014-10-19 [SC] [expires: 2020-12-31] D238EA65D64C67ED4C3073F28A861B1C7EFD60D9 uid [ unknown] Werner Koch (Release Signing Key) G:\Desktop\back a> |
fret 24/04/2017 10:44am | I've added this to the issue tracking spreadsheet. I'm currently refactoring the spell checking to get rid of an intermittent crash. When I'm done with that I'll have a look at this. |
fret 26/04/2017 11:08pm | There is a fix for this in the next release. |
minnie 27/04/2017 7:08am | thx a million. |
minnie 28/04/2017 7:45am | Works for me with limited testing in 2.1.42. |
minnie 30/04/2017 11:24am | An observation:
InScribe failed when sending an encrypted message to x@isp1. (A red message appeared in place of 'this message will be encrypted' when the send button was pressed and private sending key entered.) The trust level of x@isp1 was then changed from unknown to ultimate. Then InScribe allowed sending an encrypted message to x@isp1. I assume it was the change in trust level that changed the behavior. It would be more useful to have a message to this effect or a popup option to send to a potentially untrusted user. |
fret 30/04/2017 6:56pm | The trust level of x@isp1 was then changed from unknown to ultimate. This is probably because the gpg program won't encrypt to an untrusted recipient. I assume it was the change in trust level that changed the behavior. It would be more useful to have a message to this effect or a popup option to send to a potentially untrusted user. I probably need to look at parsing out the error message from GPG and passing it up to the application to display to the user. Scribe is just a wrapper around the core GPG program. |
Reply | |