You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

1 line
8.9 KiB

<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <title>How Does Encryption Work, in Theory? | tait.tech</title> <link rel="stylesheet" href="/assets/css/style.css"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> </head> <body> <div id="wrapper"> <header> <nav> <input type="checkbox" id="menu"> <label for="menu">&#9776;</label> <div class="menu-content"> <a href="/" class="nav-link">Home</a> <a href="/blog/" class="nav-link">Blog</a> <a href="/links/" class="nav-link">Links</a> <a href="https://github.com/TTWNO/" class="nav-link" target="_blank" rel="noopener noreferrer">Code</a> </div> </nav> </header> <main> <header> <h1>How Does Encryption Work, in Theory?</h1> <span class="post-date">Wednesday, February 19 2020</span> </header> <hr> <div class="article"> <p>There are many kinds of encryption used in our everyday communication. Online and offline, over the internet and in person. In this article, I will explain the basics of how encryption should work in theory. I explain in <a href="/2020/01/26/rsa1.html">this article</a> why encryption is important, and why <em>you</em> should care about it.</p> <p>We will start by looking at in-person, offline encryption.</p> <h2 id="cryptography-we-do-everyday">Cryptography We Do Everyday</h2> <p>We encrypt things all the time without even thinking about it. If you spend a significant amount of time with the same group of friends, you will tend to develop common codes that may not make sense to others outside the group. For example: for years, my family called sombody falling from a sitting position “doing a Don”. There is a story of course—We knew a guy named Don who fell from his plastic beach chair in a rather hilarious way; “doing a Don” was born.</p> <p>These types of minor dialects in speech are cryptographic in their own way. The truth is though, that we use cryptography much more than that!</p> <blockquote> <p>“Is cryptography any different than talking? We say something other than what we mean, and then expect everyone is able to decipher the true meaning behind the words. Only, I never do…” — Adapted from a scene in <a href="https://www.benedictcumberbatch.co.uk/wordpress/wp-content/uploads/ScreenplayTIG.pdf">The Imitation Game (p. 39-40)</a></p> </blockquote> <p>How many times have you hinted, flirted, and innuendoed to try to say “I find you very physically attractive”? Have you told your friend that always stinks to wear more deodorant? Have you ever had someone say the words “Im fine” when you know <em>for certain</em> that they are indeed not okay?</p> <table> <thead> <tr> <th>Words Said</th> <th>Meaning</th> </tr> </thead> <tbody> <tr> <td>What can you do?</td> <td>I dont want to talk about this anymore.</td> </tr> <tr> <td>I dont want to overstay my welcome.</td> <td>I want to go home now.</td> </tr> <tr> <td>I dont like them and dont know why.</td> <td>They threaten my ego.</td> </tr> <tr> <td>Creepy</td> <td>Unattractive and friendly</td> </tr> </tbody> </table> <p>All of these scenarios are perfect examples of <del>lies</del> encryption! If we have the key to these codes, we can start to understand what people really mean. Hopefully I have convinced you that you use <del>deceit</del> cryptography on a regular basis in your life, so let us consider what a basic encryption method might be:</p> <h2 id="grade-school-encryption">Grade-School Encryption</h2> <p>Back when I was in middle school I used to pass notes like these:</p> <figure> <img alt="A message I would have sent in middle school. ROT5: Xfwfm hx hzy" src="/assets/img/ceasar1.jpg"/> <figcaption> The kind of message I would have sent in middle school. A ROT5 Ceasar cipher. </figcaption> </figure> <p>This is a message encrypted using the Caesar cipher. This encryption technique was used by Julius Caesar during the reign of the Roman Empire to “encrypt messages of military significance.”<a class="citation-link" href="https://en.wikipedia.org/wiki/Caesar_chipher/">[1]</a> This is one of the oldest and simplest methods of encry