1

Having only recently realized that "chmod" accepts some parameters other than "777" I'm trying to send signed files to an automated email handler. I thought this would be easy using gpg at both ends but I can't figure out where to put the public keys on the receiver.

The signing side describes its search strategy and self as follows,

gpg -v --debug-all  --list-keys
gpg: NOTE: no default option file `/home/marchywka/.gnupg/gpg.conf'
gpg: using PGP trust model
gpg: DBG: fd_cache_open (/home/marchywka/.gnupg/pubring.gpg) not cached
gpg: DBG: iobuf-1.0: open `/home/marchywka/.gnupg/pubring.gpg' fd=4
gpg: DBG: iobuf-1.0: underflow: req=8192
gpg: DBG: iobuf-1.0: underflow: got=1219 rc=0
gpg: DBG: parse_packet(iob=1): type=6 length=269 (search.../../g10/keyring.c.996)
gpg: DBG: mpi_alloc(2048)
gpg: DBG: mpi_alloc_limb_space(2048)
gpg: DBG: mpi_alloc(64)
gpg: DBG: mpi_alloc_limb_space(64)
gpg: DBG: free_packet() type=6
gpg: DBG: mpi_free
gpg: DBG: dummy m_size called
gpg: DBG: mpi_free_limb_space of size 0
gpg: DBG: mpi_free
gpg: DBG: dummy m_size called
gpg: DBG: mpi_free_limb_space of size 0
gpg: DBG: fd_cache_open (/home/marchywka/.gnupg/pubring.gpg) not cached
gpg: DBG: iobuf-2.0: open `/home/marchywka/.gnupg/pubring.gpg' fd=5
gpg: DBG: iobuf-2.0: underflow: req=8192
gpg: DBG: iobuf-2.0: underflow: got=1219 rc=0
gpg: DBG: parse_packet(iob=2): type=6 length=269 (parse.../../g10/keyring.c.390)
gpg: DBG: mpi_alloc(2048)
gpg: DBG: mpi_alloc_limb_space(2048)
gpg: DBG: mpi_alloc(64)
gpg: DBG: mpi_alloc_limb_space(64)
gpg: DBG: parse_packet(iob=2): type=13 length=60 (parse.../../g10/keyring.c.390)
gpg: DBG: parse_packet(iob=2): type=2 length=312 (parse.../../g10/keyring.c.390)
gpg: DBG: mpi_alloc(2048)
gpg: DBG: mpi_alloc_limb_space(2048)
gpg: DBG: parse_packet(iob=2): type=12 length=2 (parse.../../g10/keyring.c.390)
gpg: DBG: free_packet() type=12
gpg: DBG: parse_packet(iob=2): type=14 length=269 (parse.../../g10/keyring.c.390)
gpg: DBG: mpi_alloc(2048)
gpg: DBG: mpi_alloc_limb_space(2048)
gpg: DBG: mpi_alloc(64)
gpg: DBG: mpi_alloc_limb_space(64)
gpg: DBG: parse_packet(iob=2): type=2 length=287 (parse.../../g10/keyring.c.390)
gpg: DBG: mpi_alloc(2048)
gpg: DBG: mpi_alloc_limb_space(2048)
gpg: DBG: parse_packet(iob=2): type=12 length=2 (parse.../../g10/keyring.c.390)
gpg: DBG: free_packet() type=12
gpg: DBG: iobuf-2.0: underflow: req=8192
gpg: DBG: iobuf-2.0: underflow: got=0 rc=-1
gpg: DBG: /home/marchywka/.gnupg/pubring.gpg: close fd 5
gpg: DBG: fd_cache_close (/home/marchywka/.gnupg/pubring.gpg) new slot created
gpg: DBG: iobuf-2.0: underflow: eof
gpg: DBG: iobuf-2.0: close `?'
/home/marchywka/.gnupg/pubring.gpg
----------------------------------
pub   2048R/4E2CF875 2020-05-09
uid                  Mike Marchywka (for remote commands) <marchywka@hotmail.com>
sub   2048R/E650EBC0 2020-05-09

