【鍵ペアの作成】
gpg --gen-key
C:\> gpg --gen-key
gpg (GnuPG) 1.2.4; Copyright (C) 2003 Free Software Foundation, Inc.
This program comes with ABSOLUTELY NO WARRANTY.
This is free software, and you are welcome to redistribute it
under certain conditions. See the file COPYING for details.
Please select what kind of key you want:
(1) DSA and ElGamal (default)
(2) DSA (sign only)
(4) RSA (sign only)
Your selection? 1 <--- 鍵の種類
DSA keypair will have 1024 bits.
About to generate a new ELG-E keypair.
minimum keysize is 768 bits
default keysize is 1024 bits
highest suggested keysize is 2048 bits
What keysize do you want? (1024) 1024 <--- 鍵の長さ
Requested keysize is 1024 bits
Please specify how long the key should be valid.
0 = key does not expire
<n> = key expires in n days
<n>w = key expires in n weeks
<n>m = key expires in n months
<n>y = key expires in n years
Key is valid for? (0) 0 <--- 鍵の有効期間(0は無期限)
Key does not expire at all
Is this correct (y/n)? y <--- 確認
You need a User-ID to identify your key; the software constructs the user id
from Real Name, Comment and Email Address in this form:
"Heinrich Heine (Der Dichter) <heinrichh@duesseldorf.de>"
Real name: GnuPG <--- 実名
Email address:
gpg@nina.jp <--- メアド
Comment: (Enter) <--- コメント
You selected this USER-ID:
"GnuPG <gpg@nina.jp>"
Change (N)ame, (C)omment, (E)mail or (O)kay/(Q)uit? O <--- 確認(ゼロでなくオー)
You need a Passphrase to protect your secret key.
Enter passphrase: (password) <--- 秘密鍵のパスフレーズ
Repeat passphrase: (password) <--- 秘密鍵のパスフレーズ確認
We need to generate a lot of random bytes. It is a good idea to perform
some other action (type on the keyboard, move the mouse, utilize the
disks) during the prime generation; this gives the random number
generator a better chance to gain enough entropy.
- ..++++++++++.+++++.++++++++++++++++++++.+++++.+++++.++++++++
- .+++++++++++++++++++++++++.+++++++++++++++>+++++.+++++.........
.......................................................................+++++
We need to generate a lot of random bytes. It is a good idea to perform
some other action (type on the keyboard, move the mouse, utilize the
disks) during the prime generation; this gives the random number
generator a better chance to gain enough entropy.
...++++++++++++++++++++++++++++++++++++++++.++++++++++.+++++++++++++++++++++++++
..+++++.+++++++++++++++..+++++++++++++++++++++++++++++++++++>.+++++.....+++++^^^
gpg: C:/Documents and Settings/nao/Application Data/GnuPG\trustdb.gpg: trustdb c
reated
public and secret key created and signed.
key marked as ultimately trusted.
Key fingerprint = XXXX XXXX XXXX XXXX XXXX XXXX XXXX XXXX XXXX XXXX
sub 1024g/F12469FB 2004-05-30
【参照】
・秘密鍵
gpg --list-key [鍵名 or ID名]
・公開鍵
gpg --list-secret-key [鍵名 or ID名]
・署名
gpg --list-sigs [鍵名 or ID名]
【鍵のエクスポート】
同じ鍵名が複数ある状態で鍵名を指定してエクスポートすると、
複数の鍵がファイルにエクスポートされる
・秘密鍵
・公開鍵
【鍵のインポート】
・秘密鍵
gpg --import --allow-secret-key-import [ファイル名]
・公開鍵
gpg --import [ファイル名]
【鍵の削除】
鍵ペアを削除する時は、秘密鍵を先に削除する
・秘密鍵
・公開鍵
【信用度変更】
Command> trust ←trust
コマンドを実行
最終更新:2014年02月22日 10:54