Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

SSL authentication by comparing certificate fingerprint?

Question for all the SSL experts out there:

We have an embedded device with a little web server on it, and we can install our own SSL self-signed certificates on it. The client is written in .NET (but that doesn't matter so much).

How can I authenticate the device in .NET? Is it enough to compare the fingerprint of the certificate against a known entry in the database?

My understanding is that the fingerprint is a hash of the whole certificate, including the public key. A device faking to be my device could of course send the same public certificate, but it couldn't know the private key, right?

Or do I have to build up my own chain of trust, create my own CA root certificate, sign the web server certificate and install that on the client?

like image 612
chris166 Avatar asked Jul 06 '09 08:07

chris166


People also ask

WHAT IS fingerprint in SSL certificate?

A certificate's fingerprint is the unique identifier of the certificate. Microsoft Internet Explorer calls it Thumbprint. Browsers tend to display it as if it were a part of the certificate. It is not a part of the certificate, but it is computed from it.

What is the difference between certificate thumbprint and fingerprint?

A certificate thumbprint, also called a fingerprint, is a hash of a certificate, computed over all certificate data and its signature. Thumbprints are used as unique identifiers for cer- tificates, in applications when making trust decisions, in configuration files, and displayed in interfaces.

How do I get my fingerprint from SSL certificate?

The Security tab should be selected by default. If not, click on the Security tab. Click the View Certificate button to view the Certificate Viewer dialog box. The fingerprints are shown at the bottom of the General tab.

Is a certificate thumbprint sensitive?

The certificate fingerprint is calculated from the certificate. The certificate itself is public information and transferred in clear during the SSL/TLS handshake. Which makes the fingerprint public information too, i.e. there is usually no danger in having it known by others.


1 Answers

What you propose is in principle ok. It is for example used during key signing parties. Here the participants usually just exchange their name and fingerprints of their public keys and make sure that the person at the party really is who he/she claims. Just verifying fingerprints is much easier than to verify a long public key.

Another example is the so called self certifying file system. Here again only hashes of public keys get exchanged over a secure channel. (I.e. these hashes are embedded in URLs.) In this scheme the public keys don't have to be sent securely. The receiver only has to check that the hash of the public keys matche the hashes embedded in the URLs. Of course the receiver also has to make sure that these URLs come from a trusted source.

This scheme and what you propose are simpler than using a CA. But there is a disadvantage. You have to make sure that your database with hashes is authentic. If your database is large then this will likeley be difficult. If you use CAs then you only have to ensure that the root keys are authentic. This usually simplifies the key management significantly and is of course one reason, why CA based schemes are more popular than e.g. the self certifying file system mentioned above.

like image 181
Accipitridae Avatar answered Oct 20 '22 03:10

Accipitridae