(PuTTYユーザマニュアル) 8.1 入門 - 公開キー認証 - 8.1 Public key authentication - an introduction

http://the.earth.li/~sgtatham/putty/0.60/htmldoc/Chapter8.html#pubkey-introの日本語訳。<< 8章: SSH認証で公開キーを使う - 目次に戻る - 8.2 PuTTYのキージェネレータであるPuTTYgenを使う >>

訳文

公開キー認証はログインサーバに自分を識別させる別の手段です。より安全でより柔軟ですが、設定するのはより困難です。

Public key authentication is an alternative means of identifying yourself to a login server, instead of typing a password. It is more secure and more flexible, but more difficult to set up.

従来のパスワードによる認証では、正しいパスワードを知っているかどうかで、本人であることを判断します。パスワードを知っていることを確認させるには、サーバにパスワードを伝えるればよいのです。この方法はサーバがハックされていたり成りすまし(2.2節参照)されていた場合に、攻撃者にパスワードを知られてしまいます。

In conventional password authentication, you prove you are who you claim to be by proving that you know the correct password. The only way to prove you know the password is to tell the server what you think the password is. This means that if the server has been hacked, or spoofed (see section 2.2), an attacker can learn your password.

公開キー認証はこの問題を解決します。(誰でも知ることができる)公開キーと(秘密にして誰にも知られないようにする)秘密キーからなる、キーの組み合わせを生成します。秘密キーは署名を生成するために使えます。秘密キーを持たない人は、そのキーを使って作られた署名を、偽造することはできません。しかし、公開キーを持っていれば、その署名が本物であることを確認できます。

Public key authentication solves this problem. You generate a key pair, consisting of a public key (which everybody is allowed to know) and a private key (which you keep secret and do not give to anybody). The private key is able to generate signatures. A signature created using your private key cannot be forged by anybody who does not have that key; but anybody who has your public key can verify that a particular signature is genuine.

そこで、自分のコンピュータでキーの組み合わせを生成し、公開キーをサーバへコピーします。すると、サーバがあなたが誰かを確認する問い合わせをした時に、PuTTYは秘密キーを使って署名を生成します。サーバは(公開キーを持っているので)署名を確認して、ログインを許可することができます。サーバがハックされていたりなりすましされている場合でも、攻撃者は秘密キーやパスワードを手に入れることはできません。手に入れられるのは署名だけです。そして署名の再利用はできないため、攻撃者は何も手に入れられないのです。

So you generate a key pair on your own computer, and you copy the public key to the server. Then, when the server asks you to prove who you are, PuTTY can generate a signature using your private key. The server can verify that signature (since it has your public key) and allow you to log in. Now if the server is hacked or spoofed, the attacker does not gain your private key or password; they only gain one signature. And signatures cannot be re-used, so they have gained nothing.

これには問題があります。秘密キーを自分のコンピュータの保護されない箇所に保存している場合、秘密キーにアクセスできる人なら誰でもあなたと同様に署名を生成できます。すると、その人たちもあなたのアカウントでサーバにログインできます。このため、秘密キーをローカルマシンに保存する場合、普通は自分で選んだパスフレーズを使って暗号化します。署名を生成するには、PuTTYはキーを復号化するために、パスフレーズを入力する必要があります。

There is a problem with this: if your private key is stored unprotected on your own computer, then anybody who gains access to that will be able to generate signatures as if they were you. So they will be able to log in to your server under your account. For this reason, your private key is usually encrypted when it is stored on your local machine, using a passphrase of your choice. In order to generate a signature, PuTTY must decrypt the key, so you have to type your passphrase.

このため公開キー認証はパスワード認証ほど便利ではありません。サーバへのログイン時に、短いパスワードの代わりに、より長いパスフレーズを入力しなければなりません。これに対する一つの解決方法は、複合化された秘密キーを持ち要求に応じて署名を生成するための独立したプログラムである、認証エージェントを使う事です。Windowsのセッションを始めるには、Pageantを起動して秘密キーをPageantに読み込ませます(一度だけパスフレーズを入力します)。以降のセッションの間は、PuTTYを何度起動しても、Pageantが自動的に署名を生成してくれます。Windowsのセッションを閉じれば、Pageantは、復号化された秘密キーをディスクに保存せずに、終了します。これはセキュリティと利便性との適切な妥協であると感じる人も多いです。さらなる詳細は9章を参照してください。

This can make public-key authentication less convenient than password authentication: every time you log in to the server, instead of typing a short password, you have to type a longer passphrase. One solution to this is to use an authentication agent, a separate program which holds decrypted private keys and generates signatures on request. PuTTY's authentication agent is called Pageant. When you begin a Windows session, you start Pageant and load your private key into it (typing your passphrase once). For the rest of your session, you can start PuTTY any number of times and Pageant will automatically generate signatures without you having to do anything. When you close your Windows session, Pageant shuts down, without ever having stored your decrypted private key on disk. Many people feel this is a good compromise between security and convenience. See chapter 9 for further details.

一つ以上の公開キーアルゴリズムが利用可能です。RSAがもっとも一般的ですが、それ以外にも、アメリ連邦政府のデジタル署名標準である、(DSSとしても知られている)DSAも有名です。

There is more than one public-key algorithm available. The most common is RSA, but others exist, notably DSA (otherwise known as DSS), the USA's federal Digital Signature Standard. The key types supported by PuTTY are described in section 8.2.2.

<< 8章: SSH認証で公開キーを使う - 目次に戻る - 8.2 PuTTYのキージェネレータであるPuTTYgenを使う >>