225 lines
12 KiB
HTML
225 lines
12 KiB
HTML
<!DOCTYPE html>
|
||
<html lang="en-US">
|
||
<head>
|
||
<meta charset="utf-8"/>
|
||
<meta content="#0e1112" media="(prefers-color-scheme: dark)" name="theme-color"/>
|
||
<meta content="#566B78" media="(prefers-color-scheme: light)" name="theme-color"/>
|
||
<meta content="Michael Housh" name="author"/>
|
||
<meta content="Mhoush" name="apple-mobile-web-app-title"/>
|
||
<meta content="initial-scale=1.0, width=device-width" name="viewport"/>
|
||
<meta content="telephone=no" name="format-detection"/>
|
||
<meta content="True" name="HandheldFriendly"/>
|
||
<meta content="320" name="MobileOptimized"/>
|
||
<meta content="Mhoush" name="og:site_name"/>
|
||
<meta content="hvac, developer, swift, home-performance, design" name="keywords"/>
|
||
<title>
|
||
mhoush: PGP Encryption Introduction
|
||
</title>
|
||
<link href="/static/favicon.ico" rel="shortcut icon"/>
|
||
<link href="/static/output.css" rel="stylesheet"/>
|
||
<link href="/static/style.css" rel="stylesheet"/>
|
||
<link href="/articles/feed.xml" rel="alternate" title="mhoush" type="application/rss+xml"/>
|
||
<link href="/static/prism.css" rel="stylesheet"/>
|
||
<meta content="In this article I introduce PGP and show a use case for me, which perhaps you can use as well.
|
||
What is PGP
|
||
PGP stands for Pretty Good Privacy, it was first developed in 1991 by Phil Zimmermann. PGP uses
|
||
cryptographic privacy and authentication and is..." name="description"/>
|
||
<meta content="summary_large_image" name="twitter:card"/>
|
||
<meta content="http://localhost:3000/articles/images/2024-04-04-pgp-encryption-introduction.gif" name="twitter:image"/>
|
||
<meta content="PGP Encryption Introduction" name="twitter:image:alt"/>
|
||
<meta content="http://localhost:3000/articles/images//articles/2024/pgp-encryption-introduction/" name="og:url"/>
|
||
<meta content="PGP Encryption Introduction" name="og:title"/>
|
||
<meta content="In this article I introduce PGP and show a use case for me, which perhaps you can use as well.
|
||
What is PGP
|
||
PGP stands for Pretty Good Privacy, it was first developed in 1991 by Phil Zimmermann. PGP uses
|
||
cryptographic privacy and authentication and is..." name="og:description"/>
|
||
<meta content="http://localhost:3000/articles/images/2024-04-04-pgp-encryption-introduction.gif" name="og:image"/>
|
||
<meta content="1014" name="og:image:width"/>
|
||
<meta content="530" name="og:image:height"/>
|
||
<script crossorigin="anonymous" src="https://kit.fontawesome.com/f209982030.js">
|
||
</script>
|
||
</head>
|
||
<body class="bg-page text-white pb-5 font-avenir articles">
|
||
<header class="bg-nav text-gray py-4 text-base/6 lg:fixed w-full lg:h-[62px]">
|
||
<nav class="container flex gap-x-5 lg:gap-x-y items-center">
|
||
<ul class="flex flex-wrap gap-x-2 lg:gap-x-5">
|
||
<li>
|
||
<a class href="/">Home</a>
|
||
</li>
|
||
<li>
|
||
<a class="active" href="/articles/">Articles</a>
|
||
</li>
|
||
<li>
|
||
<a class href="/about/">About</a>
|
||
</li>
|
||
</ul>
|
||
</nav>
|
||
</header>
|
||
<div class="container pt-12 lg:pt-28">
|
||
<article class="prose">
|
||
<h1>
|
||
PGP Encryption Introduction
|
||
</h1>
|
||
<div class="-mt-6">
|
||
<div class="text-gray gray-links text-sm">
|
||
<span class="border-r border-gray pr-2 mr-2">April 04, 2024</span>840 words, posted in <a href="/articles/tag/gnupgp/">GnuPGP</a>, <a href="/articles/tag/pgp/">PGP</a>, <a href="/articles/tag/programming/">programming</a> and <a href="/articles/tag/security/">security</a>
|
||
</div>
|
||
</div>
|
||
<img alt="banner" src="http://localhost:3000/articles/images/2024-04-04-pgp-encryption-introduction.gif"/>
|
||
<p>In this article I introduce PGP and show a use case for me, which perhaps you can use as well.</p>
|
||
<h2>What is PGP</h2>
|
||
<p>PGP stands for <strong>Pretty Good Privacy</strong>, it was first developed in 1991 by Phil Zimmermann. PGP uses
|
||
cryptographic privacy and authentication and is generally used in data communication.</p>
|
||
<p>According to <a href="https://en.wikipedia.org/wiki/Pretty_Good_Privacy">Wikipedia</a> it’s name was inspired
|
||
by a grocery store named, “Ralph’s Pretty Goody Grocery” featured in radio host’s Garrison Keillor’s
|
||
fictional town of Lake Wobegon.</p>
|
||
<p>PGP is commonly used in software development to “sign” software commits or files to help ensure both
|
||
who the commits were from as well as make sure they were not modified from the original versions.</p>
|
||
<p>It should also be noted that when people say PGP they are often referring to OpenPGP or GnuPGP which
|
||
are implementations of the PGP standard protocol.</p>
|
||
<h2>What it does</h2>
|
||
<blockquote>
|
||
<p>Note: I am in no way a cyber-security expert, I am a layman and only describing things in terms
|
||
that I understand / make sense to me. Do what I do at your own risk!</p>
|
||
</blockquote>
|
||
<p>PGP offers both symmetrical encryption (uses a session key and password) or asymmetrical encryption
|
||
(uses a session key and a private key). Asymmetrical encryption is more secure but is more resource
|
||
intensive (which is generally not a problem with computers of today).</p>
|
||
<p>Generally speaking PGP uses what are known as public and private key pairs. The public portion of
|
||
the key par is meant to be shared with others freely, while the private portion needs to be secured
|
||
/ not shared with anyone <strong>EVER</strong>. It is best practice to generate your keys on a computer that is
|
||
“air gapped”, meaning it is not connected to any network / internet, and does not save a history of
|
||
commands performed on it.</p>
|
||
<p>PGP encrypts data (files, messages, etc.) for one or more recipients, using the recipients public
|
||
key. The recipients private key is required to decrypt the data once it’s been encrypted.</p>
|
||
<p>Your key pair is tied to your identity / person, generally by your name and email(s). The key can
|
||
also have multiple “subkeys”, meaning that if you have more than one public email, alias, etc. it
|
||
can be tied to your same private key. This is useful for example for work vs. activism vs. software
|
||
development.</p>
|
||
<p>Once your key is generated and your private key secured, you can share your public portion of the
|
||
key to a “keyserver” where other people can download it and verify messages were sent by you.</p>
|
||
<h2>Web of Trust</h2>
|
||
<p>PGP also uses what is called the <strong>“Web of Trust”</strong>, which is used to validate that messages are
|
||
encrypted by a trusted source. There are different levels of trust depending on where a key is
|
||
retrieved from. For example, if somebody gave you their public key in person and you were able to
|
||
inspect that the identity matches their government id, then you can give it a higher trust level
|
||
than one that is sent / retrieved from a keyserver.</p>
|
||
<p>My understanding of this portion is that over time your key is signed by other’s with their level of
|
||
certainty about you / your key, which over time increases the overall trust in your key.</p>
|
||
<h2>Out of the weeds</h2>
|
||
<p>Now that we’ve got an understanding of some of the technical aspects, lets talk about some real use
|
||
cases of PGP encryption.</p>
|
||
<p>PGP encryption is used by some email clients / applications, such as
|
||
<a href="https://canarymail.io/">Canary</a>,
|
||
<a href="https://www.thunderbird.net/en-US/thunderbird/115.0/holidayeoy/">Thunderbird</a>, or
|
||
<a href="https://gpgtools.tenderapp.com/">GPGSuite</a>.</p>
|
||
<p>In my understanding, it is also what is used in devices such as a
|
||
<a href="https://www.yubico.com/">YubiKey</a>.</p>
|
||
<p>Many of the mentioned applications allow for an easier interface / adoption, as one of the reasons
|
||
it is not very popular is that it can be hard to use PGP for the average person.</p>
|
||
<p>Aside from using my PGP key for signing software commits, my major use case is for encrypting files
|
||
that I store in a “cloud” provider. Know that when someone says the “cloud”, it is really just a
|
||
computer (in reality a gang of computers in a data center). You are solely reliant that these cloud
|
||
providers are not snooping on, inspecting, or even selling your data.</p>
|
||
<p>Of course, some data may not be that sensitive, so maybe you don’t care. However with a little bit
|
||
of effort on your part you can at least make it very hard for anyone to know what is inside your
|
||
documents. You can be in control of the way your items are encrypted and have confidence that nobody
|
||
but you can access what is inside your documents.</p>
|
||
<p>Heck, I even encrypt documents that are stored on my own network / computer so that if something
|
||
get’s stolen or someone breach’s my network they will not be able to easily get to sensitive data.</p>
|
||
<h2>Conclusion</h2>
|
||
<p>This article is just meant as an overview of PGP encryption. In future articles I will show you how
|
||
to use it to encrypt your data and be in control of your privacy.</p>
|
||
<h3>Resources</h3>
|
||
<ul>
|
||
<li><a href="https://gnupg.org/">GnuPG</a></li>
|
||
<li><a href="https://www.openpgp.org/">OpenPGP</a></li>
|
||
<li><a href="https://gpg.wtf/">gpg.wtf</a></li>
|
||
<li><a href="https://www.ietf.org/rfc/rfc4880.html">RFC4880</a></li>
|
||
</ul>
|
||
</article>
|
||
<div class="border-t border-light mt-8 pt-8">
|
||
<h2 class="text-4xl font-extrabold mb-8">
|
||
Written by
|
||
</h2>
|
||
<div class="flex flex-col lg:flex-row gap-8">
|
||
<div class="flex-[0_0_120px]">
|
||
<img class="w-[120px] h-[120px] rounded-full" src="/static/images/avatar.png"/>
|
||
</div>
|
||
<div class="prose">
|
||
<h3 class="!m-0">
|
||
Michael Housh
|
||
</h3>
|
||
<p class="text-gray">
|
||
HVAC business owner with over 27 years of experience. Writes articles about HVAC,
|
||
Programming, Home-Performance, and Building Science
|
||
</p>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
<div class="mt-16">
|
||
<h2 class="text-4xl font-extrabold mb-8">
|
||
More articles
|
||
</h2>
|
||
<div class="grid lg:grid-cols-2 gap-10">
|
||
<section>
|
||
<h2 class="text-2xl font-bold mb-2">
|
||
<a class="[&:hover]:border-b border-orange" href="/articles/2025/vapor-htmx-todo-app/">Vapor + HTMX</a>
|
||
</h2>
|
||
<div class="text-gray gray-links text-sm mb-4">
|
||
<span class="border-r border-gray pr-2 mr-2">January 05, 2025</span><a href="/articles/tag/general/">general</a>, <a href="/articles/tag/programming/">programming</a> and <a href="/articles/tag/software/">software</a>
|
||
</div>
|
||
<p>
|
||
<a href="/articles/2025/vapor-htmx-todo-app/"><div>
|
||
Build an example application using Vapor and HTMX.
|
||
</div></a>
|
||
</p>
|
||
</section>
|
||
<section>
|
||
<h2 class="text-2xl font-bold mb-2">
|
||
<a class="[&:hover]:border-b border-orange" href="/articles/2024/free-as-in-freedom/">Free As In Freedom</a>
|
||
</h2>
|
||
<div class="text-gray gray-links text-sm mb-4">
|
||
<span class="border-r border-gray pr-2 mr-2">April 09, 2024</span><a href="/articles/tag/general/">general</a>, <a href="/articles/tag/open-source/">open-source</a> and <a href="/articles/tag/software/">software</a>
|
||
</div>
|
||
<p>
|
||
<a href="/articles/2024/free-as-in-freedom/"><div>
|
||
Salute to open-source software engineers
|
||
</div></a>
|
||
</p>
|
||
</section>
|
||
</div>
|
||
<p class="prose mt-8">
|
||
<a href="/articles/">› See all articles</a>
|
||
</p>
|
||
</div>
|
||
</div>
|
||
<div class="site-footer container text-gray gray-links border-t border-light text-center pt-6 mt-8 text-sm">
|
||
<p>
|
||
Copyright © Michael Housh 2023-2025.
|
||
</p>
|
||
<p>
|
||
Built in Swift using
|
||
<a href="https://github.com/loopwerk/Saga" rel="nofollow" target="_blank">Saga</a>
|
||
(<a href="https://github.com/m-housh/mhoush.com" rel="nofollow" target="_blank">source</a>).
|
||
</p>
|
||
<p>
|
||
<a href="http://localhost:3000/articles/feed.xml" rel="nofollow" target="_blank">RSS</a>
|
||
|
|
||
<a href="https://github.com/m-housh" rel="nofollow" target="_blank">Github</a>
|
||
|
|
||
<a href="https://www.youtube.com/channel/UCb58SeURd5bObfTiL0KoliA" rel="nofollow" target="_blank">Youtube</a>
|
||
|
|
||
<a href="https://www.facebook.com/michael.housh" rel="nofollow" target="_blank">Facebook</a>
|
||
|
|
||
<a href="mailto:michael@mhoush.com" rel="nofollow">Email</a>
|
||
</p>
|
||
<script src="https://cdnjs.cloudflare.com/ajax/libs/prism/1.29.0/components/prism-core.min.js">
|
||
</script>
|
||
<script src="https://cdnjs.cloudflare.com/ajax/libs/prism/1.29.0/plugins/keep-markup/prism-keep-markup.min.js">
|
||
</script>
|
||
<script src="https://cdnjs.cloudflare.com/ajax/libs/prism/1.29.0/plugins/autoloader/prism-autoloader.min.js">
|
||
</script>
|
||
</div>
|
||
</body>
|
||
</html> |