GnuPGで '--edit-key
' オプションを使うと鍵の管理作業のためのメニューが出てくる。
$ gpg --edit-key 549B5813
gpg (GnuPG) 2.0.14; Copyright (C) 2009 Free Software Foundation, Inc.
This is free software: you are free to change and redistribute it.
There in NO WARRANTY, to the extent permitted by law.
Secret key is available.
pub 2048R/549B5813 created: 2012-01-22 expires: never usage: SC
trust: ultimate validity: ultimate
sub 2048R/6878DE41 created: 2012-01-22 expires: never usage: E
sub 2048g/60ACA1A9 created: 2012-01-22 expires: never usage: E
sub 2048D/29641C08 created: 2012-01-22 expires: never usage: S
(略)
ここで表示される "2048R" とか "usage: SC" の意味を理解しないでいるとまずそうだから調べてみた、という話。
2048R
これは "The GNU Privacy Handbook" に書いてあった。
The public key is displayed along with an indication of whether or not the private key is available. Information about each component of the public key is then listed. The first column indicates the type of the key. The keyword pub identifies the public master signing key, and the keyword sub identifies a public subordinate key. The second column indicates the key's bit length, type, and ID. The type is D for a DSA key, g for an encryption-only ElGamal key, and G for an ElGamal key that may be used for both encryption and signing. The creation date and expiration date are given in columns three and four. The user IDs are listed following the keys.
要するに数字の部分が鍵のビット長、残りのアルファベット1文字が鍵の種類を表す。R なら RSA、D なら DSA、g なら 暗号化専用の ElGamal、G なら 暗号化と署名両方に使える ElGamal(このハンドブックは1999年の古いものなのでRSAについて言及していないが)。
"2048g"