{"id":1845,"date":"2017-08-03T09:21:05","date_gmt":"2017-08-03T14:51:05","guid":{"rendered":"https:\/\/www.rapidsslonline.com\/blog\/?p=1845"},"modified":"2022-04-22T01:09:08","modified_gmt":"2022-04-22T06:39:08","slug":"public-key-private-key-encryption","status":"publish","type":"post","link":"https:\/\/www.rapidsslonline.com\/blog\/public-key-private-key-encryption\/","title":{"rendered":"Public Keys, Private Keys, Batman and Some Stuff About Encryption"},"content":{"rendered":"<h2>Don\u2019t ever let someone else touch your private key without your consent.<\/h2>\n<p>Today we\u2019re going to discuss Public Keys, Private Keys and Encryption. Unfortunately, a lot of the literature on this topic around the internet is needlessly complicated. And when I say needlessly complicated I mean some developer or programmer wrote it using nomenclature that only another developer or programmer would know.<\/p>\n<p>It\u2019s kind of like how academics and modern philosophers write dense, difficult to understand texts as a way of both showing off their intelligence and to try and one-up their contemporaries. And in these philosophical personal pissing matches, the layman is just kind of caught in the middle saying, \u201cwhaaaat?\u201d There may be some good information in those texts, but to most of us\u2014we\u2019re just getting rained on.<\/p>\n<p>I am not like that. I am conscientious of my readers. Call me Conscientious Carl. And I\u2019m going to explain these concepts to you in basic English, using terms you can understand. I don\u2019t get off on using big words or fancy tech-speak like some people do. Though, now that I think about it, that would make for a good Silicon Valley phone sex line. \u201c<em>Yeah baby, tell me how you\u2019re going to side-jack me by using your packet sniffer on my cookies.<\/em>\u201d [<strong>Editor\u2019s Note<\/strong>: Carl\u2026]<\/p>\n<p>Anyway, let\u2019s talk about Public and Private keys.<\/p>\n<h2>Batman, A Horse\u2019s Rear and Two Types of Encryption<\/h2>\n<p>There are two kinds of encryption, symmetric and asymmetric. Do I need to explain symmetry? Would that be patronizing? [Editor\u2019s Note: Only a little] Ok, I\u2019ll just use an image. This is an example of symmetry:<\/p>\n<p><a href=\"https:\/\/www.rapidsslonline.com\/blog\/wp-content\/uploads\/2017\/08\/Batman-Symmetry.png\"><img decoding=\"async\" class=\"alignnone size-full wp-image-1846\" src=\"https:\/\/www.rapidsslonline.com\/blog\/wp-content\/uploads\/2017\/08\/Batman-Symmetry.png\" alt=\"Batman Logo is Symmetric\" width=\"975\" height=\"576\" srcset=\"https:\/\/www.rapidsslonline.com\/blog\/wp-content\/uploads\/2017\/08\/Batman-Symmetry.png 975w, https:\/\/www.rapidsslonline.com\/blog\/wp-content\/uploads\/2017\/08\/Batman-Symmetry-300x177.png 300w, https:\/\/www.rapidsslonline.com\/blog\/wp-content\/uploads\/2017\/08\/Batman-Symmetry-768x454.png 768w, https:\/\/www.rapidsslonline.com\/blog\/wp-content\/uploads\/2017\/08\/Batman-Symmetry-190x112.png 190w\" sizes=\"(max-width: 975px) 100vw, 975px\" \/><\/a><\/p>\n<p>See how you could draw a line right down the middle and it would be the exact same (though mirrored) on both sides? That\u2019s because the Batman logo is both bad ass and completely symmetric. And thank you for humoring me, I have been looking for an excuse to use this image since I took the blog over.<\/p>\n<p>This is an example of asymmetry:<\/p>\n<p>&nbsp;<\/p>\n<p>Notice how if you drew a line down the middle of this picture the two sides are not mirror images of one another? They\u2019re not the same. You could say this is ass-ymmetric. This picture is actually doubly relevant because if you legitimately needed me to explain symmetry to you then you are indeed a horse\u2019s [<strong>Editor\u2019s Note<\/strong>: Yeah\u2026 I\u2019m not going to let you finish this sentence, Carl]<\/p>\n<p>Ok, we\u2019ve gone too far into the weeds, something I would not advise doing around this horse lest you\u2019re wearing boots. And even then\u2026 <strong>[Editor\u2019s Note<\/strong>: CARL!]<\/p>\n<p>So how does this apply to encryption? I\u2019m glad you asked. As we already established, there are two kinds of encryption. The first type, symmetric encryption, occurs once a secure connection has been established. It uses symmetric session keys that can both encrypt and decrypt communication. That\u2019s another discussion for another time, though.<\/p>\n<p>Then there is asymmetric encryption, that\u2019s what we\u2019re going to be talking about today. This occurs during the SSL handshake and helps your web browser to authenticate the website\u2019s SSL certificate in order to establish a secure connection.<\/p>\n<h2>Asymmetric Encryption is a lot Like My Marriage<\/h2>\n<p>Asymmetric encryption occurs during the SSL handshake and uses a Public Key and a Private Key. Here\u2019s how it works:<\/p>\n<ul>\n<li>Your browser reaches a website with an SSL certificate. After both say \u201cHello\u201d \u2013 because browsers and servers are nothing if not polite \u2013 the browser receives a copy of both the certificate and the accompanying public key.<\/li>\n<li>The browser then uses the public key to encrypt a small bit of throw-away data and send it back to the server. The server uses the corresponding private key to decrypt what was sent and send it back as plain-text (meaning in its unencrypted form). If the server returns the same data that was originally encrypted, it verifies the key pair to the browser.<\/li>\n<\/ul>\n<p>Now, when I say the key pair, I mean that the public and private key match. This is just a portion of the handshake (again, another discussion for another day), but an integral one nonetheless.<\/p>\n<p>Here\u2019s another way to think about it. The public key, like my wife, does most of the talking. It says something, which it has encrypted in a way that it thinks will only make sense to me. It\u2019s then my job to decrypt whatever it is she just said and repeat it back to her to make sure I got it right. If I didn\u2019t, I get in trouble.<\/p>\n<p>Public and Private keys are the same way, just far less passive aggressive. Public keys also fix a better casserole, but I digress.<\/p>\n<h2>Let\u2019s Wrap This Up<\/h2>\n<p>So there you have it. Public keys and Private keys are an example of asymmetric encryption. One key sends data, the other decrypts it. This is done to verify that the keys match during the SSL handshake.<\/p>\n<p>The actual communication that occurs after the handshake is done with symmetric keys that can both encrypt and decrypt. It\u2019s really very simple, provided you have someone to explain it to you in a simple, if slightly chauvinistic [<strong>Editor\u2019s Note<\/strong>: Slightly?] way.<\/p>\n<p>Stay Cautious, My Friends.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Don\u2019t ever let someone else touch your private key without your consent. Today we\u2019re going to discuss Public Keys, Private Keys and Encryption. Unfortunately, a lot of the literature on &hellip; <span class=\"d-flex justify-content-end\"><a href=\"https:\/\/www.rapidsslonline.com\/blog\/public-key-private-key-encryption\/\" class=\"btn btn-blue\">Read More <span class=\"screen-reader-text\">Public Keys, Private Keys, Batman and Some Stuff About Encryption<\/span><\/a><\/span><\/p>\n","protected":false},"author":10,"featured_media":1901,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"inline_featured_image":false,"footnotes":""},"categories":[14],"tags":[278,277,276,279],"class_list":["post-1845","post","type-post","status-publish","format-standard","has-post-thumbnail","category-ssl-certificate","tag-encryption","tag-private-key","tag-public-key","tag-ssltls"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v28.0 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>Public Keys, Private Keys, Batman and Some Stuff About Encryption<\/title>\n<meta name=\"description\" content=\"Let Cautious Carl, who has quite a way with words, explain the role of the public and private keys during the encryption process.\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.rapidsslonline.com\/ssl\/difference-between-public-and-private-key\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Public Keys, Private Keys, Batman and Some Stuff About Encryption\" \/>\n<meta property=\"og:description\" content=\"Let Cautious Carl, who has quite a way with words, explain the role of the public and private keys during the encryption process.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.rapidsslonline.com\/ssl\/difference-between-public-and-private-key\/\" \/>\n<meta property=\"og:site_name\" content=\"RapidSSLOnline Blog\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/rsosslcertificates\/\" \/>\n<meta property=\"article:published_time\" content=\"2017-08-03T14:51:05+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2022-04-22T06:39:08+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.rapidsslonline.com\/blog\/wp-content\/uploads\/2017\/08\/public-key-vs-private-key-1.png\" \/>\n\t<meta property=\"og:image:width\" content=\"300\" \/>\n\t<meta property=\"og:image:height\" content=\"155\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/png\" \/>\n<meta name=\"author\" content=\"Adam Thompson\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:title\" content=\"Public Keys, Private Keys, Batman and Some Stuff About Encryption\" \/>\n<meta name=\"twitter:description\" content=\"Let Cautious Carl, who has quite a way with words, explain the role of the public and private keys during the encryption process.\" \/>\n<meta name=\"twitter:creator\" content=\"@rsossl\" \/>\n<meta name=\"twitter:site\" content=\"@rsossl\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Adam Thompson\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"4 minutes\" \/>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Public Keys, Private Keys, Batman and Some Stuff About Encryption","description":"Let Cautious Carl, who has quite a way with words, explain the role of the public and private keys during the encryption process.","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.rapidsslonline.com\/ssl\/difference-between-public-and-private-key\/","og_locale":"en_US","og_type":"article","og_title":"Public Keys, Private Keys, Batman and Some Stuff About Encryption","og_description":"Let Cautious Carl, who has quite a way with words, explain the role of the public and private keys during the encryption process.","og_url":"https:\/\/www.rapidsslonline.com\/ssl\/difference-between-public-and-private-key\/","og_site_name":"RapidSSLOnline Blog","article_publisher":"https:\/\/www.facebook.com\/rsosslcertificates\/","article_published_time":"2017-08-03T14:51:05+00:00","article_modified_time":"2022-04-22T06:39:08+00:00","og_image":[{"width":300,"height":155,"url":"https:\/\/www.rapidsslonline.com\/blog\/wp-content\/uploads\/2017\/08\/public-key-vs-private-key-1.png","type":"image\/png"}],"author":"Adam Thompson","twitter_card":"summary_large_image","twitter_title":"Public Keys, Private Keys, Batman and Some Stuff About Encryption","twitter_description":"Let Cautious Carl, who has quite a way with words, explain the role of the public and private keys during the encryption process.","twitter_creator":"@rsossl","twitter_site":"@rsossl","twitter_misc":{"Written by":"Adam Thompson","Est. reading time":"4 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.rapidsslonline.com\/ssl\/difference-between-public-and-private-key\/#article","isPartOf":{"@id":"https:\/\/www.rapidsslonline.com\/blog\/public-key-private-key-encryption\/"},"author":{"name":"Adam Thompson","@id":"https:\/\/www.rapidsslonline.com\/blog\/#\/schema\/person\/ab1f810704e5f52f23e62cf0a309fd56"},"headline":"Public Keys, Private Keys, Batman and Some Stuff About Encryption","datePublished":"2017-08-03T14:51:05+00:00","dateModified":"2022-04-22T06:39:08+00:00","mainEntityOfPage":{"@id":"https:\/\/www.rapidsslonline.com\/blog\/public-key-private-key-encryption\/"},"wordCount":906,"commentCount":0,"image":{"@id":"https:\/\/www.rapidsslonline.com\/ssl\/difference-between-public-and-private-key\/#primaryimage"},"thumbnailUrl":"https:\/\/www.rapidsslonline.com\/blog\/wp-content\/uploads\/2017\/08\/public-key-vs-private-key-1.png","keywords":["Encryption","Private Key","Public Key","SSL\/TLS"],"articleSection":["SSL Certificate"],"inLanguage":"en-US"},{"@type":"WebPage","@id":"https:\/\/www.rapidsslonline.com\/blog\/public-key-private-key-encryption\/","url":"https:\/\/www.rapidsslonline.com\/ssl\/difference-between-public-and-private-key\/","name":"Public Keys, Private Keys, Batman and Some Stuff About Encryption","isPartOf":{"@id":"https:\/\/www.rapidsslonline.com\/blog\/#website"},"primaryImageOfPage":{"@id":"https:\/\/www.rapidsslonline.com\/ssl\/difference-between-public-and-private-key\/#primaryimage"},"image":{"@id":"https:\/\/www.rapidsslonline.com\/ssl\/difference-between-public-and-private-key\/#primaryimage"},"thumbnailUrl":"https:\/\/www.rapidsslonline.com\/blog\/wp-content\/uploads\/2017\/08\/public-key-vs-private-key-1.png","datePublished":"2017-08-03T14:51:05+00:00","dateModified":"2022-04-22T06:39:08+00:00","author":{"@id":"https:\/\/www.rapidsslonline.com\/blog\/#\/schema\/person\/ab1f810704e5f52f23e62cf0a309fd56"},"description":"Let Cautious Carl, who has quite a way with words, explain the role of the public and private keys during the encryption process.","breadcrumb":{"@id":"https:\/\/www.rapidsslonline.com\/ssl\/difference-between-public-and-private-key\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.rapidsslonline.com\/ssl\/difference-between-public-and-private-key\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.rapidsslonline.com\/ssl\/difference-between-public-and-private-key\/#primaryimage","url":"https:\/\/www.rapidsslonline.com\/blog\/wp-content\/uploads\/2017\/08\/public-key-vs-private-key-1.png","contentUrl":"https:\/\/www.rapidsslonline.com\/blog\/wp-content\/uploads\/2017\/08\/public-key-vs-private-key-1.png","width":300,"height":155,"caption":"public key vs private key"},{"@type":"BreadcrumbList","@id":"https:\/\/www.rapidsslonline.com\/ssl\/difference-between-public-and-private-key\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.rapidsslonline.com\/blog\/"},{"@type":"ListItem","position":2,"name":"Public Keys, Private Keys, Batman and Some Stuff About Encryption"}]},{"@type":"WebSite","@id":"https:\/\/www.rapidsslonline.com\/blog\/#website","url":"https:\/\/www.rapidsslonline.com\/blog\/","name":"RapidSSLOnline Blog","description":"SSL Best Practices for Secure Website","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.rapidsslonline.com\/blog\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Person","@id":"https:\/\/www.rapidsslonline.com\/blog\/#\/schema\/person\/ab1f810704e5f52f23e62cf0a309fd56","name":"Adam Thompson","sameAs":["http:\/\/rapidsslonline.com"],"url":"https:\/\/www.rapidsslonline.com\/blog\/author\/adam-thompson\/"}]}},"_links":{"self":[{"href":"https:\/\/www.rapidsslonline.com\/blog\/wp-json\/wp\/v2\/posts\/1845","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.rapidsslonline.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.rapidsslonline.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.rapidsslonline.com\/blog\/wp-json\/wp\/v2\/users\/10"}],"replies":[{"embeddable":true,"href":"https:\/\/www.rapidsslonline.com\/blog\/wp-json\/wp\/v2\/comments?post=1845"}],"version-history":[{"count":0,"href":"https:\/\/www.rapidsslonline.com\/blog\/wp-json\/wp\/v2\/posts\/1845\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.rapidsslonline.com\/blog\/wp-json\/wp\/v2\/media\/1901"}],"wp:attachment":[{"href":"https:\/\/www.rapidsslonline.com\/blog\/wp-json\/wp\/v2\/media?parent=1845"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.rapidsslonline.com\/blog\/wp-json\/wp\/v2\/categories?post=1845"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.rapidsslonline.com\/blog\/wp-json\/wp\/v2\/tags?post=1845"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}