Pubkey Distribution Concept

Status: Shall be updated along with the current discussion. Feedback wanted (e.g. use gnupg-devel@).

See overview page.

Proposed solution

To find the pubkey of a given email-address an email client should:

  1. Check its local cache
  2. Ask the mail service provider via HTTPS, as specified in https://datatracker.ietf.org/doc/draft-koch-openpgp-webkey-service
  3. Ask the mail service provider via DNS(SEC), as specified in https://datatracker.ietf.org/doc/draft-ietf-dane-openpgpkey
  4. Consult a classic pubkey server (to see if there is a single match)
  5. Resort to a fallback method using an initial email exchange.

Ask the mail service provider (MSP)

WKD draft spec 01 specifies the main features of how to ask the MSP. This part is called the web key directory (WKD).

2016-09-15: Smaller changes and additionals are still being discussed, but the main features are very likely to stay, so that implementations for clients and the MSP side have started.

image:web-key-service-discovery.svg
(attachment:web-key-service-discovery.svg: see metadata in the SVG source-code for license of compilation and sub-graphics.)

The diagram shows the most important use-case:

The request URL looks like

https://example.org/.well-known/openpgpkey/hu/XXXX

With XXXX being a 32-char long string constructed of the mapped local part of the email, SHA-1 hashed and Z-Base-32 encoded.

Manage pubkey by email

The client will send an email to a submission email-address, may get a challenge email back to prove that it is in possession of the private key. Handling is done automatically without user interaction. This is called the web key service (WKS).

The draft spec 01 also shows how the pubkey publication can be managed between email client and provider.

2016-09-15: Some changes - mainly additions - are in discussion, like:

Fallback method

image:web-key-service-fallback.svg attachment:web-key-service-fallback.svg, see metadata in the SVG source-code for license of compilation and sub-graphics.

The diagram shows how encryption will be enabled in case the MSP does not offer the "web key service":

Design goals and constraints

According to user story T1 in EasyGpg2016/VisionAndStories we want to find a single pubkey for a given email address even if there has not been a previous email exchange. It has to work without user interaction (to the extend possible). In T2 and T3 we think about what happens if the communication partner is not ready for this communication.

Assuming both partners have already been set up, we have to solve the following problems reliably without user interaction:

  1. How can I get the pubkey for the email address? ("Discovery", "pubkey distribution")
  2. How can I gain some basic level of trust that this is the current pubkey of the owner with the email address he wants me to use ("building trust" or "validation").

Within the EasyGpg-contract we are attempting a solution that is comparatively easy to implement to raise chances that it will actually widen the user base. It shall also be designed in a way that it can be introduced step by step together with existing and future solutions ("lean" introduction). The main design idea is to use the already existing relation of an email address owner to his or her mail service provider (MSP). It is an intrinsic common interest of both parties to actually provide a verified relationship so that only the owners can connect to their email storage.

The drawback of this design idea is that an man-in-the-middle attack by the MSP is a lot easier compared to the web of trust approach where several external parties are involved and users must explicitly argument about trust relations. The idea is that users with a higher security interest (like Annika or Bob) will build additional trust using advanced methods, like a mutual check of the fingerprints of their public keys. The tracked communication history also allows to detect indications of an MSP trying to attack its users.

(Old) discussion

TODO extract current proposal and move alternatives to section below.

Mail Service Provider

An email account owner has already trusted their email service provider to accept, deliver and possibly store her communication. Technically the connection will be done with TLS secured protocol variants of something like IMAP (receiving, access to storage), SMTP (outbound sending) or HTTP in case of a web application. In each case the user will have to authenticate to use the service.

All we need to use this trust relation is to find

  1. a protocol to ask the MSP for the pubkey of a specific email address
  2. a way for email applications to give, update, request deletion of their pubkey from the MSP. [ There is no need for deletion - if the mail address is taken out of service the key will vanish anyway. -- Werner Koch 2016-05-04 16:12:19 ] [ What if someone does not want to get encrypted emails anymore? Usually action should be undoable, this holds for activating this service. -- bernhard 2016-05-06 15:25:43 ]

Some design criteria:

Query

The first design idea in the 2011 STEED paper was to use DNS records and later profit from DNSSEC.

https://datatracker.ietf.org/doc/draft-ietf-dane-openpgpkey/?include_text=1

Drawbacks of DNS are:

An advantage of DNS is that there already exist implementations (GnuPG 2.1) and some real world deployments.

The 2016 design idea is to use a well-known URL via an HTTPS request.

Advantages for HTTPS are:

Open question:

Less attractive alternatives/documenting the design process

TODO documenting main disregarded alternatives and the design process

Only using email exchanges (and no lookup)

Possible advantages are

Neutral:

Considered less attractive because:

Attaching a pubkey to all emails

The idea is to always attach one pubkey to all emails the user sends out. This could help with

Considered less attractive because:

Managing by HTTPS

It would be possible to manage the uploading of pubkeys to the mailserver-provider via an authenticated HTTPS connection.

This is considered less attractive than handling by email because it is estimated to be harder to implement overall.

The advantages of authenticated HTTPS would have been:

Resorting to a central fallback server

In case if the MSP does not support a pubkey service, it was proposed to use a central fallback server.

The main advantage:

The main drawbacks:

Overall an email exchange as fallback method is preferred because it is close to a natural way users build up trust in first email exchanges and comes without the drawbacks of the central fallback server.

See more discussion at /FallbackServer).

Using classic (pub)"key" servers only

Our unattended use for sending the email would not work in many cases. It would be by pure chance that only one public user id will be found on the public servers ("discovery") and that it carries a signature from a pubkey that I already "trust" to sign others ("validation"). Anyone can upload a pubkey with a specific email address. Instead a user could use the fallback method of exchanging signed emails before communicating more sensitive contents or using a more complex validation method, for example the web of trust.

However asking keys servers is a good idea to sometimes find revocation certificates or new signatures for pubkey I already know. This is important if an MSP service drops out completly. So a key server check is part of the proposed steps.

Future other services?

It is possible that other pubkey distribution concepts will be proposed and implemented that solve the same problems in a better way. There already are some concepts of how a decentralized directory can be kept honest in public.

If an email service provider offers a different service for a very large fraction of users, GnuPG may for practical reasons adopt this method for this particular MSP.

There is a list of some known other approaches below that may become more relevant in the future. The goal of the EasyGpg2016 contract is to implement and deploy something simple in 2016 as proposed in this concept. The other approaches seems to adhere to an improved pubkey validation via the public and seem to require more players to join to be more useful than the model proposed here.

TODO , e.g.

EasyGpg2016/PubkeyDistributionConcept (last edited 2016-09-15 13:14:30 by bernhard)