wakatonoの戯れメモ

はてなダイアリーから引っ越してきました。

RFC2246より〜認証付きDiffie-Hellman鍵共有(Diffie-Hellman key exchange with authentication)

ちょっと気になったので。

10分くらいで読んでみたけど、テイストはわかった。
気になった人のために。

DH鍵共有が使われる際に、サーバは固定のDHパラメータを含む証明書を提供するか、DSSもしくはRSA証明書で署名された、一時的なDHパラメータの組を送るために、サーバ鍵交換メッセージを用いることができる。一時パラメータは、DSSもしくはRSA証明書による署名の前にhello.random値を用いてハッシュ計算される。いずれの場合でも、クライアントは証明書もしくは署名の検証を行って、DHパラメータがサーバのものであることを確認できる。

When Diffie-Hellman key exchange is used, the server can either supply a certificate containing fixed Diffie-Hellman parameters or can use the server key exchange message to send a set of temporary Diffie-Hellman parameters signed with a DSS or RSA certificate. Temporary parameters are hashed with the hello.random values before signing to ensure that attackers do not replay old parameters. In either case, the client can verify the certificate or signature to ensure that the parameters belong to the server.

クライアントが固定のDHパラメータを持つ証明書を持つ場合、その証明書は、鍵交換を完了するために必要な情報を含む。

この場合、クライアントとサーバの通信時には、毎回同じDHの結果(例:pre_master_secret)を生成する。pre_master_secretが必要以上に長時間メモリに居座らないようにするためには、可能な限り早くmaster_secretに変換しよう。ClientのDHパラメータは、鍵交換が機能するために、サーバによって提供されるDHパラメータと互換がなければならない。

If the client has a certificate containing fixed Diffie-Hellman parameters, its certificate contains the information required to complete the key exchange. Note that in this case the client and server will generate the same Diffie-Hellman result (i.e., pre_master_secret) every time they communicate. To prevent the pre_master_secret from staying in memory any longer than necessary, it should be converted into the master_secret as soon as possible. Client Diffie-Hellman parameters must be compatible with those supplied by the server for the key exchange to work.

クライアントが標準的なDSSもしくはRSA証明書をもっているか、もしくは認証されていない場合には、クライアントはクライアント鍵交換時のメッセージで一時的な(DH)パラメータの組をサーバに送る。それから、そのパラメータ自身を認証するために、証明書を用いてメッセージの検証を行う。

If the client has a standard DSS or RSA certificate or is unauthenticated, it sends a set of temporary parameters to the server in the client key exchange message, then optionally uses a certificate verify message to authenticate itself.