IncreaseWKDUsage2021 bachelor thesis

Christoph Klassen is writing his bachelor thesis (at Intevation) about how usage of WKD can be furthered. Bernhard Reiter does the mentoring, see gnupg-devel@ for discussion and for contacting Christoph or Bernhard.

Started at 2021-10
End: 2022-02-18

Goal

In 2018 a survey was performed to find out how German think about encryption and if they are using it [1]. One question was: "Why are you not using end-to-end encryption yet?". The following graph illustrates the answers that were given:
gmx_web_survey_why_no_encryption.png

As the result of this survey shows many people think that encryption is a complicated process. Web Key Directory (WKD) is a procedure, whose goal it is to simplify the process of retrieving public keys. Because the retrieval is part of the encryption process WKD is also helpful to make encryption easier.
This work wants to spread WKD. For that it wants to answer the question "Which measurements can be used to spread the WKD-standard?". To find the answer different measurements which come from the software engineering will be applied.

Use Cases

In the first tests for this work it became obvious that the usability of WKD in different products isn't satisfying. Sometimes it was complicated to make the product ready for WKD or it was difficult to find out how to enable it. That is why it is important to simplify these aspects.
To do so I created two use cases in the first step. In the first case a user wants to write an encrypted email. In the second a user wants to check the signature of an email. In both cases the user is a random person because encryption should be easier for every person.
The basic thought which affected the use cases was the one of Krug [1]: Products should reduce the effort of using these products as far as possible. Users shouldn't think much about how to use an application but about how to reach their goals. So, in the created use cases the user has to take only an amount of steps that is really necessary.
Note: In the first use case the process of retrieving the pubkey is started automatically by the application while in the second case the user has to start the process manually. The reason for this is that every request to a WKD-server can give potential attackers some information. Also, not every information that was sent by email has such high importance that it is necessary to check the signature.
These use cases were written by using Cockburns template [2].

Use Case UC1: Write an encrypted email

Hints:

Goal: Sending a confidential message.
Precondition:

Success: An encrypted email was sent
Failure:

Actors: A random person
Trigger: Person A wants to write a confidential message to person B in a way that no other person can read the message's contents.
Description:

  1. Person A opens the email-client
  2. Person A opens the area to compose an email
  3. Person A enters address, subject and message
  4. Person A sends the email

Extensions:

  1. Person A checks, if the pubkey is trustworthy
  2. Person A checks, how trustworthy the pubkey is

Use Case UC2: Validate the signature of an email

Hints:

Goal: Check, if an email was written by person B.
Precondition:

Success: The signature of the email could be checked
Failure: The signature of the email could not be checked
Actors: A random person
Trigger: Person A receives an email with important information and wants to know, if it was really written by person B.
Description:

  1. Person A opens the email-client
  2. Person A opens the area with all received emails
  3. Person A opens a signed email
  4. Person A starts the verification of the signature
  5. Person A sees if the signature of the email is valid

Extensions:

  1. Person A checks, if the pubkey, which was used to check the signature of the received email, is trustworthy
  2. Person A checks, how trustworthy the pubkey is, which was used to check the signature of the received email
Activity diagram for use case #2:

use_case_2.png

Criteria for implementing WKD with a good usability

After finishing the use cases it is now possible to establish criteria which developer can use to improve the usability of their products.
WKD have a basic trust because they are fetched from WKD-servers that belong to email-providers. Reasons for that are that email-provider know that a pubkey belongs to an email-address and that email-providers usually have a higher security level than private persons who maintain a server. The criteria reflect this basic trust of WKD-keys.

Tests

This section describes the results of the tests. The tested products are only free software that is under active development and I tried to choose the most relevant products. The following table summarizes how far the products fulfill the criteria that were explained above.

Overview

