{"id":1906,"date":"2020-12-16T16:48:41","date_gmt":"2020-12-16T16:48:41","guid":{"rendered":"https:\/\/sectigostore.com\/blog\/?p=1906"},"modified":"2023-06-14T20:42:25","modified_gmt":"2023-06-14T20:42:25","slug":"public-key-vs-private-key-how-do-they-work","status":"publish","type":"post","link":"https:\/\/sectigostore.com\/blog\/public-key-vs-private-key-how-do-they-work\/","title":{"rendered":"Public Key vs Private Key: How Do They Work?"},"content":{"rendered":"\n<h2 class=\"wp-block-heading\">Explore the roles of the public key and private key in public key cryptography and learn how they make secure third-party communications possible<\/h2>\n\n\n\n<p>Public key vs private key \u2014 these are two very important terms to understand and differentiate in public key cryptography, or what\u2019s known as asymmetric encryption. You see, public key cryptography is what makes it possible to communicate securely with people you do or don\u2019t know across the internet by enabling you to identify them and encrypt your communications. Having both a public key and private key is necessary for this process.<\/p>\n\n\n\n<p>But what are a public key and private key? Why do they matter, and what are the differences between them? In this article, we\u2019ll talk about public key vs private key and their roles in data privacy and identity verification.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Public Key vs Private Key: The Differences Between Them<\/h2>\n\n\n\n<p><a href=\"https:\/\/sectigostore.com\/blog\/what-is-encryption-and-how-does-it-work\/#:~:text=Encryption%20is%20a%20process%20that,code%2C%20session%20key%2C%20etc.\">Encryption<\/a> means converting plaintext data in a gibberish format in a way that no unauthorized person can read, interpret, or alter it without a special key. A <a href=\"https:\/\/www.thesslstore.com\/blog\/cryptographic-keys-101-what-they-are-how-they-secure-data\/\">cryptographic key<\/a> is a long string of random, unpredictable characters. If you use one key to encrypt and decrypt data, then it means you\u2019re using symmetric encryption. <\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"760\" height=\"355\" src=\"https:\/\/sectigostore.com\/blog\/wp-content\/uploads\/2020\/12\/symmetric-encryption.png\" alt=\"Public key vs private key: A graphic that illustrates how symmetric encryption works using the same (identical) key\" class=\"wp-image-1911\" srcset=\"https:\/\/sectigostore.com\/blog\/wp-content\/uploads\/2020\/12\/symmetric-encryption.png 760w, https:\/\/sectigostore.com\/blog\/wp-content\/uploads\/2020\/12\/symmetric-encryption-300x140.png 300w, https:\/\/sectigostore.com\/blog\/wp-content\/uploads\/2020\/12\/symmetric-encryption-560x262.png 560w\" sizes=\"auto, (max-width: 760px) 100vw, 760px\" \/><\/figure>\n\n\n\n<p>But if you\u2019re using two separate keys \u2014 one to encrypt data and the other to decrypt it \u2014 then you&#8217;re using <a href=\"https:\/\/sectigostore.com\/blog\/what-is-asymmetric-encryption-how-does-it-work\/\">asymmetric encryption<\/a> (public key encryption). The keys are known as the public key (encryption key) and the private key (decryption key).<\/p>\n\n\n\n<figure class=\"wp-block-image size-large is-resized\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/sectigostore.com\/blog\/wp-content\/uploads\/2020\/11\/asymmetric-encryption.png\" alt=\"Public key vs private key: A graphic that illustrates how asymmetric encryption works using two separate keys\" class=\"wp-image-1702\" width=\"760\" height=\"355\"\/><\/figure>\n\n\n\n<p>As we pointed out earlier, there are two separate keys involved in public key cryptography. Imagine a vault that has two separate keys. One can lock the vault, but the same key can\u2019t open it. This means you\u2019d need a different key to unlock the vault. In public key cryptography, it\u2019s much the same way: there are two keys \u2014 one that can encrypt the data and the other that can decrypt it. These keys are separate yet mathematically related to each other. That\u2019s because they\u2019re generated using an asymmetric algorithm that binds the public key to the private one.<\/p>\n\n\n\n<p>To learn more about the differences between them, be sure to check out this article on the <a href=\"https:\/\/sectigostore.com\/blog\/5-differences-between-symmetric-vs-asymmetric-encryption\/\">differences between asymmetric vs symmetric encryption<\/a>.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">What Is a Public Key &amp; How Does It Work?<\/h3>\n\n\n\n<p>Within public key infrastructure, the public key encrypts the data. It\u2019s known as the public key because it can be openly distributed, and anyone can use it for encryption. As soon as the data is encrypted using a public key, you can neither interpret nor guess the original content of the data from the ciphertext nor use the same key (i.e., public key) to unlock it.<\/p>\n\n\n\n<p>Your public key is generated using complex asymmetric encryption algorithms. The length of the public key depends upon the algorithm it is made with. In general, the key size varies from 128 bits to 4096 bits. The Certificate Authority\/Browser Forum (CA\/B Forum) provides guidance for the ideal minimum public key size. For example, based on the <a href=\"https:\/\/cabforum.org\/wp-content\/uploads\/CA-Browser-Forum-BR-1.7.3.pdf\">CA\/B Forum\u2019s current guidelines<\/a>, all CAs shall confirm that:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>The RSA public key is at least 2048 bits, or<\/li>\n\n\n\n<li>That one of the following ECDSA curves is used: NIST P-256, NIST P-384, or NIST P-521.<\/li>\n<\/ul>\n\n\n\n<p>An RSA public key looks like this:<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"632\" height=\"268\" src=\"https:\/\/sectigostore.com\/blog\/wp-content\/uploads\/2020\/12\/rsa-public-key.png\" alt=\"Public key vs private key graphic: A screenshot of a public key, which is a long string of random and unpredictable characters and numbers \" class=\"wp-image-1907\" srcset=\"https:\/\/sectigostore.com\/blog\/wp-content\/uploads\/2020\/12\/rsa-public-key.png 632w, https:\/\/sectigostore.com\/blog\/wp-content\/uploads\/2020\/12\/rsa-public-key-300x127.png 300w, https:\/\/sectigostore.com\/blog\/wp-content\/uploads\/2020\/12\/rsa-public-key-560x237.png 560w\" sizes=\"auto, (max-width: 632px) 100vw, 632px\" \/><figcaption class=\"wp-element-caption\">Private key vs public key graphic: This screenshot of SectigoStore.com\u2019s RSA 2048-bit public key is an example of what a public key looks like.<\/figcaption><\/figure>\n\n\n\n<p>The mathematical algorithms used to create the public key (and private key) are:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><a href=\"https:\/\/sectigostore.com\/page\/what-is-an-rsa-certificate\/\">Rivest-Shamir-Adleman<\/a> (RSA)<\/li>\n\n\n\n<li>ElGamal<\/li>\n\n\n\n<li><a href=\"https:\/\/sectigostore.com\/page\/elliptic-curve-cryptography-vs-rsa-certificates-whats-the-difference\/\">Elliptic curve cryptography<\/a> (ECC)<\/li>\n\n\n\n<li><a href=\"https:\/\/www.comparitech.com\/blog\/information-security\/diffie-hellman-key-exchange\/\">Diffie-Hellman key agreement<\/a><\/li>\n\n\n\n<li>Digital signature algorithm (DSA)<\/li>\n<\/ul>\n\n\n\n<p>So, what is a difference between an RSA public key versus one that\u2019s ECC? The key sizes, for one. RSA keys are significantly larger than ECC keys, yet ECC keys are just as strong. Second, the keys are calculated in different ways. An RSA public key is the result of two massive prime numbers and a smaller number, whereas an ECC public key is an equation that calculates a specific point on an elliptic curve.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">What Is a Private Key &amp; How Does It Work?<\/h3>\n\n\n\n<p>This key can decrypt ciphered data (i.e., encrypted data). Each public key has a corresponding private key. All the pairs of public and private keys are unique. The private key must be kept secret with the owner (i.e., stored safely on the authorized device or non-public-facing server). For SSL\/TLS certificates, you generate your private key as part of the key pair that gets created with your certificate signing request (CSR). This means that even the certificate\u2019s issuing CA doesn\u2019t get to see or have access to your public key.<\/p>\n\n\n\n<p>Because your key is secret, it means that you need to keep it safe and know where it is at all times. If your private key becomes lost, then you\u2019ve got your work cut out for you and will need to re-issue your certificate.<\/p>\n\n\n\n<p>As you can imagine, it\u2019s almost impossible to guess a private key from its corresponding public key because it\u2019s generated with strong entropy (randomness). As such, it would take even a modern supercomputer thousands of years to crack a private key via a brute force attack. Thus, no one can decrypt the data except the authorized device where the private key is stored.<\/p>\n\n\n\n<p>A private key looks like this:<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"702\" height=\"733\" src=\"https:\/\/sectigostore.com\/blog\/wp-content\/uploads\/2020\/12\/rsa-private-key-example.png\" alt=\"Public key vs private key graphic: This image, which has been edited to remove sensitive information, showcases an example RSA private key\" class=\"wp-image-1908\" srcset=\"https:\/\/sectigostore.com\/blog\/wp-content\/uploads\/2020\/12\/rsa-private-key-example.png 702w, https:\/\/sectigostore.com\/blog\/wp-content\/uploads\/2020\/12\/rsa-private-key-example-287x300.png 287w, https:\/\/sectigostore.com\/blog\/wp-content\/uploads\/2020\/12\/rsa-private-key-example-560x585.png 560w\" sizes=\"auto, (max-width: 702px) 100vw, 702px\" \/><figcaption class=\"wp-element-caption\">An RSA private key example in public key cryptography.<\/figcaption><\/figure>\n\n\n\n<h3 class=\"wp-block-heading\">A Quick Overview Down the Differences: Public Key vs Private Key<\/h3>\n\n\n\n<p>Looking for a quick visual to help you see the differences between a public key and private key? Then look no further:<\/p>\n\n\n\n<figure class=\"wp-block-table\"><table><tbody><tr><td><strong>Public Key<\/strong><\/td><td><strong>Private Key<\/strong><\/td><\/tr><tr><td>Can be openly distributed <strong><\/strong><\/td><td>Must be kept a secret<\/td><\/tr><tr><td>Used for encryption<\/td><td>Can be used for decryption in asymmetric encryption, or encryption AND decryption in symmetric encryption<\/td><\/tr><tr><td>Authenticates digital signature signed with the corresponding private key (when used in certificate pinning)<\/td><td>Insert the digital signature (encrypting the hash)<\/td><\/tr><tr><td>Stored inside the digital certificates, outgoing emails, and executables<\/td><td>Stored in authorized devices and non-public-facing servers<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<h2 class=\"wp-block-heading\">Public Key vs Private Key: Their Roles in Data Privacy &amp; Security<\/h2>\n\n\n\n<p>When you want to protect data while it\u2019s in transit or at rest, public key cryptography comes in handy. One endpoint encrypts the data using the recipient\u2019s public key and sends it. The recipient decrypts it by using the corresponding private key. If anyone else in the middle intercepts the data, they can\u2019t unlock, read, or otherwise interpret it without the private key.<\/p>\n\n\n\n<p>Hence, <strong>asymmetric encryption protects the plaintext data from being exposed due to:<\/strong><\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>Man-in-the-middle attacks<\/strong><strong>, <\/strong><strong><\/strong><\/li>\n\n\n\n<li><strong>Data leaks, and<\/strong><\/li>\n\n\n\n<li><strong>Data theft.<\/strong>&nbsp;&nbsp; <strong><\/strong><\/li>\n<\/ul>\n\n\n\n<p>Just to quickly clarify \u2014 asymmetric encryption doesn&#8217;t stop these types of attacks and data leaks or theft from taking place. But what it <em>does<\/em> do is stop anyone from being able to read and access the unencrypted\/plaintext data. Without the corresponding private key to decrypt the data, all the bad guys will see is gibberish. &nbsp;<\/p>\n\n\n\n<p>A classic example of how to think of a public key and private key is to consider your email address and password.Your email address, in this case, represents a public key, which is available to the general public, and anyone who has access to it can send you an email. But only the password holder (i.e., you) can open and read the email the account contains. Here, the password serves as a type of private key.<\/p>\n\n\n\n<p>All public key and private key pairs are unique. If you\u2019re signing for a new user ID on a website or application, the system notifies you if your selected user ID is already in use. You must have a unique pair of a user ID (which can be an email, phone number, ID card number, etc.) and password.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">SSL\/TLS Certificate<\/h3>\n\n\n\n<p>In the same way, the <a href=\"https:\/\/sectigostore.com\/ssl-certificates\">SSL\/TLS certificate<\/a> protects the data transfer between a browser and the website\u2019s server using public key cryptography. The website owner installs an SSL certificate on their website and relies on the unique set of public and private keys for that certificate. There are millions of sites using SSL\/TLS certificates. But none of them have the same key pairs.<\/p>\n\n\n\n<p>When a website visitor tries to open a website, their web browser engages in a process with the website\u2019s server that\u2019s known as a TLS handshake. As part of this process, the browser (client) generates a random pre-master secret, encrypts it using the server\u2019s public key, and sends it to the server. The server decrypts the pre-master secret using the corresponding private key and uses it to compute a symmetric session key.<\/p>\n\n\n\n<p>All the data transferred between a user and a website for the rest of the session is encrypted using the session key \u2014 meaning that it\u2019s transmitted via symmetric encryption. No intruder can access the session key without a private key. It\u2019s this initial use of public key cryptography that makes it possible to exchange session keys to engage in symmetric encryption for the rest of the session. This process protects data transmissions between a website and its visitors.<\/p>\n\n\n\n<p>Public key cryptography is also used in the following digital certificates to protect the data:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><a href=\"https:\/\/sectigostore.com\/code-signing\">Code signing certificate<\/a><\/li>\n\n\n\n<li><a href=\"https:\/\/sectigostore.com\/id\/email-signing-certificate\">Email signing certificate<\/a><\/li>\n\n\n\n<li><a href=\"https:\/\/sectigostore.com\/id\/document-signing-certificate\">Document signing certificate<\/a><\/li>\n\n\n\n<li><a href=\"https:\/\/www.thesslstore.com\/comodo\/personal-authentication-certificate.aspx\">Personal authentication certificate<\/a><\/li>\n<\/ul>\n\n\n\n<h2 class=\"wp-block-heading\">Public Key vs Private Key in Identity Verification<\/h2>\n\n\n\n<p>Another usage of a public key and the private key is identity verification and digital signatures.<\/p>\n\n\n\n<p>In digital signatures, the sender inserts a digital signature using a private key. The recipient verifies the authenticity of the signature with the senders&#8217; public key. No one can modify, copy, or delete the digital signature except the private key holder (i.e., the authorized sender). <strong>Digital signatures, with other measures, give assurance about the sender\u2019s identity and the integrity of the data.<\/strong><\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Email Signing Certificates<\/h3>\n\n\n\n<p>When you install an <a href=\"https:\/\/sectigostore.com\/page\/what-is-an-s-mime-certificate\/\">S\/MIME certificate<\/a> on your email client, it generates a unique pair of public and private keys. It stores the private key on your server and sends the public key with all outgoing emails. You can digitally sign your emails using a private key stored on your device. The recipients receive the email along with the public key, which they use to verify the signature. It gives the recipients assurance about the email sender\u2019s identity.<\/p>\n\n\n\n<p>A digitally signed email looks like this:<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"561\" src=\"https:\/\/sectigostore.com\/blog\/wp-content\/uploads\/2020\/06\/digital-signature-email-group-example-1024x561.png\" alt=\"A combination of screenshots that showcase what an email signing certificate and digital signature look like\" class=\"wp-image-1106 addshadow\" srcset=\"https:\/\/sectigostore.com\/blog\/wp-content\/uploads\/2020\/06\/digital-signature-email-group-example-1024x561.png 1024w, https:\/\/sectigostore.com\/blog\/wp-content\/uploads\/2020\/06\/digital-signature-email-group-example-300x164.png 300w, https:\/\/sectigostore.com\/blog\/wp-content\/uploads\/2020\/06\/digital-signature-email-group-example-560x307.png 560w, https:\/\/sectigostore.com\/blog\/wp-content\/uploads\/2020\/06\/digital-signature-email-group-example-940x515.png 940w, https:\/\/sectigostore.com\/blog\/wp-content\/uploads\/2020\/06\/digital-signature-email-group-example.png 1109w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<h3 class=\"wp-block-heading\">Code Signing Certificates<\/h3>\n\n\n\n<p>These certificates are used by software publishers to sign executable software, scripts, drivers, and applications. After completing a piece of software, the developer digitally signs it using their private key. Whenever the users try to download the software, their devices receive the software\u2019s public key to verify the signature.<\/p>\n\n\n\n<p>At the time of downloading, a security window pops up. If the digital signature is valid, the dialogue box shows the publisher&#8217;s name in it. If there is no digital certificate, the publisher&#8217;s name will be shown as &#8220;unknown.&#8221; A code signing certificate gives assurance to the users that the software is coming from a verified publisher.<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"905\" height=\"413\" src=\"https:\/\/sectigostore.com\/blog\/wp-content\/uploads\/2020\/12\/code-signing-certificate.png\" alt=\"A screenshot showing two Windows messages, the first of which warns about an unknown software publisher and the second shows a verified publisher\" class=\"wp-image-1909\" srcset=\"https:\/\/sectigostore.com\/blog\/wp-content\/uploads\/2020\/12\/code-signing-certificate.png 905w, https:\/\/sectigostore.com\/blog\/wp-content\/uploads\/2020\/12\/code-signing-certificate-300x137.png 300w, https:\/\/sectigostore.com\/blog\/wp-content\/uploads\/2020\/12\/code-signing-certificate-560x256.png 560w\" sizes=\"auto, (max-width: 905px) 100vw, 905px\" \/><figcaption class=\"wp-element-caption\">A side-by-side comparison of what it looks like to end users who download your software when you do or don&#8217;t use a code signing certificate.<\/figcaption><\/figure>\n\n\n\n<p>As you can see in the screenshot above, the security dialogue box is showing &#8220;Microsoft Corporation&#8221; in the verified publisher&#8217;s field. It is Microsoft&#8217;s digital signature that no one can modify, change, replicate, or remove. A third-party certificate authority conducts a rigorous verification process before granting a code signing certificate to a publisher.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Public Key vs Private Key in Two-Way Authentication<\/h2>\n\n\n\n<p>The public key and private key are also useful for two-way authentication, or what\u2019s known as client authentication. Organizations don\u2019t want any outsiders to access their intranet websites, development and testing sites, and some resources made strictly for internal usage. In the same way, some sensitive internal emails shouldn\u2019t be opened by outsiders. In this situation, the private key and public key helps to develop two-way authentication.<\/p>\n\n\n\n<p>Some certificates (like \u201c<a href=\"https:\/\/sectigostore.com\/page\/2-way-ssl-certificate\/\">two-way SSL\/TLS certs<\/a>,\u201d or what are known as personal authentication certificates or client authentication certificates) can be installed on employees\u2019 office devices to enable two-way authentication where the server can verify the client. (With traditional SSL\/TLS certificates, for example, it\u2019s typically one-way authentication in that the client authenticates the server, not vice versa.)<\/p>\n\n\n\n<p><strong>Example<\/strong>: Suppose Alice and Bob are working for an organization with installed email signing certificates on their email clients. When Alice sends an email to Bob, she uses Bob\u2019s public key and her private key to encrypt and sign the email. When Bob receives the email, he decrypts it using his private key and Alice\u2019s public key. No one else can open and read the email content because they don\u2019t have the private key.<\/p>\n\n\n\n<p><strong>Personal Authentication Certificate:<\/strong> In the same way, personal authentication certificates (client certificates) are installed on the employees\u2019 company devices (desktop, laptop, and even smartphones). Both the client and server have a set of a public key and private key. When employees try to open the website, the traditional TLS handshake process takes place first, where the server presents its SSL\/TLS certificate, and the client authenticates it. After that, the client also provides its certificate for the server to authenticate.<\/p>\n\n\n\n<p>Let\u2019s understand this process a bit better with another example:<\/p>\n\n\n\n<p>John is a remote software developer working for XYZ corporation. The company has developed an intranet website intranet.xyz.com, which only employees can access. XYZ has provided a laptop to John for office work in which a client certificate is installed. Whenever John tries to open intranet.xyz.com, his browser checks the website&#8217;s SSL\/TLS certificate as part of the TLS handshake process.<\/p>\n\n\n\n<p>As part of the handshake, John&#8217;s device needs to present its certificate, which the website&#8217;s server authenticates. Only once this process is complete can John access the intranet site. In this way, John can\u2019t access intranet.xyz.com from any device other than his office laptop.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Wrapping Up on Public Key vs Private Key<\/h2>\n\n\n\n<p>Encryption has two types. <a href=\"https:\/\/sectigostore.com\/blog\/types-of-encryption-what-to-know-about-symmetric-vs-asymmetric-encryption\/\">Symmetric and asymmetric<\/a>. In symmetric encryption, there is only one key needed for encryption and decryption. That key must be kept secret by all endpoints and users. Key distribution and key management are challenges, and chances of compromise of key increase when a large number of endpoints are involved.<\/p>\n\n\n\n<p>Asymmetric encryption (public key cryptography), on the other hand, is more secure when using large keys with strong entropy. That\u2019s because two keys are involved (i.e., the public key and private key). The major difference between them is that the public key encrypts data whereas the private key decrypts it. Also, you can distribute public keys freely to many endpoints without worrying about security compromise. But the private key is a precious treasure that must be protected at any cost.<\/p>\n\n\n\n<p>We hope this article has helped you to understand public key vs private key and their usage in public key cryptography.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Explore the roles of the public key and private key in public key cryptography and learn how they make secure third-party communications possible Public key vs private key \u2014 these&#8230;<\/p>\n","protected":false},"author":6,"featured_media":1913,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[9],"tags":[163,162,164],"class_list":["post-1906","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-encryption","tag-private-key","tag-public-key","tag-public-key-vs-private-key","post-with-tags"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.3 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>Public Key vs Private Key: How Do They Work? - InfoSec Insights<\/title>\n<meta name=\"description\" content=\"Public key vs private key \u2014 what are they &amp; how do they work? The answer is different when talking about asymmetric or symmetric encryption.\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/sectigostore.com\/blog\/public-key-vs-private-key-how-do-they-work\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Public Key vs Private Key: How Do They Work? - InfoSec Insights\" \/>\n<meta property=\"og:description\" content=\"Public key vs private key \u2014 what are they &amp; how do they work? The answer is different when talking about asymmetric or symmetric encryption.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/sectigostore.com\/blog\/public-key-vs-private-key-how-do-they-work\/\" \/>\n<meta property=\"og:site_name\" content=\"InfoSec Insights\" \/>\n<meta property=\"article:published_time\" content=\"2020-12-16T16:48:41+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2023-06-14T20:42:25+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/sectigostore.com\/blog\/wp-content\/uploads\/2020\/12\/public-key-vs-private-key.jpg\" \/>\n\t<meta property=\"og:image:width\" content=\"1600\" \/>\n\t<meta property=\"og:image:height\" content=\"1000\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/jpeg\" \/>\n<meta name=\"author\" content=\"Medha Mehta\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Medha Mehta\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"12 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/sectigostore.com\\\/blog\\\/public-key-vs-private-key-how-do-they-work\\\/#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/sectigostore.com\\\/blog\\\/public-key-vs-private-key-how-do-they-work\\\/\"},\"author\":{\"name\":\"Medha Mehta\",\"@id\":\"https:\\\/\\\/sectigostore.com\\\/blog\\\/#\\\/schema\\\/person\\\/41d095943b7798ade1bc3683c8822f15\"},\"headline\":\"Public Key vs Private Key: How Do They Work?\",\"datePublished\":\"2020-12-16T16:48:41+00:00\",\"dateModified\":\"2023-06-14T20:42:25+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/sectigostore.com\\\/blog\\\/public-key-vs-private-key-how-do-they-work\\\/\"},\"wordCount\":2516,\"image\":{\"@id\":\"https:\\\/\\\/sectigostore.com\\\/blog\\\/public-key-vs-private-key-how-do-they-work\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/sectigostore.com\\\/blog\\\/wp-content\\\/uploads\\\/2020\\\/12\\\/public-key-vs-private-key.jpg\",\"keywords\":[\"private key\",\"public key\",\"public key vs private key\"],\"articleSection\":[\"Encryption\"],\"inLanguage\":\"en-US\"},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/sectigostore.com\\\/blog\\\/public-key-vs-private-key-how-do-they-work\\\/\",\"url\":\"https:\\\/\\\/sectigostore.com\\\/blog\\\/public-key-vs-private-key-how-do-they-work\\\/\",\"name\":\"Public Key vs Private Key: How Do They Work? - InfoSec Insights\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/sectigostore.com\\\/blog\\\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\\\/\\\/sectigostore.com\\\/blog\\\/public-key-vs-private-key-how-do-they-work\\\/#primaryimage\"},\"image\":{\"@id\":\"https:\\\/\\\/sectigostore.com\\\/blog\\\/public-key-vs-private-key-how-do-they-work\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/sectigostore.com\\\/blog\\\/wp-content\\\/uploads\\\/2020\\\/12\\\/public-key-vs-private-key.jpg\",\"datePublished\":\"2020-12-16T16:48:41+00:00\",\"dateModified\":\"2023-06-14T20:42:25+00:00\",\"author\":{\"@id\":\"https:\\\/\\\/sectigostore.com\\\/blog\\\/#\\\/schema\\\/person\\\/41d095943b7798ade1bc3683c8822f15\"},\"description\":\"Public key vs private key \u2014 what are they & how do they work? The answer is different when talking about asymmetric or symmetric encryption.\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/sectigostore.com\\\/blog\\\/public-key-vs-private-key-how-do-they-work\\\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/sectigostore.com\\\/blog\\\/public-key-vs-private-key-how-do-they-work\\\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/sectigostore.com\\\/blog\\\/public-key-vs-private-key-how-do-they-work\\\/#primaryimage\",\"url\":\"https:\\\/\\\/sectigostore.com\\\/blog\\\/wp-content\\\/uploads\\\/2020\\\/12\\\/public-key-vs-private-key.jpg\",\"contentUrl\":\"https:\\\/\\\/sectigostore.com\\\/blog\\\/wp-content\\\/uploads\\\/2020\\\/12\\\/public-key-vs-private-key.jpg\",\"width\":1600,\"height\":1000},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/sectigostore.com\\\/blog\\\/public-key-vs-private-key-how-do-they-work\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/sectigostore.com\\\/blog\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Public Key vs Private Key: How Do They Work?\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/sectigostore.com\\\/blog\\\/#website\",\"url\":\"https:\\\/\\\/sectigostore.com\\\/blog\\\/\",\"name\":\"InfoSec Insights\",\"description\":\"SectigoStore.com Blog\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/sectigostore.com\\\/blog\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/sectigostore.com\\\/blog\\\/#\\\/schema\\\/person\\\/41d095943b7798ade1bc3683c8822f15\",\"name\":\"Medha Mehta\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/a1e5b5025e87d4e1acfd683fbede8c366e652e9ddb2164b7a0d0a77e2d9da727?s=96&d=mm&r=g\",\"url\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/a1e5b5025e87d4e1acfd683fbede8c366e652e9ddb2164b7a0d0a77e2d9da727?s=96&d=mm&r=g\",\"contentUrl\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/a1e5b5025e87d4e1acfd683fbede8c366e652e9ddb2164b7a0d0a77e2d9da727?s=96&d=mm&r=g\",\"caption\":\"Medha Mehta\"},\"description\":\"Medha is a regular contributor to InfoSec Insights. She's a tech enthusiast and writes about technology, website security, cryptography, cyber security, and data protection.\",\"sameAs\":[\"https:\\\/\\\/sectigostore.com\\\/\"]}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Public Key vs Private Key: How Do They Work? - InfoSec Insights","description":"Public key vs private key \u2014 what are they & how do they work? The answer is different when talking about asymmetric or symmetric encryption.","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:\/\/sectigostore.com\/blog\/public-key-vs-private-key-how-do-they-work\/","og_locale":"en_US","og_type":"article","og_title":"Public Key vs Private Key: How Do They Work? - InfoSec Insights","og_description":"Public key vs private key \u2014 what are they & how do they work? The answer is different when talking about asymmetric or symmetric encryption.","og_url":"https:\/\/sectigostore.com\/blog\/public-key-vs-private-key-how-do-they-work\/","og_site_name":"InfoSec Insights","article_published_time":"2020-12-16T16:48:41+00:00","article_modified_time":"2023-06-14T20:42:25+00:00","og_image":[{"width":1600,"height":1000,"url":"https:\/\/sectigostore.com\/blog\/wp-content\/uploads\/2020\/12\/public-key-vs-private-key.jpg","type":"image\/jpeg"}],"author":"Medha Mehta","twitter_card":"summary_large_image","twitter_misc":{"Written by":"Medha Mehta","Est. reading time":"12 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/sectigostore.com\/blog\/public-key-vs-private-key-how-do-they-work\/#article","isPartOf":{"@id":"https:\/\/sectigostore.com\/blog\/public-key-vs-private-key-how-do-they-work\/"},"author":{"name":"Medha Mehta","@id":"https:\/\/sectigostore.com\/blog\/#\/schema\/person\/41d095943b7798ade1bc3683c8822f15"},"headline":"Public Key vs Private Key: How Do They Work?","datePublished":"2020-12-16T16:48:41+00:00","dateModified":"2023-06-14T20:42:25+00:00","mainEntityOfPage":{"@id":"https:\/\/sectigostore.com\/blog\/public-key-vs-private-key-how-do-they-work\/"},"wordCount":2516,"image":{"@id":"https:\/\/sectigostore.com\/blog\/public-key-vs-private-key-how-do-they-work\/#primaryimage"},"thumbnailUrl":"https:\/\/sectigostore.com\/blog\/wp-content\/uploads\/2020\/12\/public-key-vs-private-key.jpg","keywords":["private key","public key","public key vs private key"],"articleSection":["Encryption"],"inLanguage":"en-US"},{"@type":"WebPage","@id":"https:\/\/sectigostore.com\/blog\/public-key-vs-private-key-how-do-they-work\/","url":"https:\/\/sectigostore.com\/blog\/public-key-vs-private-key-how-do-they-work\/","name":"Public Key vs Private Key: How Do They Work? - InfoSec Insights","isPartOf":{"@id":"https:\/\/sectigostore.com\/blog\/#website"},"primaryImageOfPage":{"@id":"https:\/\/sectigostore.com\/blog\/public-key-vs-private-key-how-do-they-work\/#primaryimage"},"image":{"@id":"https:\/\/sectigostore.com\/blog\/public-key-vs-private-key-how-do-they-work\/#primaryimage"},"thumbnailUrl":"https:\/\/sectigostore.com\/blog\/wp-content\/uploads\/2020\/12\/public-key-vs-private-key.jpg","datePublished":"2020-12-16T16:48:41+00:00","dateModified":"2023-06-14T20:42:25+00:00","author":{"@id":"https:\/\/sectigostore.com\/blog\/#\/schema\/person\/41d095943b7798ade1bc3683c8822f15"},"description":"Public key vs private key \u2014 what are they & how do they work? The answer is different when talking about asymmetric or symmetric encryption.","breadcrumb":{"@id":"https:\/\/sectigostore.com\/blog\/public-key-vs-private-key-how-do-they-work\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/sectigostore.com\/blog\/public-key-vs-private-key-how-do-they-work\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/sectigostore.com\/blog\/public-key-vs-private-key-how-do-they-work\/#primaryimage","url":"https:\/\/sectigostore.com\/blog\/wp-content\/uploads\/2020\/12\/public-key-vs-private-key.jpg","contentUrl":"https:\/\/sectigostore.com\/blog\/wp-content\/uploads\/2020\/12\/public-key-vs-private-key.jpg","width":1600,"height":1000},{"@type":"BreadcrumbList","@id":"https:\/\/sectigostore.com\/blog\/public-key-vs-private-key-how-do-they-work\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/sectigostore.com\/blog\/"},{"@type":"ListItem","position":2,"name":"Public Key vs Private Key: How Do They Work?"}]},{"@type":"WebSite","@id":"https:\/\/sectigostore.com\/blog\/#website","url":"https:\/\/sectigostore.com\/blog\/","name":"InfoSec Insights","description":"SectigoStore.com Blog","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/sectigostore.com\/blog\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Person","@id":"https:\/\/sectigostore.com\/blog\/#\/schema\/person\/41d095943b7798ade1bc3683c8822f15","name":"Medha Mehta","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/secure.gravatar.com\/avatar\/a1e5b5025e87d4e1acfd683fbede8c366e652e9ddb2164b7a0d0a77e2d9da727?s=96&d=mm&r=g","url":"https:\/\/secure.gravatar.com\/avatar\/a1e5b5025e87d4e1acfd683fbede8c366e652e9ddb2164b7a0d0a77e2d9da727?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/a1e5b5025e87d4e1acfd683fbede8c366e652e9ddb2164b7a0d0a77e2d9da727?s=96&d=mm&r=g","caption":"Medha Mehta"},"description":"Medha is a regular contributor to InfoSec Insights. She's a tech enthusiast and writes about technology, website security, cryptography, cyber security, and data protection.","sameAs":["https:\/\/sectigostore.com\/"]}]}},"_links":{"self":[{"href":"https:\/\/sectigostore.com\/blog\/wp-json\/wp\/v2\/posts\/1906","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/sectigostore.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/sectigostore.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/sectigostore.com\/blog\/wp-json\/wp\/v2\/users\/6"}],"replies":[{"embeddable":true,"href":"https:\/\/sectigostore.com\/blog\/wp-json\/wp\/v2\/comments?post=1906"}],"version-history":[{"count":5,"href":"https:\/\/sectigostore.com\/blog\/wp-json\/wp\/v2\/posts\/1906\/revisions"}],"predecessor-version":[{"id":3239,"href":"https:\/\/sectigostore.com\/blog\/wp-json\/wp\/v2\/posts\/1906\/revisions\/3239"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/sectigostore.com\/blog\/wp-json\/wp\/v2\/media\/1913"}],"wp:attachment":[{"href":"https:\/\/sectigostore.com\/blog\/wp-json\/wp\/v2\/media?parent=1906"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/sectigostore.com\/blog\/wp-json\/wp\/v2\/categories?post=1906"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/sectigostore.com\/blog\/wp-json\/wp\/v2\/tags?post=1906"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}