Thumbprint on my certificate. Is my certificate actually SHA-2?

I can see SHA-1 fingerprint/thumbprint on my certificate. Is my certificate actually SHA-2?

Once you have installed an SSL certificate on a web server or applied to a web service, you might have opened a certificate viewer or a similar tool to check if the certificate is all right, particularly if your certificate’s signature algorithm is SHA-2. You might have noticed such a thing as SHA-1 fingerprint.

In this article we will be looking at the certificate fingerprint and the certificate signature algorithm.

Terms checksum, hash sum, hash value, fingerprint, thumbprint are used to describe the digital output usually in a form of a hexadecimal string which is derived from a file by means of applying a hash function (algorithm) to it.

Example: 15:37:48:1E:DB:70:65:80:B2:74:E5:78:25:E5:AD:39:14:53:69:19
is the SHA-1 hash sum of ASN. 1 binary (DER) form of the certificate used at www. instantssl. com.

Thumbprint on my certificate. Is my certificate actually SHA-2?

Signature Algorithm field in an x509v3 SSL certificate (we provide exactly this kind of security certificates) indicates a cryptographic algorithm that is used by a Certificate Authority (CA) to sign a given certificate. By generating this signature, a CA certifies validity of the information in the certificate and the binding between the subject and the public key material in particular.

Here are the related details of the same certificate. Now we are looking at the certificate’s Signature Algorithm.

Thumbprint on my certificate. Is my certificate actually SHA-2?

This shows that SHA-256 hash function with RSA cryptographic algorithm was used as a Signature Algorithm by Comodo CA(now Sectigo CA) to certify the connection between the public key material and the subject: Comodo CA Ltd, Salford, Greater Manchester, GB; www. instantssl. com.

At the same time, SHA-1 fingerprint was taken from the certificate to identify a larger set of information stored in the certificate itself.

The fact that we can see a SHA-1 fingerprint of a certificate in, say Mozilla Certificate Viewer, does not necessarily mean that the same cryptographic function (SHA-1) is the Signature Algorithm that was used by a Certificate Authority to issue a certificate.

Читать также:  Сертификат российского морского и речного регистра судоходства

This leads us to the conclusion that certificate fingerprints (MD5, SHA-1 or SHA-256 and others) are used as certificate identifiers which do not correlate with the certificate signature algorithm. The signature algorithm is encoded in a certificate and designates a cryptographic function used by a Certificate Authority to sign and issue the given certificate.

Let us remind and assure you once again that for the end-entity certificate (the one containing hostname / domain name / service hostname you apply an SSL certificate to) Comodo Certificate Authority (now Sectigo CA) uses sha256WithRSAEncryption as a default signature algorithm starting April 2014.

In order to check whether the certificate installed on your site or service was signed using SHA-1 or SHA-2 hash function family (including SHA-256), try running a quick online test or other available methods described in the “How do I check my hashing algorithm?” article in our knowledgebase.

Хэш-функция SHA-1 уже несколько лет считается недостаточно стойкой для использования в подписях SSL-сертификатов. Сейчас идёт процесс вытеснения этой функции из действующих сертификатов, но пока что таких сертификатов много, они встречаются сплошь и рядом. Использование SHA-1 приводит к “неожиданным” эффектам в браузерах. Посмотрим на один из примеров – сайт nic.

На сервере, где расположен nic. ru, установлен валидный сертификат с расширенной проверкой (EV). Однако если зайти на сайт при помощи браузера Chrome (42. 2311. 90 – актуальная на момент написания заметки версия), работающего в среде операционной системы Windows (версии 8. 1, например), то в адресной строке браузера появляется предупреждение о том, что сайт использует устаревшие технологии безопасности. Выглядит это так:

Thumbprint on my certificate. Is my certificate actually SHA-2?

Естественно, ожидается, что корректно установленный EV-сертификат приведёт к другому эффекту, отобразив “доверенную” адресную строку. Так происходит в браузере Internet Explorer 10, на той же тестовой машине:

Читать также:  Сетка стеклотканная ssa 1364 4 sm 4x4 мм штукатурная армирующая сертификат

Thumbprint on my certificate. Is my certificate actually SHA-2?

А если воспользоваться браузером Mozilla Firefox, то эффект тоже положительный:

Thumbprint on my certificate. Is my certificate actually SHA-2?

