Lably
Skip to content

Public key fingerprint

Short sequence of bytes used to authenticate or look up a longer public key

  • 5 min read
  • 4 chapters

Related on Lably

Through Hexadecimal, Internet and Database

Creating public key fingerprints

A public key fingerprint is typically created through the following steps:

  1. A public key (and optionally some additional data) is encoded into a sequence of bytes. To ensure that the same fingerprint can be recreated later, the encoding must be deterministic, and any additional data must be exchanged and stored alongside the public key. The additional data is typically information which anyone using the public key should be aware of. Examples of additional data include: which protocol versions the key should be used with (in the case of PGP fingerprints); and the name of the key holder (in the case of X.509 trust anchor fingerprints, where the additional data consists of an X.509 self-signed certificate).
  2. The data produced in the previous step is hashed with a cryptographic hash function such as SHA-1 or SHA-2.
  3. If desired, the hash function output can be truncated to provide a shorter, more convenient fingerprint.

This process produces a short fingerprint which can be used to authenticate a much larger public key. For example, whereas a typical RSA public key will be 2048 bits in length or longer, typical MD5 or SHA-1 fingerprints are only 128 or 160 bits in length.

When displayed for human inspection, fingerprints are usually encoded into hexadecimal strings. These strings are then formatted into groups of characters for readability. For example, a 128-bit MD5 fingerprint for SSH would be displayed as follows:

43:51:43:a1:b5:fc:8b:b7:0a:3a:a9:b1:0f:66:73:a8

Sign in to keep reading

3 more chapters are free with a Lably account.

More in Computing and communication