Web Key Directory is a way to publish a GPG public key through WWW. This is currently the recommended way for publishing your public keys (keyservers are deprecated). What WKD means is that you can send PGP signed emails and your recipient will be able to verify your signature automatically because his mail client can find automatically your public key. It also means that people can immediately send an encrypted message to you, without having to find and download your public key, because their mail client knows where to find it and can do it automatically.
There are many ways for publishing your public to a WKD, and one of them (my preferred one) is Web Key Service. With this method your mail client can send your public key by email to a key-submission address on the mail server. The mail server will reply automatically with an encrypted confirmation message. Once you send the confirmation reply, the mail server will publish your key on the WKD.
I have implemented a mail server with WKD+WKS support and I have installed a testing instance of it for the domain
tst1.fs.al. If you want to test this mail server and its WKD+WKS support, this is what you should do:
Create a test account by sending a message to
firstname.lastname@example.org. In a few minutes you will receive a message with account details (username, password, SMTP server, etc.) This is a forward-only email account, which means that all emails that are sent to
email@example.com be forwarded to your real mail address. It will expire automatically in a week, but you can create another one if you need.
I recommend using Thunderbird+Enigmail for testing WKD+WKS. You should follow these steps:
- Create a new Outgoing Server (SMTP) with the details of the test server.
- Create a new identity with the details of the test account and the SMTP server created on the first step.
- Open Enigmail Key Management and generate a new PGP key for the identity created on the second step.
- On the Enigmail Key Management, select the new key that you just created, and select the menu option Upload to your provider’s Web Key Directory.
- Soon you should get a confirmation message from
Confirm your key publication. You will also see a button Confirm Request on it. Click this button to send the confirmation request.
- Finally you will get a notification from
Your key has been published.
To check that your key has been published try this command:
/usr/lib/gnupg/gpg-wks-client -v --check firstname.lastname@example.org
Also try to send an encrypted message to
email@example.com(which is my account). Enigmail should be able to find my public key automatically and you should not have to worry about finding and downloading it.
If you have experience with mailserver/postfix implementations, please also try to scrutinize the configuration of the mailserver docker-scripts / postfix · GitLab . I am sure it has some problems, because I am not sure that everything is correct. Please help me to find and fix any problems. If you are instead a hacker, just try to break or to exploit the test mailserver by using it in unexpected ways. I would appreciate if you find any problems and report it.
Happy #ilovefs day, and happy hacking.