OpenPGP Trust Models

Monkeysphere relies on GPG's definition of the OpenPGP web of trust, so it's important to understand how GPG calculates User ID validity for a key.

The basic question that a trust model tries to answer is: For a given User ID on a specific key, given some set of valid certifications (signatures), and some explicit statements about whose certifications you think are trustworthy (ownertrust), should we consider this User ID to be legitimately attached to this key (a "valid" User ID)?

It's worth noting that there are two integral parts in this calculation:

What does "validity" mean anyway?

You see the term "validity" a lot in this context, but it has several subtly different meanings:

First of all, someone might speak of the validity of a key itself, which could mean two things:

So the more useful definition of validity is actually User ID validity:

Examining your GPG trust database

You can see your trust database parameters like this:

gpg --with-colons --list-key bogusgarbagehere 2>/dev/null | head -n1

for me, it looks like this:

tru::1:1220401097:1220465006:3:1:5

These colon-delimited records say (in order):

Classic trust model

As far as i can tell, the basic trust model is just the 3 and 1 from the above description:

If either of these are satisfied, the User ID is considered to be legitimately attached to its key (it is "fully" valid).

If there are no certifications from anyone you trust, the User ID is considered to have unknown validity, which basically means "not valid".

If there are some certifications from people who you trust, but not enough to satisfy either condition above, the User ID has "marginal validity".

PGP trust model (Classic trust model + trust signatures)

Note that so far, your ability to express ownertrust is relatively clumsy. You can say "i trust the certifications made by this keyholder completely", or "a little bit", or "not at all". And these decisions about ownertrust are an entirely private matter. You have no formal way to declare it, or to automatically interpret and act on others' declarations. There is also no way to limit the scope of this ownertrust (e.g. "I trust my co-worker to properly identify anyone in our company, but would prefer not to trust him to identify my bank").

Trust signatures are a way to address these concerns. With a trust signature, I can announce to the world that i think my sister's certifications are legitimate. She is a "trusted introducer". If i use "trust level 1", this is equivalent to my ownertrust declaration, except that i can now make it formally public by publishing the trust signature to any keyserver.

If you trust my judgement in this area (the spec calls my role in this scenario a "!meta introducer"), then you should be able to automatically accept certifications made by my sister by creating a level 2 trust signature on my key. You can choose whether to publish this trust signature or not, but as long as your gpg instance knows about it, my sister's certifications will be treated as legitimate.

Combining trust signatures with regular expressions allows you to scope your trust declarations. So, for example, if you work at ExampleCo, you might indicate in a standard level 1 trust signature on your co-worker's key that you trust them to identify any User ID within the example.com domain.

Problems and Questions with Chained Trust

How do partial/marginal ownertrust and chained trust connections interact? That is, if:

Then what should A see as the calculated validity for D's User ID? Surely nothing more than "marginal", but if A marginally trusts two other certifications on D, should that add up to full validity?

What if the chain goes out more levels than above? Does "marginal" get more attenuated somehow as a chain of marginals gets deeper? And how exactly does max_cert_depth play into all this?

What about regex-scoped trust signatures of level > 1? Does the scoping apply to all dependent trust signatures? Has this sort of thing been tested?

"ultimate" ownertrust in GnuPG

Note that for a key under your sole control, which you expect to use to certify other people's User IDs, you would typically give that key "ultimate" ownertrust, which for the purposes of the calculations described here is very similar to "full".

The difference appears to be this: If a key with "full" ownertrust but with no valid User IDs makes a certification, that certification will not be considered. But if the certifying key has "ultimate" ownertrust, then its certifications are considered.

So "full" ownertrust on a key is only meaningful as long as there is a trust path to some User ID on that key already. "ultimate" ownertrust is meaningful anyway, because presumably you control that key.

Other references