<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet href="https://shkspr.mobi/blog/wp-content/themes/edent-wordpress-theme/rss-style.xsl" type="text/xsl"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	    xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	     xmlns:dc="http://purl.org/dc/elements/1.1/"
	   xmlns:atom="http://www.w3.org/2005/Atom"
	     xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	  xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>
<channel>
	<title>pgp &#8211; Terence Eden’s Blog</title>
	<atom:link href="https://shkspr.mobi/blog/tag/pgp/feed/" rel="self" type="application/rss+xml" />
	<link>https://shkspr.mobi/blog</link>
	<description>Regular nonsense about tech and its effects 🙃</description>
	<lastBuildDate>Thu, 04 Sep 2025 06:48:35 +0000</lastBuildDate>
	<language>en-GB</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>https://wordpress.org/?v=6.9.4</generator>

<image>
	<url>https://shkspr.mobi/blog/wp-content/uploads/2023/07/cropped-avatar-32x32.jpeg</url>
	<title>pgp &#8211; Terence Eden’s Blog</title>
	<link>https://shkspr.mobi/blog</link>
	<width>32</width>
	<height>32</height>
</image> 
	<item>
		<title><![CDATA[An NFT without a Blockchain. No gas fees. No Eth. No gatekeepers]]></title>
		<link>https://shkspr.mobi/blog/2021/12/an-nft-without-a-blockchain-no-gas-fees-no-eth/</link>
					<comments>https://shkspr.mobi/blog/2021/12/an-nft-without-a-blockchain-no-gas-fees-no-eth/#comments</comments>
				<dc:creator><![CDATA[@edent]]></dc:creator>
		<pubDate>Sat, 18 Dec 2021 12:34:38 +0000</pubDate>
				<category><![CDATA[/etc/]]></category>
		<category><![CDATA[crypto]]></category>
		<category><![CDATA[nft]]></category>
		<category><![CDATA[pgp]]></category>
		<category><![CDATA[web3]]></category>
		<guid isPermaLink="false">https://shkspr.mobi/blog/?p=41166</guid>

					<description><![CDATA[This is a small proof-of-concept.  It relies on PGP - but you could use Keybase, GPG, or any other hard-to-use encryption program.  Background  Suppose you want to support an artist and give them money. That&#039;s easy. Most artists take PayPal, bank transfer, or cash. But how can you prove that you&#039;ve paid an artist for a specific piece of work?  That is, in essence, all an NFT is - the seller…]]></description>
										<content:encoded><![CDATA[<p>This is a small proof-of-concept.  It relies on PGP - but you could use Keybase, GPG, or any other hard-to-use encryption program.</p>

<h2 id="background"><a href="https://shkspr.mobi/blog/2021/12/an-nft-without-a-blockchain-no-gas-fees-no-eth/#background">Background</a></h2>

<p>Suppose you want to support an artist and give them money. That's easy. Most artists take PayPal, bank transfer, or cash. But how can you prove that you've paid an artist for a specific piece of work?  That is, in essence, all an NFT is - the seller signing a statement that the buyer has sent them money related to a thing.</p>

<p>Whether that claim can be meaningfully sold on to someone else is outside the scope of this discussion.</p>

<h2 id="the-artists-signature"><a href="https://shkspr.mobi/blog/2021/12/an-nft-without-a-blockchain-no-gas-fees-no-eth/#the-artists-signature">The artist's signature</a></h2>

<p>Most cryptographic schemes let a user digitally sign a file. Essentially, all this says is "this string of bits was seen by this user". It cannot say whether the signer was the person who <em>originally created</em> the file.</p>

<p>Here's an example.</p>

<pre><code class="language-_">-----BEGIN PGP SIGNED MESSAGE-----
I, Terence Eden, created &amp;quot;monkey.jpg&amp;quot; with a SHA512 hash of
123a887f3d5e7f246077eee40d0c073fa5ecad85d5b9bd130a87eb07408…
This token was created at 2021-12-25T01:02:03.5Z
-----BEGIN PGP SIGNATURE-----
Version: 1.2.3

456aae68585c9b176e06792396a08ad9ab92e335940e33c79ab69053a55e4f19…
-----END PGP SIGNATURE-----
</code></pre>

<p>Hey presto! Now the seller has a token - the above file - which offers strong proof that they were in possession of that exact <code>monkey.jpg</code> file.</p>

<p>(In reality, this would be a formal schema - JSON, ASN.1, XML, whatever - with lots of metadata. But for these examples, let's keep it simple and human readable.)</p>

<h2 id="the-transaction"><a href="https://shkspr.mobi/blog/2021/12/an-nft-without-a-blockchain-no-gas-fees-no-eth/#the-transaction">The transaction</a></h2>

<p>The sale can go via any medium. Cash in hand, PayPal, bank transfer, or even unregulated cryptocurrency. The problem with Blockchain is that you cannot guard against off-chain transactions. There's nothing to stop me buying an NFT for 100ETH and the seller immediately returning that to me in cash.</p>

<p>Here's how a buyer can create their own "receipt" saying that they purchased the above token:</p>

<pre><code class="language-_">-----BEGIN PGP SIGNED MESSAGE-----
I, Luke Skywalker, have purchased &amp;quot;monkey.jpg&amp;quot; with a SHA512 hash of
123a887f3d5e7f246077eee40d0c073fa5ecad85d5b9bd130a87eb07408…
And signed with
456aae68585c9b176e06792396a08ad9ab92e335940e33c79ab69053a55e4f19…
For 100ETH
This payment was sent at 2021-12-26T02:03:04.5Z
-----BEGIN PGP SIGNATURE-----
Version: 1.2.3

798a42cec24ff0cc40a9270a645f115c137625e1868563044adb139a1d0a3050…
-----END PGP SIGNATURE-----
</code></pre>

<p>The seller can verify the transaction once they have received the money:</p>

<pre><code class="language-_">-----BEGIN PGP SIGNED MESSAGE-----
I, Terence Eden, have sold &amp;quot;monkey.jpg&amp;quot; with a SHA512 hash of
123a5887f3d5e7f246077eee40d0c073fa5ecad85d5b9bd130a87eb07408…
And signed with
456aae68585c9b176e06792396a08ad9ab92e335940e33c79ab69053a55e4f19…
For 100ETH
To Luke Skywalker
With transaction signature
789a42cec24ff0cc40a9270a645f115c137625e1868563044adb139a1d0a3050…
This receipt was generated at 2021-12-27T02:03:04.5Z
-----BEGIN PGP SIGNATURE-----
Version: 1.2.3

000a7324409938862ff8006291b5471aef8c7ba4732a60e6823e77284d42cf17…
-----END PGP SIGNATURE-----
</code></pre>

<p>Ta-da! The buyer now has a chain of cryptographically signed, Non-Fungible Tokens, which shows that an artist claims to have created a file and claims to have received funds from the buyer.</p>

<p>Sure, you can pad it out with a bit more back-and-forth, adding promises to sell, more thorough metadata. You could even use a publicly agreed-on Merkle Tree to add a bit more "trust".</p>

<p>And that's how you mint an NFT with none of the baggage and none of the fees. Easy!</p>

<h2 id="problems"><a href="https://shkspr.mobi/blog/2021/12/an-nft-without-a-blockchain-no-gas-fees-no-eth/#problems">Problems</a></h2>

<p>But there are a few drawbacks with this.</p>

<p>Without a published chain of transactions, there is no guarantee that the artist hasn't sold the same item multiple times.</p>

<p>Without a verified on-chain transaction, there is a risk that either the buyer or the seller may be lying about the transaction price.</p>

<p>Because there are no third-parties involved, there is no opportunity for escrow or complaint resolution.</p>

<p>To be clear - <em>all</em> of these problems are also present in "traditional" NFTs. Buyers have no idea of the provenance of the piece, there's nothing stopping multiple sales of visually identical artworks, scams are rife and smart-contracts are buggy.</p>

<p>But if you want to create an Non-Fungible Token - there's no reason to pay inflated "gas" fees. You don't need any centralised brokers or platforms. You can own your own ledger and be completely decentralised for free.</p>

<p>Web3 should be about <em>you</em> being in control - not endlessly paying micro-transactions to hundreds of gatekeepers.</p>

<h2 id="update"><a href="https://shkspr.mobi/blog/2021/12/an-nft-without-a-blockchain-no-gas-fees-no-eth/#update"><ins datetime="2021-12-30T14:25:19+00:00">Update</ins></a></h2>

<p>Siyuan Ma has built a <a href="https://smy20011.github.io/ChainlessNFT/">Proof of Concept Chainless NFT</a></p>
<img src="https://shkspr.mobi/blog/wp-content/themes/edent-wordpress-theme/info/okgo.php?ID=41166&HTTP_REFERER=RSS" alt="" width="1" height="1" loading="eager">]]></content:encoded>
					
					<wfw:commentRss>https://shkspr.mobi/blog/2021/12/an-nft-without-a-blockchain-no-gas-fees-no-eth/feed/</wfw:commentRss>
			<slash:comments>13</slash:comments>
		
		
			</item>
		<item>
		<title><![CDATA[PGP Sign Your Twitter Messages]]></title>
		<link>https://shkspr.mobi/blog/2020/05/pgp-sign-your-twitter-messages/</link>
					<comments>https://shkspr.mobi/blog/2020/05/pgp-sign-your-twitter-messages/#comments</comments>
				<dc:creator><![CDATA[@edent]]></dc:creator>
		<pubDate>Thu, 14 May 2020 11:01:25 +0000</pubDate>
				<category><![CDATA[/etc/]]></category>
		<category><![CDATA[encryption]]></category>
		<category><![CDATA[pgp]]></category>
		<category><![CDATA[twitter]]></category>
		<guid isPermaLink="false">https://shkspr.mobi/blog/?p=35060</guid>

					<description><![CDATA[I&#039;m not sure if I&#039;m the first person to do this - but I&#039;m going to claim credit anyway!  Terence Eden is on Mastodon@edentHello! This Tweet has been signed with my PGP Key. pic.x.com/ed4rcldlvw❤️ 35💬 7🔁 008:03 - Thu 14 May 2020  You can verify by pasting the alt text into keybase.io/verify - or by using your favourite command line tool.  Back in 2017, I wondered if Twitter&#039;s alt text could be (ab)…]]></description>
										<content:encoded><![CDATA[<p>I'm not sure if I'm the first person to do this - but I'm going to claim credit anyway!</p>

<blockquote class="social-embed" id="social-embed-1260843046553387009" lang="en" itemscope="" itemtype="https://schema.org/SocialMediaPosting"><header class="social-embed-header" itemprop="author" itemscope="" itemtype="https://schema.org/Person"><a href="https://twitter.com/edent" class="social-embed-user" itemprop="url"><img class="social-embed-avatar social-embed-avatar-circle" src="data:image/webp;base64,UklGRkgBAABXRUJQVlA4IDwBAACQCACdASowADAAPrVQn0ynJCKiJyto4BaJaQAIIsx4Au9dhDqVA1i1RoRTO7nbdyy03nM5FhvV62goUj37tuxqpfpPeTBZvrJ78w0qAAD+/hVyFHvYXIrMCjny0z7wqsB9/QE08xls/AQdXJFX0adG9lISsm6kV96J5FINBFXzHwfzMCr4N6r3z5/Aa/wfEoVGX3H976she3jyS8RqJv7Jw7bOxoTSPlu4gNbfXYZ9TnbdQ0MNnMObyaRQLIu556jIj03zfJrVgqRM8GPwRoWb1M9AfzFe6Mtg13uEIqrTHmiuBpH+bTVB5EEQ3uby0C//XOAPJOFv4QV8RZDPQd517Khyba8Jlr97j2kIBJD9K3mbOHSHiQDasj6Y3forATbIg4QZHxWnCeqqMkVYfUAivuL0L/68mMnagAAA" alt="" itemprop="image"><div class="social-embed-user-names"><p class="social-embed-user-names-name" itemprop="name">Terence Eden is on Mastodon</p>@edent</div></a><img class="social-embed-logo" alt="Twitter" src="data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%0Aaria-label%3D%22Twitter%22%20role%3D%22img%22%0AviewBox%3D%220%200%20512%20512%22%3E%3Cpath%0Ad%3D%22m0%200H512V512H0%22%0Afill%3D%22%23fff%22%2F%3E%3Cpath%20fill%3D%22%231d9bf0%22%20d%3D%22m458%20140q-23%2010-45%2012%2025-15%2034-43-24%2014-50%2019a79%2079%200%2000-135%2072q-101-7-163-83a80%2080%200%200024%20106q-17%200-36-10s-3%2062%2064%2079q-19%205-36%201s15%2053%2074%2055q-50%2040-117%2033a224%20224%200%2000346-200q23-16%2040-41%22%2F%3E%3C%2Fsvg%3E"></header><section class="social-embed-text" itemprop="articleBody">Hello! This Tweet has been signed with my PGP Key. <a href="https://x.com/edent/status/1260843046553387009/photo/1">pic.x.com/ed4rcldlvw</a><div class="social-embed-media-grid"><a href="https://pbs.twimg.com/media/EX9qBYDWkAYXoRI.png" class="social-embed-media-link"><img class="social-embed-media" alt="-----BEGIN PGP MESSAGE-----owEBiQJ2/ZANAwAKAQANBfZAVXxiAaxCYgloZWxsby50eHRevPpiSGVsbG8hIFRoaXMgVHdlZXQgaGFzIGJlZW4gc2lnbmVkIHdpdGggbXkgUEdQIEtleS4KiQIzBAABCgAdFiEElXlidvK3tmz3lFI+AA0F9kBVfGIFAl68+mIACgkQAA0F9kBVfGKU+xAAvNwYDOtyC+FClbyVvJdh8Hyq7SmVBkHWijdHpyiPqvY0jAvnMkRunjwfSrG2FCmfh42FP9oT0JQMfNyXxmSKSjLzOIHwltag/QyR/hOfVfqUJW04Qwld/MdJgaAaj8bbuuwMHX1WyQJ7K+Kb6fWLKqGoJK7p5e02uuHa46ITSaybH4b1kcjGSOQkLWXOcI7kfXcD3doevjc+6tTly4+EuLxJlNBzbfrH9JaFkn2x9ScPT29t+WollLD8tDhErExgrRvimkQP+UPEk2/HWA1Z+My5miVFoDbCILMUUnL+UVWGPBeWEurht/rM6uBEDoE7MlRQPbhnbu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nmrVmE0IpHqqwoOyHXyXzBLcIVuZ5R4sWwS4oNM10S/gfwWpufuhtY4nJB7RLiFay1rGlhY6Rv6Ar3ZBe+uOplVuHOIyVAiMp/fkkuPPEBrjesHjutnsNA0pzeGsDN6VfNA//TxN3vAv++WSb/6Geneq6aUbt2T44pSBHV6la2yVMcX4etx47VDei7qL9AvOMJ0APkPAxD1nPKfGw6O8r1NYe42BNknJSdVPSsY6+iNjBgA3Wukl5YqKHQ6Dk39JEH2eR9napK3nhvKOJG4Bog5CxzkKtcze5ZkmcQqLJXu0j1fo+Z/RkX33HImhrwXHLDwPUKj/BJ9BaARwBhPp7iaIzWuNHg3vEPCTVUlSIHn9U/zgbbQhTPGxKTEjSsM2jVqb2PTAczGXJp+CGZcoq6ul/XngFzTybJ05DnLCEX3dfYoVfG+Pfojt4GvZDZPD3vzqsTSSBtTuDxHORZxtRpBpUS6OKpbjmzzu1yl8W4EJsej2K9+iKFxoc22sjSa8BwZJML14UCWHWpQOVJQo2Sp6ffNGeOz6ctoS0ssPVQZne8B2m/VKIfL3QL6Dv3u96AaKZdSlb/XL8SNG3pU+CwSyWeRLbfrGwv9hqP2QCjHLP5rJ723Tvz7e+25JVLk1wb3iHhJqqSpjn5/Wp58eIoQpyDAOFX87/uXPj+DRkac834P2ZtJrD5fUk3TjG8rViF9BU//CBjnwghJz8vjCHTX6ibcnfkUJt3p4sHLFdFiwZp4byLAMO44pU9DfSmTRYX7ODbx7AcddDWlgAzTpJnbrnBV6KyBPi1yWzwLKJ7HHti1M6x4gAAAAA=="></a></div></section><hr class="social-embed-hr"><footer class="social-embed-footer"><a href="https://twitter.com/edent/status/1260843046553387009"><span aria-label="35 likes" class="social-embed-meta">❤️ 35</span><span aria-label="7 replies" class="social-embed-meta">💬 7</span><span aria-label="0 reposts" class="social-embed-meta">🔁 0</span><time datetime="2020-05-14T08:03:02.000Z" itemprop="datePublished">08:03 - Thu 14 May 2020</time></a></footer></blockquote>

<p>You can verify by pasting the alt text into <a href="https://keybase.io/verify">keybase.io/verify</a> - or by using your favourite command line tool.</p>

<p>Back in 2017, <a href="https://twitter.com/edent/status/912949159090688002">I wondered if Twitter's alt text could be (ab)used to store message metadata</a> like a PGP signature. Sadly, the <a href="https://blog.twitter.com/developer/en_us/a/2016/alt-text-support-for-twitter-cards-and-the-rest-api.html">limit was 420 characters</a> per image.</p>

<p>At some point in the last few months, <a href="https://developer.twitter.com/en/docs/media/upload-media/api-reference/post-media-metadata-create">Twitter quietly upped the alt text limit to 1,000 characters per image</a>.</p>

<p><a href="https://developer.twitter.com/en/docs/media/upload-media/api-reference/post-media-metadata-create"><img src="https://shkspr.mobi/blog/wp-content/uploads/2020/05/Screenshot_2020-05-14-POST-media-metadata-create.png" alt="Twitter's documentation showing the new character limit." width="715" height="310" class="aligncenter size-full wp-image-35062"></a></p>

<p>So, if you <code>pgp --sign</code> some text, you can paste the result into the alt text field on Twitter. If I had time, I'd create a Twitter client to do this for you automagically.</p>

<p>I pointed out in 2015 that <a href="https://shkspr.mobi/blog/2015/09/pgp-encrypt-twitter-dms-with-keybase/">Twitter Direct Messages were long enough for PGP encrypted messages</a>.</p>

<p>Nowadays, Tweets can contain 280 characters in their body + 4,000 characters of image metadata - that should be more than long enough for a PGP encrypted Tweet.</p>

<p>Of course, due to the "<a href="https://shkspr.mobi/blog/2015/11/a-polite-way-to-say-ridiculously-complicated/">baroque</a>" nature of PGP, there's a fair chance I've messed this up some how!</p>

<p>(NB - alt text is really important for visually impaired users. Please don't needlessly clutter their timeline with garbage.)</p>
<img src="https://shkspr.mobi/blog/wp-content/themes/edent-wordpress-theme/info/okgo.php?ID=35060&HTTP_REFERER=RSS" alt="" width="1" height="1" loading="eager">]]></content:encoded>
					
					<wfw:commentRss>https://shkspr.mobi/blog/2020/05/pgp-sign-your-twitter-messages/feed/</wfw:commentRss>
			<slash:comments>3</slash:comments>
		
		
			</item>
		<item>
		<title><![CDATA[Things For Which Cryptographic Signing Would Be Useful]]></title>
		<link>https://shkspr.mobi/blog/2018/05/things-for-which-cryptographic-signing-would-be-useful/</link>
					<comments>https://shkspr.mobi/blog/2018/05/things-for-which-cryptographic-signing-would-be-useful/#comments</comments>
				<dc:creator><![CDATA[@edent]]></dc:creator>
		<pubDate>Sun, 27 May 2018 14:26:30 +0000</pubDate>
				<category><![CDATA[/etc/]]></category>
		<category><![CDATA[blockchain]]></category>
		<category><![CDATA[cryptography]]></category>
		<category><![CDATA[pgp]]></category>
		<guid isPermaLink="false">https://shkspr.mobi/blog/?p=29644</guid>

					<description><![CDATA[Every time someone mentions BlockChain, I have to down my drink. Those are the rules.  You see, most uses of Distributed Ledger are really just a way to get people interested in cryptographic signing. There&#039;s lots of money and attention flowing to projects which have no need to publish to an energy-inefficient global database.  They would be better suited to public-key cryptography.  Let me give…]]></description>
										<content:encoded><![CDATA[<p>Every time someone mentions BlockChain, I have to down my drink. Those are the rules.</p>

<p>You see, <em>most</em> uses of Distributed Ledger are really just a way to get people interested in cryptographic signing. There's lots of money and attention flowing to projects which have no need to publish to an energy-inefficient global database.  They would be better suited to public-key cryptography.</p>

<p>Let me give you an example, then we'll dive in to some details.</p>

<p>Recently, I needed to prove that I went to University.  How did I do it?  I rang up the alumni department, paid for a copy of my transcript, they posted it to me printed on high quality paper, I scanned it and emailed it to the person who wanted it.  I've no idea if anyone checked if it was legitimate.</p>

<p>This is fragile nonsense!</p>

<p>In an Internet-connected world, sending forgeable bits of paper around is just daft.  All the university need to do was publish something like this:</p>

<pre><code class="language-text">-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256

I confirm that Terence Eden studied at Example University 1998-2002 
earning a 2.1 in Advanced Drinking
-----BEGIN PGP SIGNATURE-----

wsFcBAEBCAAQBQJbCnsECRAADQX2QFV8YgAA6swQAHTZ2jtR2x5bK1oX+shZK0SM
1EXIWvBN0ECzeFsY86AtL4bd9qTKwpjgWPsPN4NSh7Rpg2xvgLTKIdFWSsMsWTrw
QPtKiaFbYa/1Cah8uBV6rSJOodKXRGveni9vojpjT1fUZ0APhzhLbki6mvfwMquq
IWQwqgEAp4odp8Yv98sIXvSKlc/f7Y4XDYmCyapPaoNDOpzXsROSuQIqaLqrTrjf
D/U+fTQrKSx9LqsW7KLgb3dfBPXVOjBmFdCn+iNJjVMF1GLNk0fjWsUu3oy4vvrX
9SCoM5TzCxBRdGZpVmrvOSr0hg5Rmx7VRXfVhUj4/kfaM2s0NWxGr0rBMzRYsl1o
OLDplZqhYxcHI3XivfFTAwZY7UZvCPnNJCQCFDtpFnRgdpq97Lynj2cF6u9gU/gL
Kb3cTeut2uHtMJAG7DN3tpQMLWDrbX96eXDB64zD73gfOyXrbjivSStSlCC8VrmU
njkc3393qiYW9AF9zKtYo8x/9n0/WhO6kSW0Mt/V6LdIhqFVqHyWZqh6vRAtfNIf
W80OR/dKtXSBYZgmg72/pgZBNeBne9lL+Nd4I/MlVzmC96fI+jkoeXO0cZanXWRm
2JoW+7R8I8de4PS9fjTMl8fVgEAsWFXjMUas0fJu4POxQDoSIaSEGxYJvTc01lGS
tzdqLOC6zBKeS6ndUFdH
=kSYS
-----END PGP SIGNATURE-----
</code></pre>

<p>Now, perhaps it needs to be cross-signed with a <a href="https://en.wikipedia.org/wiki/Trusted_timestamping">Trusted Timestamp Server</a> or possibly incorporating my signing key as well - but the basics are there.  Either stick that up on a website, or email it to anyone who wants to check my qualifications.</p>

<p>No Merkle-Trees or paying vastly inflated transaction fees.  Just a document which has been signed by the issuer and can be validated as legitimate.  Why do you need anything else?  Public key signature systems are quick, simple, and cheap.  Pick any three!</p>

<p>The best part is... this technology is <em>already</em> in use!  If you have a modern passport, it contains an RFID chip which holds data about you.  These <a href="https://www.researchgate.net/figure/Overview-of-data-signed-and-stored-in-e-passports-chip_fig1_221406395">biometric data are cryptographically signed</a>.  It uses a PKI solution to ensure no one has tampered with the information.</p>

<h2 id="potential-uses"><a href="https://shkspr.mobi/blog/2018/05/things-for-which-cryptographic-signing-would-be-useful/#potential-uses">Potential Uses</a></h2>

<p>Feel free to add more in the comments section.</p>

<ul>
<li>Qualifications

<ul>
<li>Example University confirms that I have this qualification.</li>
</ul></li>
<li>Work history / employment references

<ul>
<li>Big Corp verifies that I was employed from these dates in this position.</li>
</ul></li>
<li>Customer verification

<ul>
<li>Energy Company confirms I am a current customer.</li>
</ul></li>
<li>Nuclear Launch Codes

<ul>
<li>This order is legitimate and has been cross-signed by at least 3 members of the of the command chain.</li>
</ul></li>
<li>Medicine Licencing

<ul>
<li>This drug is approved by this regulator in this territory.</li>
</ul></li>
<li>Legislation

<ul>
<li>This amendment to that law was published by this legislature.</li>
</ul></li>
<li>Prison sentences

<ul>
<li>This Judge issued this sentence on that person.</li>
</ul></li>
<li>Food

<ul>
<li>The farm that provided this food has been certified as an organic farm by this inspector.</li>
</ul></li>
<li>Statements

<ul>
<li>This document was written by that author and published by that organisation.</li>
</ul></li>
<li>Prescriptions

<ul>
<li>This doctor from that surgery prescribes these drugs to that patient.</li>
</ul></li>
<li>Credit History

<ul>
<li>This mortgage has been provided to that person and they have paid off 10% of it.</li>
</ul></li>
</ul>

<h2 id="downsides"><a href="https://shkspr.mobi/blog/2018/05/things-for-which-cryptographic-signing-would-be-useful/#downsides">Downsides</a></h2>

<p>This is a technological solution to the human problem of trust.</p>

<p>Firstly, there's no guarantee that people will <em>actually</em> verify the message - as this XKCD Cartoon puts so succinctly.</p>

<p><a href="https://xkcd.com/1181/"><img src="https://shkspr.mobi/blog/wp-content/uploads/2018/05/pgp.png" alt="How to use PGP to verify that an email is authentic: Look for this text at the top  [In mail header, light grey.] Reply [Highlighted, with arrow pointing to it from the text &quot;Look for this text at the top&quot; above.]     -----BEGIN PGP SIGNED MESSAGE-----     [In mail message, light grey.]     HASH: SHA256     Hey,     First of all, thanks for taking care of      [After mail message.]     If it's there, the email is probably fine." width="588" height="458" class="aligncenter size-full wp-image-29647"></a></p>

<p>Secondly, there's no guarantee that people will actually have <em>the software</em> to verify the message - <a href="https://www.wired.com/story/us-border-patrol-hasnt-validated-e-passport-data-for-years/">US Border Patrol are <em>still</em> unable to verify e-Passports</a>.</p>

<p>Thirdly, there's no guarantee that keys won't be stolen or broken in the future.  One (small) advantage of a Distributed Ledger is that you can verify <em>when</em> a claim was published.  Assuming <a href="https://www.multichain.com/blog/2017/05/blockchain-immutability-myth/">a malicious party hasn't found yet another weakness in the technology</a>.</p>

<p>Fourthly, a claim once issued is hard to revoke.  If my university discovers I cheated in an exam, of if a company mistakenly says I am their customer - how do you issue a notice of revocation?  If a corrupt employee is bribed to make a fake claim about me, it could be impossible to backtrack.
Again, this problem isn't solved by putting claims on a BlockChain.</p>

<p>Finally, there's no guarantee that people will <em>understand</em> what verification means.</p>

<p>Just because I present you evidence that "Terence Eden" has a qualification, that doesn't mean that I <em>am</em> Terence Eden. Or even the <em>same</em> Terence Eden mentioned.</p>

<p>Just because the label on a box of baby-milk claims that the supply chain has been verified, it does not mean that the contents are unadulterated with plastic.</p>

<p>Which leads us back to the start.  We can make verifiable claims - but will anyone care?  In a world where <a href="https://shkspr.mobi/blog/2018/04/what-is-a-signature/">a scrawled ink signature is seen as the ultimate proof of truth</a> and <a href="https://shkspr.mobi/blog/2018/04/tools-to-defeat-fake-news-reverse-image-search/">easily debunked forgeries are treated as genuine news</a> how do we convince people to care about verification?</p>
<img src="https://shkspr.mobi/blog/wp-content/themes/edent-wordpress-theme/info/okgo.php?ID=29644&HTTP_REFERER=RSS" alt="" width="1" height="1" loading="eager">]]></content:encoded>
					
					<wfw:commentRss>https://shkspr.mobi/blog/2018/05/things-for-which-cryptographic-signing-would-be-useful/feed/</wfw:commentRss>
			<slash:comments>1</slash:comments>
		
		
			</item>
		<item>
		<title><![CDATA[PGP Encrypt Twitter DMs with Keybase]]></title>
		<link>https://shkspr.mobi/blog/2015/09/pgp-encrypt-twitter-dms-with-keybase/</link>
					<comments>https://shkspr.mobi/blog/2015/09/pgp-encrypt-twitter-dms-with-keybase/#comments</comments>
				<dc:creator><![CDATA[@edent]]></dc:creator>
		<pubDate>Fri, 04 Sep 2015 10:51:25 +0000</pubDate>
				<category><![CDATA[Security]]></category>
		<category><![CDATA[encryption]]></category>
		<category><![CDATA[pgp]]></category>
		<category><![CDATA[security]]></category>
		<category><![CDATA[twitter]]></category>
		<guid isPermaLink="false">https://shkspr.mobi/blog/?p=21363</guid>

					<description><![CDATA[This is a quick tutorial on how to encrypt your Twitter messages using PGP with the help of Keybase.io.  I read an article yesterday which seemed to imply that Twitter was mangling PGP encrypted messages (albeit unintentionally).  There is a minor bug in Twitter&#039;s web interface - but PGP seems to work perfectly in apps. So, I want to demonstrate how it can be done successfully.  I&#039;ve written this …]]></description>
										<content:encoded><![CDATA[<p>This is a quick tutorial on how to encrypt your Twitter messages using PGP with the help of <a href="https://Keybase.io">Keybase.io</a>.</p>

<p>I <a href="https://www.vice.com/en/article/how-to-encrypt-your-twitter-dms/">read an article yesterday which seemed to imply that Twitter was mangling PGP encrypted messages</a> (albeit <a href="https://web.archive.org/web/20200924204727/https://twitter.com/runasand/status/632225743880237056">unintentionally</a>).</p>

<p>There is a minor bug in Twitter's <strong>web</strong> interface - but PGP seems to work perfectly in apps. So, I want to demonstrate how it can be done successfully.</p>

<p>I've written this article with a non-technical audience in mind - feel free to point out any areas where I can make my explanations more simple.</p>

<h2 id="get-my-public-key"><a href="https://shkspr.mobi/blog/2015/09/pgp-encrypt-twitter-dms-with-keybase/#get-my-public-key">Get My Public Key</a></h2>

<p>Suppose you want to send me a message - but you are worried about the contents being seen by someone else.  If you encrypt the message to me, only I will be able to read it.  In order to encrypt, you need to know my <em>Public Key</em>.  This is a digital lock which only I can open.</p>

<p>The website <a href="https://Keybase.io">Keybase.io</a> contains a list of people's public keys.  You can visit <a href="https://Keybase.io/edent">Keybase.io/edent</a> to see mine.</p>

<img src="https://shkspr.mobi/blog/wp-content/uploads/2015/09/edent-keybase-fs8.png" alt="edent keybase-fs8" width="874" height="770" class="aligncenter size-full wp-image-21365">

<h2 id="encrypt-the-message"><a href="https://shkspr.mobi/blog/2015/09/pgp-encrypt-twitter-dms-with-keybase/#encrypt-the-message">Encrypt The Message</a></h2>

<p>Keybase gives you the option of encrypting a message to me.  Just type what you want to send and hit the "Encrypt" button.
<img src="https://shkspr.mobi/blog/wp-content/uploads/2015/09/edent-encrypt-keybase-fs8.png" alt="edent encrypt keybase-fs8" width="874" height="707" class="aligncenter size-full wp-image-21367"></p>

<p>Hey presto!  A big blob of text which can only be decrypted by me.</p>

<img src="https://shkspr.mobi/blog/wp-content/uploads/2015/09/edent-keybase-encrypted-text-fs8.png" alt="edent keybase encrypted text-fs8" width="874" height="770" class="aligncenter size-full wp-image-21366">

<h2 id="send-the-message"><a href="https://shkspr.mobi/blog/2015/09/pgp-encrypt-twitter-dms-with-keybase/#send-the-message">Send The Message</a></h2>

<p>It's as simple as copying the entire block of encrypted text and pasting it into a Twitter Direct Message.
<img src="https://shkspr.mobi/blog/wp-content/uploads/2015/09/edent-Twitter-pgp-fs8.png" alt="edent Twitter pgp-fs8" width="874" height="770" class="aligncenter size-full wp-image-21364"></p>

<p>Ok! Stop! There is a <em>minor</em> problem here.  In order for PGP encrypted messages to work, it is important that they are not altered in <strong>any</strong> way.  A rogue space, or missed character, will render the message completed undecipherable.</p>

<p>Some Twitter clients will "helpfully" remove line breaks.  A proper PGP message should look like this:</p>

<pre>-----BEGIN PGP MESSAGE-----
Version: Keybase OpenPGP v2.0.43
Comment: https://keybase.io/crypto

wcFMAz8xGBvPCGIHAQ//aaPuyglRhwo0hzeVuyDC8pgIGyS7f5oyp99wMRsIh8G0
i6kuo9+dPVNJ+gGLC2B5eMuoYE0Bjv/2YfBkxaJ6HTacniUEgD9x7OxNnQY2PCyi
</pre>

<p>Not like this:</p>

<pre>-----BEGIN PGP MESSAGE----- Version: Keybase OpenPGP v2.0.43 Comment: https://keybase.io/crypto  wcFMAz8xGBvPCGIHAQ//aaPuyglRhwo0hzeVuyDC8pgIGyS7f5oyp99wMRsIh8G0 i6kuo9+dPVNJ+gGLC2B5eMuoYE0Bjv/2YfBkxaJ6HTacniUEgD9x7OxNnQY2PCyi</pre>

<p>The Twitter website preserve newlines when you send a message - make sure that your app also does so.</p>

<h2 id="a-word-about-message-length"><a href="https://shkspr.mobi/blog/2015/09/pgp-encrypt-twitter-dms-with-keybase/#a-word-about-message-length">A Word About Message Length</a></h2>

<p>Twitter touts DMs as being "unlimited" - in reality, there's a limit of 10,000 characters.  PGP is a relatively efficient way of encrypting text so, depending on your message, you can fit around 9,000 plain text characters into a 10,000 character encrypted message.</p>

<p>In addition, <a href="https://support.twitter.com/articles/15364#">you may only send up to 1,000 Direct Messages per day</a>.</p>

<p>So, no DMing Harry Potter length novels!</p>

<h2 id="decrypting"><a href="https://shkspr.mobi/blog/2015/09/pgp-encrypt-twitter-dms-with-keybase/#decrypting">Decrypting</a></h2>

<p>Ok, this is where it gets a bit more technical.</p>

<p>It should be fairly easy to decrypt a message that you have been sent - but it will depend on your Twitter client.</p>

<p>When copying from a browser, it is possible that newlines will not be preserved - this may cause your decryption app to think that the message is corrupted.</p>

<p>This <em>is</em> a bug with Twitter's web and mobile-web sites.  I've reported it to them.  I think they should be encoding \n as <code>&lt;br/&gt;</code> to facilitate copying and pasting.
<img src="https://shkspr.mobi/blog/wp-content/uploads/2015/09/Twitter-PGP-no-linebreaks-fs8.png" alt="Twitter PGP no linebreaks-fs8" width="665" height="537" class="aligncenter size-full wp-image-21371"></p>

<p>I've found that copying from apps (on Android) preserves all the line breaks and keeps the formatting intact.</p>

<p><img src="https://shkspr.mobi/blog/wp-content/uploads/2015/09/OpenKeyChain-fs8.png" alt="OpenKeyChain-fs8" width="480" height="773" class="alignleft size-full wp-image-21374">On Android, I use <a href="https://www.openkeychain.org/">OpenKeyChain</a>.  I copy the message from my Twitter client and OpenKeyChain can decrypt directly from my phone's clipboard.</p>

<p>You can also use Keybase to host your private key and decrypt messages in the browser. <a href="https://github.com/keybase/keybase-issues/issues/160">This is at your own risk</a>.</p>

<p>That's really all there is to it.  I've successfully exchanged encrypted messages with several people.  The only problems have occurred when trying to copy the message from the Twitter web interface - when using apps everything has been fine.</p>

<p>Obviously, this isn't a fully automated solution (yet!) it would be great if Keybase allowed users to send encrypted DMs directly from its site - or if apps could start offering this natively.</p>

<p><a href="https://web.archive.org/web/20200915130113/https://gist.github.com/colinmahns/e3c38c5eae6c4bf6441d">Colin Mahns has written an excellent tutorial</a> for how to integrate OTR (a different encryption protocol) into messaging apps which can work with Twitter.</p>

<p>But, for now, if you want to encrypt a message to me, you can successfully do so using nothing other than a web-browser and a Twitter account.</p>

<p>Have fun!</p>

<hr style="clear:both;">

<p><ins datetime="2015-11-25T12:08:29+00:00">Update!</ins>
It's possible to send encrypted DMs directly from a website or the command line.</p>

<p>Using <a href="https://dev.twitter.com/web/intents">Twitter Web Intents</a> it's possible to send a Direct Message.  If your message starts <code>D edent</code> it will be converted into a DM to me.</p>

<p>So, if we URL Encode the message we want to send:</p>

<pre>https://twitter.com/intent/tweet?text=D%20edent%20testing</pre>

<p>We can pre-populate the compose window with the DM.</p>

<img src="https://shkspr.mobi/blog/wp-content/uploads/2015/09/Long-DM-PGP-fs8.png" alt="Long DM PGP-fs8" width="840" height="362" class="aligncenter size-full wp-image-22039">

<p>It <em>looks</em> like the message is too long - but the "Tweet" button works and it will be sent to the user:</p>

<img src="https://shkspr.mobi/blog/wp-content/uploads/2015/09/Long-DM-PGP-Inbox-fs8.png" alt="Long DM PGP Inbox-fs8" width="789" height="231" class="aligncenter size-full wp-image-22038">

<p>Hopefully Twitter will one day make it slightly easier - but for now, at least it works!</p>
<img src="https://shkspr.mobi/blog/wp-content/themes/edent-wordpress-theme/info/okgo.php?ID=21363&HTTP_REFERER=RSS" alt="" width="1" height="1" loading="eager">]]></content:encoded>
					
					<wfw:commentRss>https://shkspr.mobi/blog/2015/09/pgp-encrypt-twitter-dms-with-keybase/feed/</wfw:commentRss>
			<slash:comments>1</slash:comments>
		
		
			</item>
		<item>
		<title><![CDATA[Don't Use Bit.ly To Advertise Your PGP Key]]></title>
		<link>https://shkspr.mobi/blog/2015/03/dont-use-bit-ly-to-advertise-your-pgp-key/</link>
					<comments>https://shkspr.mobi/blog/2015/03/dont-use-bit-ly-to-advertise-your-pgp-key/#comments</comments>
				<dc:creator><![CDATA[@edent]]></dc:creator>
		<pubDate>Wed, 25 Mar 2015 11:45:14 +0000</pubDate>
				<category><![CDATA[Security]]></category>
		<category><![CDATA[email]]></category>
		<category><![CDATA[guardian]]></category>
		<category><![CDATA[hacking]]></category>
		<category><![CDATA[pgp]]></category>
		<category><![CDATA[security]]></category>
		<guid isPermaLink="false">https://shkspr.mobi/blog/?p=20761</guid>

					<description><![CDATA[I had dinner with the outgoing editor of The Guardian the other night. Clever chap, sure he&#039;ll go far in life.  The Guardian is very hot on security.  Many of their writers have PGP keys which they publicly advertise.  In theory, that&#039;s great (complaints about PGP notwithstanding) - but the reality shows just how tricky it is to act in a security conscious manner.  Have a look at Alan&#039;s Twitter…]]></description>
										<content:encoded><![CDATA[<p>I had dinner with the outgoing editor of The Guardian the other night. Clever chap, sure he'll go far in life.</p>

<p>The Guardian is very hot on security.  Many of their writers have PGP keys which they publicly advertise.  In theory, that's great (<a href="https://moxie.org/2015/02/24/gpg-and-me.html">complaints about PGP notwithstanding</a>) - but the reality shows just how tricky it is to act in a security conscious manner.</p>

<p>Have a look at Alan's Twitter profile.</p>

<p><a href="https://twitter.com/arusbridger"><img src="https://shkspr.mobi/blog/wp-content/uploads/2015/03/arusbridger-Twitter-Profile-fs8.png" alt="arusbridger Twitter Profile-fs8" width="360" height="585" class="aligncenter size-full wp-image-20762"></a></p>

<p>In the bio, we see a link -  <a href="http://bit.ly/1g4S9WR">http://bit.ly/1g4S9WR</a> which points to <a href="http://static.guim.co.uk/ni/1393869928289/Public-Key.asc">http://static.guim.co.uk/ni/1393869928289/Public-Key.asc</a>.</p>

<p>Let's take a look at a few reasons why this is sub-optimal.</p>

<h2 id="control"><a href="https://shkspr.mobi/blog/2015/03/dont-use-bit-ly-to-advertise-your-pgp-key/#control">Control</a></h2>

<p>Who controls bit.ly?  Not Alan.  Not the Guardian.  How easy would it be for a rogue employee to subtly redirect that URL elsewhere?</p>

<p>Gone are the days of <a href="http://www.pcmag.com/article2/0,2817,2370354,00.asp">Libya exercising its control on the .ly space</a> (you <em>did</em> know that's what .ly stood for, right?)  But that doesn't mean you should trust a third party with directing people to sensitive information!</p>

<p>Bit.ly isn't accessible over HTTPS.  A sufficiently determined attacker can see who is accessing the page - and possibly redirect the URL to a different site.</p>

<h2 id="information-leakage"><a href="https://shkspr.mobi/blog/2015/03/dont-use-bit-ly-to-advertise-your-pgp-key/#information-leakage">Information Leakage</a></h2>

<p>Most bit.ly links allow you to append a "+" to the URL to see a page of statistics.  I've <a href="https://shkspr.mobi/blog/2011/12/bit-ly-considered-unsafe-for-qr-codes/" title="Bit.ly Considered Unsafe (for QR Codes)">written</a> about this <a href="https://shkspr.mobi/blog/2013/04/inferring-facebooks-mobile-use-via-bit-ly/">several</a> <a href="https://shkspr.mobi/blog/2011/01/metros-use-of-qr-codes/">times</a>.</p>

<p>Off we go to <a href="http://bit.ly/1g4S9WR+">http://bit.ly/1g4S9WR+</a>
<a href="http://bit.ly/1g4S9WR+"><img src="https://shkspr.mobi/blog/wp-content/uploads/2015/03/arusbridger-bitly-stats-fs8.png" alt="arusbridger bitly stats-fs8" width="1024" height="1402" class="aligncenter size-full wp-image-20763"></a></p>

<p>We can see when a cluster of people have visited the URL and what country they're in.  Is this leaking the identity of a journalistic source? Not directly - but it could help narrow down the target.</p>

<h2 id="homographic-disambiguation"><a href="https://shkspr.mobi/blog/2015/03/dont-use-bit-ly-to-advertise-your-pgp-key/#homographic-disambiguation">Homographic Disambiguation</a></h2>

<p>Bit.ly allows you to create your own custom URLs.  <a href="https://shkspr.mobi/blog/2011/04/dear-nokia/" title="Dear Nokia...">Useful for pulling pranks</a> - and <em>extremely</em> useful for redirecting people.</p>

<p>So, if someone hacked the Twitter account and replaced <a href="http://bit.ly/1g4S9WR">http://bit.ly/1g4S9WR</a> with <a href="http://bit.ly/Ig4S9WR">http://bit.ly/Ig4S9WR</a> - how long would it be before someone noticed?  The latter example uses an upper-case i rather than the numeral 1 - and points to <em>my</em> PGP key.</p>

<h2 id="final-destination"><a href="https://shkspr.mobi/blog/2015/03/dont-use-bit-ly-to-advertise-your-pgp-key/#final-destination">Final Destination</a></h2>

<p>But, let's assume that no-one has monkeyed with the shortlink.  We end up at <code><a href="http://static.guim.co.uk/ni/1393869928289/Public-Key.asc">http://static.guim.co.uk/ni/1393869928289/Public-Key.asc</a></code>.</p>

<p>What is "guim.co.uk"?  I <em>guess</em> it's a server used by the GUardian to serve IMages - but it doesn't quite carry the same trust as seeing the public key on TheGuardian.com</p>

<p>guim also suffers from security issues.  It's not served over HTTPS - which means that it's possible to see who is accessing the page and, crucially, a man-in-the-middle could alter its contents.</p>

<h2 id="putting-it-all-together"><a href="https://shkspr.mobi/blog/2015/03/dont-use-bit-ly-to-advertise-your-pgp-key/#putting-it-all-together">Putting it all together</a></h2>

<p>By exploiting one or all of these weaknesses, a malicious attacker could create quite a convincing forgery.</p>

<p>If a random Bit.ly link took you to GUlM.CO.UK (a lower case L) and served you a PGP key for alan@guardian-email.co.uk (not the real address) - would you be convinced that it was a legitimate key for the correct user?</p>

<h2 id="fixing-it"><a href="https://shkspr.mobi/blog/2015/03/dont-use-bit-ly-to-advertise-your-pgp-key/#fixing-it">Fixing It</a></h2>

<p>This is a pretty simple fix.</p>

<ul>
    <li>Use a direct link...</li>
    <li>...to a trustworth site...</li>
    <li>...served over HTTPS...</li>
    <li>...</li>
    <li>That's it!</li>
</ul>

<p>Security is, sadly, too hard for most people.  I wrote about <a href="https://shkspr.mobi/blog/2015/03/the-usability-of-anti-apartheid-encryption/" title="The Usability of Anti-Apartheid Encryption">how freedom fighters in South Africa were unable to maintain security due to human weaknesses</a> - nothing much has changed in the intervening years.</p>

<p>I've shared these tips directly with The Guardian's security people, and they are in the process of changing to a more robust system.</p>

<p>I've been reading "<a href="http://www.amazon.co.uk/s/?_encoding=UTF8&amp;camp=1634&amp;creative=19450&amp;field-keywords=think%20like%20a%20freak&amp;linkCode=ur2&amp;sprefix=think%20like%20a%20fr%2Caps%2C252&amp;tag=shkspr-21&amp;url=search-alias%3Daps&amp;linkId=SIEJV6JFQJA7JDBU">Think Like A Freak</a>" by the authors of Freakonomics.  In it, the authors ask us to start thinking more like maverick economists.  It's a fine way to increase your cognative ability and get a fresh perspective on the world.</p>

<p>I'd like to ask you to <strong>think like a hacker</strong>.  Find every weakness in the chain and work to eliminate it.</p>
<img src="https://shkspr.mobi/blog/wp-content/themes/edent-wordpress-theme/info/okgo.php?ID=20761&HTTP_REFERER=RSS" alt="" width="1" height="1" loading="eager">]]></content:encoded>
					
					<wfw:commentRss>https://shkspr.mobi/blog/2015/03/dont-use-bit-ly-to-advertise-your-pgp-key/feed/</wfw:commentRss>
			<slash:comments>2</slash:comments>
		
		
			</item>
	</channel>
</rss>