Впрочем, положительный эффект в Firefox имеет под собой другую почву, нежели случай IE. Что происходит, почему браузеры ведут себя именно так?

Посмотрим на набор сертификатов, возвращаемых сервером. Здесь есть три сертификата: серверный и два промежуточных; вот их свойства, указанные в полях Subject (s, предмет сертификации) и Issuer (i, удостоверяющая сторона):

s:O=JSC ‘RU-CENTER’/OU=Project Department/CN=www. nic. ru
i:O=GeoTrust Inc. /CN=GeoTrust EV SSL CA – G4

s:O=GeoTrust Inc. /CN=GeoTrust EV SSL CA – G4
i:O=GeoTrust Inc. /CN=GeoTrust Primary Certification Authority

s:O=GeoTrust Inc. /CN=GeoTrust Primary Certification Authority
i:O=Equifax/OU=Equifax Secure Certificate Authority

(Имя nic. ru без www. указано в расширении SAN сертификата, так что адреса на скриншотах – корректны

Проблемным является сертификат под номером 2 (выпущенный для GeoTrust Primary Certification Authority), так как он использует SHA-1 в составе алгоритма генерации подписи. Согласно политике Google Chrome, если в цепочку сертификатов (исключая корень) входит хотя бы один, подписанный с использованием SHA-1, то в адресной строке выводится предупреждение. Посмотрим на цепочку:

Thumbprint on my certificate. Is my certificate actually SHA-2?

Всё сходится – промежуточный сертификат с SHA-1 входит в цепочку сразу после корня. (Обратите, кстати, внимание на то, что корень обозначен как GeoTrust, хотя сам корневой сертификат содержит название Equifax, в чём можно убедиться, если посмотреть внутрь его полей. Это следы маркетинга: бизнес по продаже цифровых сертификатов Equifax был продан компании, оказывающей эти услуги под брендом GeoTrust. ) IE использует тот же набор корней, однако политика этого браузера позволяет даже EV-сертификатам быть подписанным по цепочке, включающей SHA-1, поэтому здесь всё хорошо.

А вот Firefox использует собственный набор корней, поэтому цепочка валидации тут иная:

Читать также:  Курсы младшей медсестры по уходу за больными в спб с выдачей сертификата

Thumbprint on my certificate. Is my certificate actually SHA-2?

Firefox содержит доверенный корень, обозначенный как GeoTrust Primary Certification Authority, от которого подписан промежуточный сертификат GeoTrust EV SSL CA – G4. То есть, те же сертификаты уже выстраиваются в цепочку, которая не содержит SHA-1, поэтому данная ситуация не может вызвать предупреждения, даже если бы такое предупреждение поддерживалось Firefox. Аналогично устроен и Google Chrome под Linux – там тоже встроен корень, позволяющий избежать использования промежуточного сертификата с SHA-1.

Выше я упомянул о том, что присутствие SHA-1 не учитывается для корневых сертификатов (встроенных в браузеры). Почему? Причина в том, что корневые сертификаты самоподписанные (по определению), а браузер доверяет не подписи, а открытому ключу, связанному с корневым сертификатом, и имени удостоверяющего центра, которое указано в сертификате. Раз подпись не играет ключевой роли, то и использованием SHA-1 в корневом сертификате можно пренебречь: оно никак не влияет на уровень доверия.

Issue

When configuring SAML SSO, some service providers require the fingerprint of the SSL certificate used to sign the SAML Assertion.

Requirements of different service providersvary. Some need a SHA-1 fingerprint, some need an MD5 fingerprint, etc. Depending on the server platform, only the SHA-1 or MD5 fingerprint/thumbprint may be displayed.

Resolution

This solution assumes the use of Windows.

  • Install the latest version of OpenSSL for Windows.
  • Open the Windows Command Line.
  • Navigate to the OpenSSL installation directory (the default directory is C:OpenSSL-Win32in).

The example below displays the value of the same certificate using each algorithm:

Notes

The algorithm of the fingerprint/thumbprint is unrelated to the encryption algorithm of the certificate. The fingerprint/thumbprint is a identifier used by some server platforms to locate the certificate in a certificate store. You can generate a MD5 fingerprint for a SHA2 certificate.

Добавить комментарий

Ваш адрес email не будет опубликован. Обязательные поля помечены *