gpg: DBG: free_packet() type=6
gpg: DBG: mpi_free
gpg: DBG: dummy m_size called
gpg: DBG: mpi_free_limb_space of size 0
gpg: DBG: mpi_free
gpg: DBG: dummy m_size called
gpg: DBG: mpi_free_limb_space of size 0
gpg: DBG: free_packet() type=13
gpg: DBG: free_packet() type=2
gpg: DBG: mpi_free
gpg: DBG: dummy m_size called
gpg: DBG: mpi_free_limb_space of size 0
gpg: DBG: free_packet() type=14
gpg: DBG: mpi_free
gpg: DBG: dummy m_size called
gpg: DBG: mpi_free_limb_space of size 0
gpg: DBG: mpi_free
gpg: DBG: dummy m_size called
gpg: DBG: mpi_free_limb_space of size 0
gpg: DBG: free_packet() type=2
gpg: DBG: mpi_free
gpg: DBG: dummy m_size called
gpg: DBG: mpi_free_limb_space of size 0
gpg: DBG: parse_packet(iob=1): type=14 length=269 (search.../../g10/keyring.c.996)
gpg: DBG: mpi_alloc(2048)
gpg: DBG: mpi_alloc_limb_space(2048)
gpg: DBG: mpi_alloc(64)
gpg: DBG: mpi_alloc_limb_space(64)
gpg: DBG: free_packet() type=14
gpg: DBG: mpi_free
gpg: DBG: dummy m_size called
gpg: DBG: mpi_free_limb_space of size 0
gpg: DBG: mpi_free
gpg: DBG: dummy m_size called
gpg: DBG: mpi_free_limb_space of size 0
gpg: DBG: iobuf-1.0: underflow: req=8192
gpg: DBG: iobuf-1.0: underflow: got=0 rc=-1
gpg: DBG: /home/marchywka/.gnupg/pubring.gpg: close fd 4
gpg: DBG: fd_cache_close (/home/marchywka/.gnupg/pubring.gpg) new slot created
gpg: DBG: iobuf-1.0: underflow: eof
gpg: DBG: iobuf-1.0: close `?'
random usage: poolsize=600 mixed=0 polls=0/3 added=15/528
              outmix=0 getlvl1=0/0 getlvl2=0/0
secmem usage: 1408/1408 bytes in 2/2 blocks of pool 1408/65536
marchywka@happy:/home/documents/cpp/proj/mikemail$ gpg --version
gpg (GnuPG) 1.4.20
Copyright (C) 2015 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://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: ~/.gnupg
Supported algorithms:
Pubkey: RSA, RSA-E, RSA-S, ELG-E, DSA
Cipher: IDEA, 3DES, CAST5, BLOWFISH, AES, AES192, AES256, TWOFISH,
        CAMELLIA128, CAMELLIA192, CAMELLIA256
Hash: MD5, SHA1, RIPEMD160, SHA256, SHA384, SHA512, SHA224
Compression: Uncompressed, ZIP, ZLIB, BZIP2

The decoding side does not even appear to look in ~/.gnupg for anything,

  gpg -v --debug-level guru   --list-keys
gpg: enabled debug flags: packet mpi crypto filter iobuf memory cache memstat trust hashing ipc clock lookup extprog
gpg: DBG: [not enabled in the source] start
gpg: using pgp trust model
gpg: DBG: [not enabled in the source] keydb_new
gpg: DBG: [not enabled in the source] keydb_search_reset
gpg: DBG: keydb_search: reset  (hd=0x000056214bbd5e70)
gpg: DBG: [not enabled in the source] keydb_search enter
gpg: DBG: keydb_search: 1 search descriptions:
gpg: DBG: keydb_search   0: FIRST
gpg: DBG: keydb_search: searching keybox (resource 0 of 1)
gpg: DBG: keydb_search: searched keybox (resource 0 of 1) => EOF
gpg: DBG: [not enabled in the source] keydb_search leave (not found)
gpg: DBG: [not enabled in the source] stop
gpg: keydb: handles=1 locks=0 parse=0 get=0
gpg:        build=0 update=0 insert=0 delete=0
gpg:        reset=1 found=0 not=1 cache=0 not=0
gpg: kid_not_found_cache: count=0 peak=0 flushes=0
gpg: sig_cache: total=0 cached=0 good=0 bad=0
gpg: random usage: poolsize=600 mixed=0 polls=0/0 added=0/0
              outmix=0 getlvl1=0/0 getlvl2=0/0
gpg: rndjent stat: collector=0x0000000000000000 calls=0 bytes=0
gpg: secmem usage: 0/65536 bytes in 0 blocks
mike@mike-Latitude-E6510:~/junk/uz$ gpg --version
gpg (GnuPG) 2.2.19
libgcrypt 1.8.5
Copyright (C) 2019 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: /home/mike/.gnupg
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
mike@mike-Latitude-E6510:~/junk/uz$ 




    ls -al ~/.gnupg
total 24
drwx------  3 mike mike 4096 Dec 13 05:53 .
drwxr-xr-x 26 mike mike 4096 Dec 13 05:53 ..
drwx------  2 mike mike 4096 Jun 23 20:06 private-keys-v1.d
-rw-------  1 mike mike 1219 Dec 13 05:44 pubring.gpg
-rw-------  1 mike mike   32 Dec 13 05:07 pubring.kbx
-rw-------  1 mike mike 1200 Dec 13 05:06 trustdb.gpg

Where is the receiver supposed to find public key information? Thanks.

1
  • Your signing side has the old GPG 1.4.x series, while the decoding side has GPG 2.2.x series. There are significant differences between the two major versions: for example, the decoding side might be using a key management agent so the actual accessing of the key box files may happen in a completely separate process. – telcoM Dec 13 '20 at 15:38
1

This is not an entirely useful answer but it does solve the problem if you just want to verify a signature and copy the public keys.

The GNU Privacy Handbook procedure works well,

Copy the output of this,

$ gpg --armor --export 

And then import it from a file into which the above output had been saved,

$gpg --import keyfile

Although it does not describe the search strategy it may fix a problem for those looking on the web.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.