2012年3月4日日曜日

GPG で表示される "2048R" や "usage: SC", "usage: E" の意味

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"


usage: SC とか

なんとなく "S" は Sign で "E" は Encrypt だろうと予想が付いているものの、調べてみると同じ疑問をもった人がいた。

How are the GPG usage flags defined in the key details listing? - Unix and Linux - Stack Exchange

回答によれば "S" が "for signing", "E" が "for encrypting", "C" が "Creating a certificate"(たとえば Revocation certificate: 失効証明書とか?), "A" が "authentication"とのこと(SSHやTLSにおける認証で使えるらしい)。


1 件のコメント:

kingrani さんのコメント...

Flipkart is Offering Cashback Offers Flipkart AXIS Cashback Offer You will get upto 75% Discount

Flipkart is Offering Cashback Offers Flipkart YES Cashback Offer You will get upto 75% Discount

Flipkart is Offering Cashback Offers Flipkart Phonepe Cashback Offer You will get upto 75% Discount

Flipkart is Offering Cashback Offers Flipkart Cashback Offer You will get upto 75% Discount

Flipkart is one of the biggest world wide eCommerce Site so here you will getFlipkart big billion day offers

Flipkart is one of the biggest world wide eCommerce Site so here you will getflipkart bank cashback offersso

コメントを投稿