<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
  <channel>
    <title>til on Mister Muffin Blog</title>
    <link>http://blog.mister-muffin.de/tags/til/</link>
    <description>Recent content in til on Mister Muffin Blog</description>
    <generator>Hugo -- gohugo.io</generator>
    <language>en-us</language>
    <lastBuildDate>Mon, 31 Mar 2025 16:07:19 +0000</lastBuildDate><atom:link href="http://blog.mister-muffin.de/tags/til/index.xml" rel="self" type="application/rss+xml" />
    <item>
      <title>TIL: OpenPGP Web Key Directory</title>
      <link>http://blog.mister-muffin.de/2025/03/31/til-openpgp-web-key-directory/</link>
      <pubDate>Mon, 31 Mar 2025 16:07:19 +0000</pubDate>
      
      <guid>http://blog.mister-muffin.de/2025/03/31/til-openpgp-web-key-directory/</guid>
      <description>&lt;p&gt;Today I was looking for a way on how to best publish my OpenPGP key on my
webserver. Surely, somebody came up with some sort of standard way for where to
place that key, right? Turns out, they did:
&lt;a href=&#34;https://datatracker.ietf.org/doc/draft-koch-openpgp-webkey-service/&#34;&gt;https://datatracker.ietf.org/doc/draft-koch-openpgp-webkey-service/&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;The TLDR summary is, that my key can now be found here:&lt;/p&gt;
&lt;p&gt;&lt;a href=&#34;https://mister-muffin.de/.well-known/openpgpkey/hu/8yxgr5jjfok88r9um56kb44x9h4dyj7f&#34;&gt;https://mister-muffin.de/.well-known/openpgpkey/hu/8yxgr5jjfok88r9um56kb44x9h4dyj7f&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Or be downloadable by just running:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;$ gpg --locate-key josch@mister-muffin.de
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Where does the hash come from? It&amp;rsquo;s the local part of my email (josch) hashed
with sha1 and encoded in
&lt;a href=&#34;https://en.wikipedia.org/wiki/Base32#z-base-32&#34;&gt;z-base32&lt;/a&gt;. That computation
can be done by gpg:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;$ gpg --with-wkd-hash -k josch@mister-muffin.de | grep mister-muffin.de
[...]
8yxgr5jjfok88r9um56kb44x9h4dyj7f@mister-muffin.de
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;I exported the key that I put there using the following command:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;$ gpg --no-options --export --export-options export-minimal,export-clean \
    --export-filter keep-uid=&amp;quot;uid = Johannes Schauer Marin Rodrigues &amp;lt;josch@mister-muffin.de&amp;gt;&amp;quot; \
    F83356BBE112B7462A41552F7D5D8C60CF4D3EB4
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;There is a handy validator for such setups that can be found here:
&lt;a href=&#34;https://www.webkeydirectory.com&#34;&gt;https://www.webkeydirectory.com&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;I had an interesting debugging experience when I tried to verify my setup in a
fresh Debian chroot because I got this error message when I ran above command:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;gpg: directory &#39;/root/.gnupg&#39; created
gpg: keybox &#39;/root/.gnupg/pubring.kbx&#39; created
gpg: /root/.gnupg/trustdb.gpg: trustdb created
gpg: error retrieving &#39;josch@mister-muffin.de&#39; via WKD: General error
gpg: error reading key: General error
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;That&amp;rsquo;s not very descriptive&amp;hellip; Turns out, that I was missing the
&lt;code&gt;ca-certificates&lt;/code&gt; package. After installing it, everything worked as expected:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;$ gpg --locate-key josch@mister-muffin.de
gpg: key 7D5D8C60CF4D3EB4: public key &amp;quot;Johannes Schauer Marin Rodrigues &amp;lt;josch@mister-muffin.de&amp;gt;&amp;quot; imported
gpg: Total number processed: 1
gpg:               imported: 1
pub   rsa4096 2013-07-04 [SC]
      F83356BBE112B7462A41552F7D5D8C60CF4D3EB4
uid           [ unknown] Johannes Schauer Marin Rodrigues &amp;lt;josch@mister-muffin.de&amp;gt;
sub   rsa4096 2013-07-04 [E]
sub   rsa4096 2013-07-04 [S]
sub   rsa4096 2023-07-08 [S]
&lt;/code&gt;&lt;/pre&gt;
</description>
    </item>
    
  </channel>
</rss>
