
나는 암호화 키의 사용에 대해 스스로 교육하려고 노력하고 있으며 내가 찾은 오래된 Linus Torvalds의 키를 실험해 왔습니다 956EB7BF449FA3AB
.
사용 플래그를 표시하고 싶지만 사용 플래그도 표시 gpg2 --list-keys 449FA3AB
하지도 않습니다.gpg2 --fingerprint 449FA3AB
사용 플래그 정보를 얻기 위해 내가 찾은 유일한 방법은 이런 해킹적인 방법입니다.
$ gpg2 --edit-key 449FA3AB
gpg (GnuPG) 2.0.26; Copyright (C) 2013 Free Software Foundation, Inc.
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
pub 1024D/449FA3AB created: 1999-10-05 expired: 2001-10-04 usage: SCA
trust: unknown validity: expired
sub 2048g/BFF491C5 created: 1999-10-05 expired: 2001-10-04 usage: E
[ expired] (1). Linus Torvalds <[email protected]>
gpg> quit
$
사용 플래그를 표시하는 공식적인 방법은 무엇입니까?
답변1
기계가 읽을 수 있는 형식에는 --with-colons
마지막 열로 사용법 플래그가 포함되어 있습니다. 사람이 읽을 수는 없지만 찾고 있는 데이터가 포함되어 있습니다.
$ gpg2 --with-colons --list-keys 449FA3AB
tru::1:1414619239:1414879758:3:1:5
pub:e:1024:17:956EB7BF449FA3AB:939086351:1002158351::-:::sca:
uid:e::::939086351::81A3799583B9B1B391E4C428112F302FF2ADF462::Linus Torvalds <[email protected]>:
sub:e:2048:16:71CE8207BFF491C5:939086545:1002158545:::::e:
Torwald의 공개 키는 서명, 인증 및 인증에 사용될 수 있습니다. 하위 키는 암호화에 사용될 수 있습니다.
답변2
--list-options
GnuPG(2.1+?)의 최신 버전에는 다음과 같은 매개변수 값이 있는 것으로 보입니다 .
$ gpg --list-options show-usage --list-keys
긴 옵션과 마찬가지로 다음에서 지속될 수 있습니다 ~/.gnupg/gpg.conf
.
list-options show-usage