Foxcolab

Glossary

Trust on first use (TOFU)

Definition

Trust on first use (TOFU): An authentication approach in which software accepts and stores a public key the first time it meets a server or person, then warns if a different key appears later. It needs no certificate authority but can't detect an attacker present at the first contact.

Also known asTOFUtrust upon first usekey pinning

In short

Trust on first use (TOFU) is an authentication approach in which software accepts and remembers a public key the first time it meets a server or person, then warns if a different key appears later. It needs no certificate authority and works out of the box, but it can't detect an attacker present at the very first contact. Comparing a key fingerprint once closes that gap.

Key takeaways

  • TOFU stores the first key seen for a name and compares every later key with it.
  • SSH in its commonly deployed form uses TOFU, according to RFC 7435.
  • TOFU can't catch an attacker who intercepts the very first contact.
  • A key-change warning means compare fingerprints before you continue, not click through.
  • Verifying a fingerprint once turns trust on first use into checked trust.

Last reviewed 5 December 2026 by Foxcolab Team

Trust on first use (TOFU) is a way to authenticate a public key without a certificate authority. The software accepts a key the first time it meets a server or a person, remembers it, and checks every later connection against it. RFC 7435 describes TOFU as "accepting and storing a public key or credential associated with an asserted identity," and notes that SSH "in its commonly deployed form makes use of TOFU."

A worked example#

The first time you connect to server.example.com over SSH, the OpenSSH client shows "a fingerprint of the server's public key" and asks whether to continue. Say yes and it saves the key in ~/.ssh/known_hosts. From then on, every connection is compared with that saved key. If the server ever presents a different one, "ssh warns about this and disables password authentication to prevent server spoofing or man-in-the-middle attacks."

The alternative, which RFC 4251 also describes, is to have a certificate authority vouch for each key. That's how HTTPS works, and it needs infrastructure TOFU doesn't.

The weak spot#

TOFU protects every connection except the first. RFC 7435 is direct: "TOFU-based protocols do not protect against an attacker who can hijack the first contact communication." It also warns that TOFU "can make it difficult to distinguish routine key management from a malicious attack," because a legitimate reinstall and an attack look the same on screen: a new key.

The fix is to verify once. Compare the key fingerprint over a channel you trust, such as a phone call or a meeting, and your trust stops resting on the first contact having been clean. When a key-change warning appears, compare again before you go on.

In Foxcolab#

Foxcolab Drive uses trust on first use when you share. The first time Drive sees someone's security code, made from their public keys, your browser remembers it. If their keys later produce a different code, Drive stops before it locks anything to the new key and tells you, for example, "Priya's security code changed." You choose Share anyway or check with Priya first. To move past first use, select Code next to their name, compare the code with them on a call or in person, and select Mark as verified (how).

Drive files and file names are end-to-end encrypted, so the key you share to decides who can open them. Create a free account.

Keep exploring

All terms

Foxcolab

Private work tools, without the ads.

Mail, files, documents, spreadsheets and meetings in one account. Files, documents and spreadsheets are end-to-end encrypted.

Jump to