gpg 暗号化コマンド
$ gpg –version
gpg (GnuPG) 2.0.14
libgcrypt 1.4.5
$ gpg –gen-key
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 is NO WARRANTY, to the extent permitted by law.
ご希望の鍵の種類を選択してください:
(1) RSA and RSA (default)
(2) DSA and Elgamal
(3) DSA (署名のみ)
(4) RSA (署名のみ)
選択は? 1
RSA keys may be between 1024 and 4096 bits long.
What keysize do you want? (2048)
要求された鍵長は2048ビット
鍵の有効期限を指定してください。
0 = 鍵は無期限
鍵の有効期間は? (0)
Key does not expire at all
これで正しいですか? (y/N) y
You need a user ID to identify your key; the software constructs the user ID
from the Real Name, Comment and Email Address in this form:
“Heinrich Heine (Der Dichter)
本名: XXXXXXXX
電子メール・アドレス: XXXXX@sample.com
コメント: sample user
次のユーザーIDを選択しました:
“XXXXXXX (sample user)
名前(N)、コメント(C)、電子メール(E)の変更、またはOK(O)か終了(Q)? O
秘密鍵を保護するためにパスフレーズがいります。
can’t connect to `/home/junichi/.gnupg/S.gpg-agent': そのようなファイルやディレクトリはありません
gpg-agent[13521]: ディレクトリー「/home/junichi/.gnupg/private-keys-v1.d」ができました
今から長い乱数を生成します。キーボードを打つとか、マウスを動かす
とか、ディスクにアクセスするとかの他のことをすると、乱数生成子で
乱雑さの大きないい乱数を生成しやすくなるので、お勧めいたします。
終わり。