Criterion\ProductClaws MailFairEmailK9MailKMailMailvelopeThunderbird
K1: The product is compatible to the last draft of the WKD-standard checkmark.png yes icon-error.png no icon-error.png no checkmark.png yes icon-error.png no icon-error.png no
K2: The product is ready for WKD without any preparations icon-error.png no icon-error.png no icon-error.png no icon-error.png no checkmark.png yes icon-error.png no
K3: WKD is offered in the area where users enter an email-address icon-error.png no icon-error.png no icon-error.png no checkmark.png yes checkmark.png yes icon-error.png no
K4: WKD is offered in the area where users check the signature of an email checkmark.png yes icon-error.png no icon-error.png no icon-error.png no attention.png no result icon-error.png no
K5: The product uses WKD automatically (compose) icon-error.png no icon-error.png no icon-error.png no checkmark.png yes checkmark.png yes icon-error.png no
K6: Product prefers WKD-keys, when there are only keys without information about their trust else (compose) icon-error.png no icon-error.png no checkmark.png yes icon-error.png no icon-error.png no icon-error.png no
K7: Product prefers WKD-keys, when there are only keys without information about their trust else (signature check) icon-error.png no icon-error.png no icon-error.png no icon-error.png no attention.png no result icon-error.png no
K8: The product distinguishes between keys without any information about their trust and keys with basic trust (compose) icon-error.png no icon-error.png no checkmark.png yes checkmark.png yes icon-error.png no icon-error.png no
K9: The product distinguishes between keys without any information about their trust and keys with basic trust (signature check) checkmark.png yes icon-error.png no checkmark.png yes checkmark.png yes attention.png no result checkmark.png yes
K10: Displays that WKD-keys have a basic trust (compose) icon-error.png no icon-error.png no icon-error.png no icon-error.png no icon-error.png no icon-error.png no
K11: Displays that WKD-keys have a basic trust (signature check) icon-error.png no icon-error.png no icon-error.png no icon-error.png no attention.png no result icon-error.png no
K12: Displays different levels of trust (compose) icon-error.png no icon-error.png no icon-error.png no icon-error.png no icon-error.png no icon-error.png no
K13: Displays different levels of trust (signature check) checkmark.png yes icon-error.png no icon-error.png no icon-error.png no attention.png no result checkmark.png yes

Mailvelope

Previous state (analyzed version 4.4.1)

Measures

Claws Mail

Previous state (analyzed version 3.18.0)

Measures

FairEmail/ K9Mail

Previous state

FairEmail

Previous state (analyzed version 1.1776)

Measures

K9Mail

Previous state (analyzed version 5.806)

KMail

Thunderbird

mail.de

The email-provider mail.de is a special case in this work because it represents the server-side of WKD and not the client-side as the other products.

Previous state

Measures

Implementation

This chapter explains, how it was decided, when to use the direct and when to use the advanced method in the new implementation for Mailvelope. Firefox offers the method browser.dns.resolve() to resolve a DNS-name. If the resolve was successful, the advanced method has to be used. In the other case it's the turn of the direct method. But, Chrome doesn't have this method. So, there has to be another way to decide between direct and advanced method. The alternative is to only use the method fetch().
On Chrome we try the advanced method at first (because it has the higher priority). If it's successful, we get a key and everything is fine. When there is an error, another decision has to be made. If the response contains a status code like 404, it is clear that the subdomain exists because the server does give an answer. But, there are also cases, in which a TypeError will be thrown and then we don't know, what the reason is. One option is that the subdomain exists, but the server is not reachable in that moment. Because we can't be sure, we just use the direct method.
The following image shows an activity diagram, where you can see the decisions that are made. implementation_mailvelope.png

Download of the bachelor thesis

Here you can download the bachelor thesis (German).

Sources

[1] S. Krug. Don’t make me think, Revisited: A Common Sense Approach to Web Usability, San Francisco, USA: Pearson Education, 2014.
[2] H. Balzert, Lehrbuch der Softwaretechnik: Basiskonzepte und Requirements Engineering, 3. Edition, Spektrum Akademischer Verlag Heidelberg: 2009

WKD/BachelorThesisIncreaseWKDUsage2021 (last edited 2023-09-18 08:31:21 by Christoph Klassen)