PGP(Pretty Good Privacy)

[1] 自分の公開鍵、秘密鍵の生成方法

> pgpk -g
Choose the type of your public key:
  1)  DSS/Diffie-Hellman - New algorithm for 5.0 (default)
  2)  RSA
Choose 1 or 2: 1

使用する公開鍵暗号化方式を指定します。
ここではDSS/Diffie-Hellmanを選択しています。

Pick your public/private keypair key size:
(Sizes are Diffie-Hellman/DSS; Read the user's guide for more information)
 1)   768/768  bits- Commercial grade, probably not currently breakable
 2)  1024/1024 bits- High commercial grade, secure for many years
 3)  2048/1024 bits- "Military" grade, secure for forseeable future(default)
 4)  3072/1024 bits- Archival grade, slow, highest security
Choose 1, 2, 3 or 4, or enter desired number of Diffie-Hellman bits
(768 - 4096): 1

生成する鍵の長さを指定します。
ここでは、768bits を選択しています。
この鍵の長さが長くなるに従って、暗号化、復号化処理の時間が
長くなります。

You need a user ID for your public key.  The desired form for this
user ID is your FULL name, followed by your E-mail address enclosed in
, if you have an E-mail address.  For example:
  Joe Smith 
If you violate this standard, you will lose much of the benefits of
PGP 5.0's keyserver and email integration.

Enter a user ID for your public key: welcom19@mse.waseda.ac.jp

公開鍵のユーザーIDを入力します。
自分のメイルアドレスを入力してください。

Enter the validity period of your key in days from 0 - 999
0 is forever (and the default): 0

鍵の有効期間を入力します。
"0"は無期限です。

You need a pass phrase to protect your private key(s).
Your pass phrase can be any sentence or phrase and may have many
words, spaces, punctuation, or any other printable characters.
Enter pass phrase:

秘密鍵のパスフレーズを入力します。
パスフレーズは秘密鍵の漏洩を防ぐためのもので、パスフレーズが
わからなければ秘密鍵を使用することができません。
パスフレーズは、自分が憶えやすく他者が推測されにくい文字列を
設定してください。

Enter again, for confirmation:
Enter pass phrase:

もう一度、上で入力したパスフレーズを入力します。

Collecting randomness for key...
We need to generate 486 random bits.  This is done by measuring the
time intervals between your keystrokes.  Please enter some random text
on your keyboard until you hear the beep:
   0 * -Enough, thank you.

鍵を生成するために、乱数を入力します。
"Enough, thank you."と表示されるまで、ランダムなキーを入力します。

...******** ..........*****..........********
Keypair created successfully.

If you wish to send this new key to a server, enter the URL of the server,
below.  If not, enter nothing.

リターンキーを押します。

これで、PGPで使用する自分の公開鍵と秘密鍵が生成されました。

[2]相手の公開鍵を登録する

ここでは、welcom19ユーザーがwelcom18ユーザーの公開鍵を登録する方法と登録した鍵を信用できる鍵としてサインする方法を説明します。
> pgpk -a ~welcom18/pubring.pkr 相手の公開鍵ファイル名
Adding keys:

Key ring: '/homea/seminar/welcom18/pubring.pkr'
Type Bits KeyID      Created    Expires    Algorithm       Use
pub   768 0x******** 1999-05-18 ---------- DSS             Sign & Encrypt 
sub   768 0x******** 1999-05-18 ---------- Diffie-Hellman                 
uid  "Seminar User 18 "

1 matching keys found

Add these keys to your keyring? [Y/n] y

Keys added successfully.

これで、welcom18の公開鍵が登録されました。

次に、今登録した公開鍵を信用できる鍵としてサインをする必要
があります。


> pgpk -s welcom18@mse.waseda.ac.jp
         登録した公開鍵のユーザーID

pub   768 0x******** 1999-05-18 ---------- DSS             Sign & Encrypt 
sub   768 0x******** 1999-05-18 ---------- Diffie-Hellman                 
uid  welcom18@mse.waseda.ac.jp

welcom18@mse.waseda.ac.jp
sig       0x******** 1999-05-18 welcom18@mse.waseda.ac.jp


READ CAREFULLY:  Based on your own direct first-hand knowledge, are
you absolutely certain that you are prepared to solemnly certify that
the above public key actually belongs to the user specified by the
above user ID [y/N]? y
Key selected for signing is:

welcom18@mse.waseda.ac.jp
sig       0x******** 1999-05-18 welcom18@mse.waseda.ac.jp
Enter pass phrase:
自分のパスフェーズを入力します。
 
Key signature certificate added.

これで、welcom19ユーザーは先ほど登録したwelcom18ユーザーの
公開鍵が信用できる鍵として鍵としてサインがされました。

SEE ALSO <on-line>
戻る
MewのTOPページ
理工メディアセンター