공개 키에 대한 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

검색 전략을 설명하지는 않지만 웹에서 검색하는 사람들의 문제를 해결할 수 있습니다.

관련 정보