Pubkey Distribution Concept
Status: Document should show the state of discussion, feedback wanted! (e.g. use gnupg-devel@).
Contents
According to user story T1 in EasyGpg2016/VisionAndStories we want to find a single certificate for a given email address even if there has not been 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:
- How can I get the cert for the email address? ("Discovery", "cert distribution")
- How can I gain some basic level of trust that this is the current cert 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 coming 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 inherit common interest of both parties to actually provide a verified relationship so that only the owner 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 ESP trying to attack its users.
TODO Terminology: the OpenPGP community uses the term 'key' or 'public key'. Some draft text sections here try how "certificate" or "cert" for the same thing will read, coming from an idea with the Gpg4win Compendium to have a distinction between public and secret key-pair-element, unify the concept with the CMS world and be more friendly towards readers-without-crypto-experience.
How to find the cert?
We propose the following steps
- Ask the mail service provider of the recipient email address.
- If the MSP does not support the request: Ask a central fallback server for all email addresses. [ I do not like that approach because it shifts the responsibility from the mail address provider to some 3rd party. This raises all kind of problems and requires a central system for all users for all non-supportive mail providers. There are also legal problems with that, in particular in Germany -- Werner Koch 2016-05-04 16:12:19 ] [ I would like to move this to the discussion section and respond there. -- bernhard 2016-05-06 15:25:43 ] [ A wiki is not a useful service for developing ideas because you can't commment on topics. It is okay to use the for documents where there is a consensus - so, yes, please take this all to gnupg-devel -- Werner Koch 2016-05-09 13:41:26 ]
- If the fallback server fails, we may resort to trying a classic web of trust "cert server" (aka "key server"). [ This does not help in any way to find a key associated with a mail address ] [ I would like to move this to the discussion section and respond there. -- bernhard 2016-05-06 15:25:43 ]
Some discussion:
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
- a protocol to ask the MSP for the certificate of a specific email address
- a way for email applications to give, update, request deletion of their cert 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:
- they are easy to implement for a mail service provider, especially the larger it gets. Because that raises the chance of adoption.
- In addition they should not reveal the existence of email-addresses [ You can't avoid that Werner Koch ] [ Why not? An encrypted HTTPS request for one email-address to a mail service provider will not publish this address as opposed if I go to a public cert/key server. -- bernhard 2016-05-06 15:25:43 ].
- They are better if they are revealing less about who want to communicate with whom.
GnuPG 2.1.12 has experimental support for an upcoming draft "Web Key Directory key location service" based on the HTTPS query idea.
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:
- DNSSEC ist not fully deployed everywhere
- It is unclear if DNS can really handle millions of email addresses [ Nope: DNS can handle arbitrary amounts of data; the size of a data item is limited but not their numbers. -- Werner Koch 2016-05-04 16:12:19 ] [ In theory it is, but are DNS servers and caches ready for the request pattern with millions of emails and more frequent changes in practice? -- bernhard 2016-05-06 15:25:43 ]
- The decentral nature of DNS may leak more information than necessary. (Question could I protect email addresses with DNS?)
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. https://example.org/.well-known/openpgpkey/hu/XXXXX
Advantages for HTTPS are:
- well understood how to scale high
- no time-out delays
- request details protected by TLS connection, only leaks the information that user may want to communicate with some user of this domain.
- can also be used on the potential fallback server.
- (expected:) adding one more URL to a webservice can be technically separated nicely from other service, DNS may be couple more deeply. So it may be easier to convince MSP to try the HTTPS for a while than to add a very dynamic system to their DNS service which will be mission critical.
Management
Two ideas exist here, which need to be discussed and decided in finer detail:
- also use an HTTPS interface together with authentification
- use an email submission interface
Implementation ease on the server site probably depends on how easy it is to couple mail service credentials to the HTTPS or SMTPS service or insert some crypto processing for incoming emails. On client side the email handling interface also means the crypto component has to be able to send and intercept handling emails. [ Given that the whole thing is for MUAs, this is not a problem at all. -- Werner Koch 2016-05-04 16:12:19 ]
HTTPS may provide a faster feedback if my crypto setup is ready because of the online connection. [ Nope: Email verification requires sending and receiving of emails - regardless how it was initially triggered. -- Werner Koch 2016-05-04 16:12:19 ] [ I tend to disagree: Having the credential to access the email service for a specific user is equal to the ability to receive and send email over that address. -- bernhard 2016-05-06 15:25:43 ]
TODO further discussion.
Central fallback server
What if some mail service providers are slow on the uptake of this concept?
Would our archetype users consider switching to another email provider? Bob probably would, but the others?
The idea of a fallback server is to enable users to participate in the concept without direct support of their mail service provider. This is a main advantage to provide first value quickly to many email users.
But it comes at a number of potential drawbacks:
- A central service requires extra interaction for building the connection between email owner and corresponding cert. It basically becomes some sort of 'validating keyserver' with all of its security problems.
- The more percentage of certs it holds, the more valuable it becomes making it more and more a target for attacks, a single point of failure and harder to operate.
- It may diminish the motivation of MSP to implement the part of the service on their side, because it is already working.
Thus it is an open decision how to deal with a fallback server.
One path of action proposed by -- bernhard 2016-05-04 12:59:37 is to:
- operate the fallback server to bring value faster to people and show that the user experience side works on a wider scale.
- Publish statistics about the number of email addresses from certain mail user providers on the corresponding website.
- Approach mail service providers repeatedly if their email usage is growing over certain numbers.
- Put public limits in for the service in numbers and time. E.g. 2016-11-16: now that 100k user from example.com use the fallback server, we will provide access to them for another three month and after one month warning them of the discontinuing of the service. [ You missed the :-) ]
- Publicly announce mail service providers that are now offering the service on the same website.
- Help mail service providers to make it really easy to implement their part, e.g. by providing software components and migration support from the fallback server.
- (For being able to inform fallback server users of a change of service, there must be provisions when signing the users up that it is okay to do so later.)
Classic "key" (aka cert) servers
If we are back to this point, our of course this means our unattended use for sending the email will not work. 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 cert that I already "trust" to sign others ("validation"). Our choice is to offer the user the change to go to a more complex full-blown certificate management handling or to offer hints to contact the communication partner to adopt the scheme proposed here.
However asking cert servers can be a good idea to sometimes find revocation certificates for certs I already know. This is important if the earlier stages fail which is always a possibility in the near future. So a cert-server check is part of our proposed steps.
Future other services?
It is possible that other cert 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 cert validation via the public and seem to require more players to join to be more useful than the model proposed here.
TODO , e.g.
- https://github.com/google/end-to-end/wiki/Key-Distribution
- https://wiki.gnupg.org/OpenPGPEmailSummit201512?highlight=Transparent%20Keyservers
- https://coniks.cs.princeton.edu/
- https://github.com/yahoo/coname
- https://www.certificate-transparency.org/
- A research project about the legal angle of pub-key distribution (2016-01 to 2017-12 in de_DE): https://www.uni-kassel.de/fb07/institute/iwr/personen-fachgebiete/rossnagel-prof-dr/forschung/provet/vertrauenswuerdige-verteilung-von-verschluesselungsschluesseln.html linked from http://www.heise.de/newsticker/meldung/Bund-gibt-Foerdermittel-fuer-Selbstdatenschutz-frei-3224514.html