公開鍵のgpg検索パスが異なるようです。 GPGのバージョンに大きく関連しています。何をすべきか?

公開鍵のgpg検索パスが異なるようです。 GPGのバージョンに大きく関連しています。何をすべきか?

最近、「chmod」が「777」以外のいくつかのパラメータを受け入れていることに気づき、署名ファイルを自動電子メールハンドラに送信しようとしています。両端でgpgを使用すると簡単になりますが、受信機の公開鍵をどこに置くべきかわかりません。

契約当事者は、自分の検索戦略と自分自身を次のように説明します。

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) <[email protected]>
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

デコード側は ~/.gnupg で何も探しません。

  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

受信者は公開鍵情報をどこで見つけるべきですか?ありがとうございます。

ベストアンサー1

これは完全に役に立つ答えではありませんが、署名を確認して公開鍵をコピーしたい場合に便利です。

GNUプライバシーマニュアルプログラムはうまくいき、

これの出力をコピーします。

$ gpg --armor --export 

次に、上記の出力を保存したファイルから取得します。

$gpg --import keyfile

検索戦略については説明しませんが、ウェブで検索しているユーザーの問題を解決できます。

おすすめ記事