Дерну старую тему.
На самом деле, почему OpenSSL 1.0.0 не дружит с сайтами ГОСТ криптографии для TLS.
Начнем пожалуй с самого начала TLS1.0 - RFC-2246
http://tools.ietf.org/html/rfc2246Раздел 7.4.1.2. Client hello
Цитата: The CipherSuite list, passed from the client to the server in the
client hello message, contains the combinations of cryptographic
algorithms supported by the client in order of the client's
preference (favorite choice first). Each CipherSuite defines a key
exchange algorithm, a bulk encryption algorithm (including secret key
length) and a MAC algorithm. The server will select a cipher suite
or, if no acceptable choices are presented, return a handshake
failure alert and close the connection.
OpenSSL передает список CipherSuite. Но сервер работает не по TLS1.0 RFC-2246, ни по TLS1.1 RFC-4346, ни по TLS1.2 RFC-5246.
Вместо того чтобы выполнить последние две строки из выдержки, отправляет свой собственный "Server hello".
В своем рукопожатии "Server hello" сервер указывает свой собственный алгоритм обмена:
Cipher Suite: TLS_DH_RSA_WITH_AES_128_CBC_SHA (0x0031)
Кстати, если не полениться, в центре управления CSP можно подобрать алгоритм по умолчанию, который будет нормально работать с OpenSSL
Cipher Suite: TLS_DHE_RSA_WITH_AES_128_CBC_SHA (0x0033)
Не понятно, почему реализация TLS сервера останавливает свой выбор исключительно на алгоритме "по умолчанию".
Если заглянуть в раздел RFC-2246 A.5. The CipherSuite, мы там не обнаружим названия Cipher Suite, которое отдает нам сервер.
Данный Cipher Suite появился только в RFC-4346 A.5. The CipherSuite. А это уже TLS 1.1, а не заявленный разработчиком TLS 1.0
http://www.cryptopro.ru/products/csp/tlsЕсли придерживаться факта, что сервер общается с использованием протокола TLS 1.1 или TLS 1.2, тогда лучше ознакомится с разделом
TLS1.2 RFC-5246 F.1.1.3. Diffie-Hellman Key Exchange with Authentication
Цитата: If the same DH keypair is to be used for multiple handshakes, either
because the client or server has a certificate containing a fixed DH
keypair or because the server is reusing DH keys, care must be taken
to prevent small subgroup attacks. Implementations SHOULD follow the
guidelines found in SUBGROUP.
Small subgroup attacks are most easily avoided by using one of the
DHE cipher suites and generating a fresh DH private key (X) for each
handshake. If a suitable base (such as 2) is chosen, g^X mod p can
be computed very quickly; therefore, the performance cost is
minimized. Additionally, using a fresh key for each handshake
provides Perfect Forward Secrecy. Implementations SHOULD generate a
new X for each handshake when using DHE cipher suites.
Тут явно дается рекомендация использовать DHE вместо обычного DH. Это повышает надежность системы и нет надобности в анализе сертификата сервера на предмет наличия DH параметров.
Что касается OpenSSL. В версии 1.0.0 есть реализация только TLS 1.0. В версии 1.0.1 уже есть поддержка протоколов TLS 1.1 и TLS 1.2.
Отредактировано пользователем 9 сентября 2011 г. 19:27:27(UTC)
| Причина: Не указана