{"id":13449,"date":"2020-11-04T09:35:00","date_gmt":"2020-11-04T14:35:00","guid":{"rendered":"https:\/\/www.thesslstore.com\/blog\/?p=13449"},"modified":"2023-03-20T14:05:00","modified_gmt":"2023-03-20T18:05:00","slug":"symmetric-encryption-101-definition-how-it-works-when-its-used","status":"publish","type":"post","link":"https:\/\/www.thesslstore.com\/blog\/symmetric-encryption-101-definition-how-it-works-when-its-used\/","title":{"rendered":"Symmetric Encryption 101: Definition, How It Works &#038; When It\u2019s Used"},"content":{"rendered":"\n<h2 class=\"wp-block-heading\" id=\"h-symmetric-key-encryption-is-part-of-virtually-everything-you-do-online-we-ll-break-down-everything-you-need-to-know-about-what-it-is-and-how-and-where-you-re-using-it\">Symmetric key encryption is part of virtually everything you do online. We\u2019ll break down everything you need to know about what it is and how and where you\u2019re using it\u2026<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">Although you may not realize it, symmetric encryption is in use just about everywhere you look. It\u2019s part of what makes it possible to do everything from secure online banking to ordering your groceries for delivery.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">But what is symmetric key encryption? If you peek \u201cunder the hood,\u201d how does symmetric encryption work? And what role does it play in your daily life online?<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Let\u2019s hash it out.<span id=\"newline\"><\/span><\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><em><strong>Editor&#8217;s Note: <\/strong>This article is the first in a series of articles on symmetric encryption. Be sure to check out the related articles below:<\/em><\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><em><a href=\"https:\/\/www.thesslstore.com\/blog\/asymmetric-vs-symmetric-encryption\/\">Asymmetric vs Symmetric Encryption: Definitions &amp; Differences<\/a><\/em><\/li>\n\n\n\n<li><em><a href=\"https:\/\/www.thesslstore.com\/blog\/symmetric-encryption-algorithms\/\">Symmetric Encryption Algorithms: Live Long &amp; Encrypt<\/a><\/em><\/li>\n\n\n\n<li><em><a href=\"https:\/\/www.thesslstore.com\/blog\/block-cipher-vs-stream-cipher\/\">Block Cipher vs Stream Cipher: What They Are &amp; How They Work<\/a><\/em><\/li>\n<\/ul>\n\n\n<span style=\"display:none\" class=\"tl-placeholder-f-type-shortcode_12753\"><\/span>\n\n\n<h2 class=\"wp-block-heading\" id=\"h-what-is-symmetric-encryption-what-does-it-do-a-definition-explanation\">What Is Symmetric Encryption &amp; What Does It Do? A Definition &amp; Explanation<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">To put this in the simplest terms possible,<strong> symmetric encryption<\/strong> is a type of encryption that uses the same key to encrypt and decrypt data. Both the sender and the recipient have identical copies of the key, which they keep secret and don\u2019t share with anyone. This differs from <strong>asymmetric encryption<\/strong>, which uses two keys \u2014 a public key (that anyone can access) to encrypt information and a private key to decrypt information.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Just in case it\u2019s helpful, let\u2019s do a quick review of how encryption works in general:<\/p>\n\n\n\n<ol class=\"wp-block-list\" type=\"1\">\n<li>The sender uses an encryption key (usually a string of letters and numbers) to encrypt their message.<\/li>\n\n\n\n<li>The encrypted message, called ciphertext, looks like scrambled letters and can\u2019t be read by anyone along the way.<\/li>\n\n\n\n<li>The recipient uses a decryption key to transform the ciphertext back into readable text.<\/li>\n<\/ol>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"664\" height=\"408\" src=\"https:\/\/www.thesslstore.com\/blog\/wp-content\/uploads\/2020\/11\/how-encryption-works-symmetric-encryption.png\" alt=\"Symmetric encryption graphic that shows how symmetric encryption works\" class=\"wp-image-13450\" srcset=\"https:\/\/www.thesslstore.com\/blog\/wp-content\/uploads\/2020\/11\/how-encryption-works-symmetric-encryption.png 664w, https:\/\/www.thesslstore.com\/blog\/wp-content\/uploads\/2020\/11\/how-encryption-works-symmetric-encryption-300x184.png 300w\" sizes=\"auto, (max-width: 664px) 100vw, 664px\" \/><figcaption class=\"wp-element-caption\">This is an example of using AES 128 encryption.<\/figcaption><\/figure>\n<\/div>\n\n\n<p class=\"wp-block-paragraph\">In the example above, we used the same key for encryption and decryption, which means this is symmetric encryption.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Only these two parties (sender and recipient) can read and access the data. This is why it\u2019s also sometimes called <strong>secret key encryption<\/strong>, <strong>secret key cryptography<\/strong>, <strong>private key cryptography<\/strong>, <strong>symmetric cryptography<\/strong> and <strong>symmetric key encryption<\/strong>.<\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"664\" height=\"188\" src=\"https:\/\/www.thesslstore.com\/blog\/wp-content\/uploads\/2020\/11\/symmetric-encryption.png\" alt=\"How does symmetric encryption work? This graphic illustrates the concept\" class=\"wp-image-13451\" srcset=\"https:\/\/www.thesslstore.com\/blog\/wp-content\/uploads\/2020\/11\/symmetric-encryption.png 664w, https:\/\/www.thesslstore.com\/blog\/wp-content\/uploads\/2020\/11\/symmetric-encryption-300x85.png 300w\" sizes=\"auto, (max-width: 664px) 100vw, 664px\" \/><figcaption class=\"wp-element-caption\">How does symmetric key encryption work? This simplified graphic illustrates the basic concept of how symmetric key encryption works: two identical keys encrypt and decrypt data.<\/figcaption><\/figure>\n<\/div>\n\n\n<p class=\"wp-block-paragraph\">Having only one key to serve both the encryption and decryption functions simplifies the encryption process. After all, you\u2019re applying one key to turn plaintext, readable information into unreadable gibberish (ciphertext) and vice versa. One of the advantages of using symmetric encryption is that it provides data privacy and confidentiality without the extra complexity of multiple keys.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Symmetric key encryption does work on its own, for certain use cases. For example, it\u2019s useful for encrypting databases and files, where you\u2019re not exchanging data publicly between parties. But as with any technical process, there are other advantages and disadvantages of using symmetric key encryption, such as key distribution and management issues, and we\u2019ll talk about those a little later. But for now, let\u2019s talk about the history of symmetric encryption.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"h-symmetric-key-encryption-isn-t-a-new-concept\">Symmetric Key Encryption Isn\u2019t a New Concept<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">While symmetric key encryption in the sense of encoding digital data through the use of computers is relatively new (it\u2019s been around since the mid-1900s), the concept behind isn\u2019t. Symmetric cryptography itself is a process that\u2019s thought to have been created thousands of years ago.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">An early example of symmetric encryption \u2014 and probably the best-known symmetric cipher \u2014 is attributed to the Roman General Julius Caesar. This particular cipher is aptly known as the Caesar Cipher (more on that in a couple of minutes). However, there have been other types of symmetric ciphers that have existed throughout history, including everything from the <a href=\"https:\/\/www.britannica.com\/topic\/Vigenere-cipher\">Vigen\u00e8re&nbsp;Cipher<\/a> \u2014 which dates back to the 1500s \u2014 to the modern AES algorithm (more on that later). &nbsp;<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Symmetric key encryption is a way for you to encrypt a message so that only you and your intended recipient can read it. It\u2019s one type of data encryption, but it\u2019s not the only one. There\u2019s also another type of encryption that\u2019s close in name but is different in terms of what it does: asymmetric encryption. We mentioned it earlier, but just know that asymmetric encryption is what makes it possible to authenticate and exchange symmetric keys via public channels (such as the internet).<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">However, we aren\u2019t going to hash out all of the specifics of asymmetric encryption here. That\u2019s a topic for another time. In the meantime, though, we invite you to check out this article on the differences between <a href=\"https:\/\/www.thesslstore.com\/blog\/difference-asymmetric-encryption-algorithms-vs-symmetric-encryption-algorithms\/\">asymmetric vs symmetric encryption<\/a> to learn more about the topic.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">So, for now, let\u2019s stay the course and continue our journey of exploring the world of symmetric encryption.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"h-how-does-symmetric-encryption-work\">How Does Symmetric Encryption Work?<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">It\u2019s time to take a closer look at the symmetric encryption process. To understand how symmetric cryptography works, you need to know what the components are that are involved in the process:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Your original message that you wish to encrypt (plaintext data).<\/li>\n\n\n\n<li>A symmetric key encryption algorithm (we\u2019ll touch on the different types of algorithms a bit later).<\/li>\n\n\n\n<li>An identical secret key that only you and your intended recipient have that encrypts and decrypts the data.<\/li>\n\n\n\n<li>The encrypted message that no one can read (cipher text).<\/li>\n<\/ul>\n\n\n\n<p class=\"wp-block-paragraph\">The way that symmetric encryption works is by encrypting and decrypting data through the use of identical keys. The data, once encrypted into ciphertext, can\u2019t be read or otherwise understood by anyone who doesn\u2019t have the key. This means that you and the party you\u2019re communicating with both need to have an identical copy of the key to communicate securely.&nbsp;<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">To better understand how symmetric encryption works and how all of these components work together, let\u2019s consider a basic type of symmetric encryption known as the Caesar cipher.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"h-how-a-basic-shift-cipher-substitution-cipher-works\">How a Basic Shift Cipher (Substitution Cipher) Works<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">An easy way to think of this is to think of this encryption process is through the use of a Caesar cipher, or what\u2019s known as a substitution or <a href=\"https:\/\/www.khanacademy.org\/computing\/computer-science\/cryptography\/ciphers\/a\/shift-cipher\">shift cipher<\/a>. This was a method by which Caesar was able to secretly communicate with his generals without anyone being able to read the messages (even if the message carriers were intercepted).<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">In this case, a <strong>cipher<\/strong>, also known as an <strong>algorithm<\/strong>, is a number or sequence of steps that you\u2019d use to convert plain text information into unreadable ciphertext. With a basic shift cipher, you can encrypt and decrypt a message simply by shifting the message along the alphabet a set number of spaces.<\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"664\" height=\"167\" src=\"https:\/\/www.thesslstore.com\/blog\/wp-content\/uploads\/2020\/11\/caesar-cipher-shift-cipher.png\" alt=\"Caesar cipher shift cipher example\" class=\"wp-image-13452\" srcset=\"https:\/\/www.thesslstore.com\/blog\/wp-content\/uploads\/2020\/11\/caesar-cipher-shift-cipher.png 664w, https:\/\/www.thesslstore.com\/blog\/wp-content\/uploads\/2020\/11\/caesar-cipher-shift-cipher-300x75.png 300w\" sizes=\"auto, (max-width: 664px) 100vw, 664px\" \/><figcaption class=\"wp-element-caption\">An illustration of how a shift cipher works<\/figcaption><\/figure>\n<\/div>\n\n\n<p class=\"wp-block-paragraph\">Imagine writing out the entire alphabet in a single long line. And when you use the shift cipher, you\u2019d shift any given letter X number of spaces. So, if you were to shift the letter \u201cG\u201d by nine spaces, it would become \u201cP.\u201d The letter \u201cO\u201d would become \u201cX.\u201d This means that the message \u201cGood morning, sunshine,\u201d for example, then becomes \u201cPxxm vxawrwp bdwbqrwn\u201d when you shift each letter nine spaces to the right.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">So, the key in a Caesar cipher is the secret value that only you and your recipient know, which tells you how many letters to shift.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Nowadays, however, we\u2019re not passing paper messages back and forth. Today\u2019s information exchanges take place through virtual channels via computers, websites, and the internet in general. And while the internet makes things incredibly convenient, banking online or paying for a rideshare over the internet doesn\u2019t come without its risks.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"h-the-role-of-symmetric-key-encryption-in-website-security\">The Role of Symmetric Key Encryption in Website Security<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">Symmetric key encryption is part of the <a href=\"https:\/\/www.thesslstore.com\/blog\/what-is-pki-a-crash-course-on-public-key-infrastructure-pki\/\">public key infrastructure<\/a> (PKI) ecosystem, which makes it possible to communicate securely across the insecure internet by converting plain text (readable) data into unrecognizable ciphertext. In fact, you\u2019re using PKI-based technologies and processes right now as part of your connection to TheSSLStore.com to read this article.<\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"317\" height=\"71\" src=\"https:\/\/www.thesslstore.com\/blog\/wp-content\/uploads\/2020\/11\/url-padlock-icon.png\" alt=\"HTTPS padlock example\" class=\"wp-image-13453\" srcset=\"https:\/\/www.thesslstore.com\/blog\/wp-content\/uploads\/2020\/11\/url-padlock-icon.png 317w, https:\/\/www.thesslstore.com\/blog\/wp-content\/uploads\/2020\/11\/url-padlock-icon-300x67.png 300w\" sizes=\"auto, (max-width: 317px) 100vw, 317px\" \/><figcaption class=\"wp-element-caption\">A screenshot of the padlock icon in a browser&#8217;s URL bar (when using Google Chrome).<\/figcaption><\/figure>\n<\/div>\n\n\n<p class=\"wp-block-paragraph\">See that padlock in your browser\u2019s URL bar? It means that our website has a <a href=\"https:\/\/www.thesslstore.com\/blog\/what-is-a-website-security-certificate-and-what-does-it-do-for-your-business\/\">website security certificate<\/a> (SSL\/TLS certificate) installed and you\u2019re using a secure, encrypted connection to send data. This is what helps to make it possible to connect to our website using the secure HTTPS protocol instead of the insecure HTTP one.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">What this also means is that your browser (client) has already gone through the process of:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Authenticating our website\u2019s server,<\/li>\n\n\n\n<li>Negotiating with the server on the <a href=\"https:\/\/www.thesslstore.com\/blog\/types-of-encryption-encryption-algorithms-how-to-choose-the-right-one\/\">encryption algorithms<\/a> to use, and<\/li>\n\n\n\n<li>Generating symmetric session keys.<\/li>\n<\/ul>\n\n\n\n<p class=\"wp-block-paragraph\"><a href=\"https:\/\/www.thesslstore.com\/blog\/how-does-https-work\/\">The way that HTTPS works<\/a> is that we use asymmetric encryption to first authenticate the website server and to exchange symmetric session keys. This is part of a process known as the TLS handshake \u2014 of which there are three versions (TLS 1.0, TLS 1.2 and TLS 1.3). After that, we use symmetric encryption for the actual bulk of the data encryption that takes place during your session.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">In general, the TLS handshake:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Enables our web server to authenticate itself to your browser (web client),<\/li>\n\n\n\n<li>Establishes parameters to use for secure communication (such deciding which encryption algorithm to use),<\/li>\n\n\n\n<li>Determines which key exchange protocol to use, and<\/li>\n\n\n\n<li>Generates a session key that only the two communicating parties know using that algorithm and other public and private variables.<\/li>\n<\/ul>\n\n\n\n<p class=\"wp-block-paragraph\">The reason for the change to symmetric encryption is that it\u2019s faster and less resource-intensive than asymmetric encryption when you\u2019re encrypting massive quantities of data. This is particularly important for enterprises who encrypt data at scale. (Think of banks and large companies.)<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">We won\u2019t get into all of the specifics of the handshake here \u2014 you\u2019ll find a deep dive on that topic in our article on the <a href=\"https:\/\/www.thesslstore.com\/blog\/explaining-ssl-handshake\/\">TLS handshake<\/a>. But let\u2019s explore a few of the encryption algorithms that fall under the symmetric encryption umbrella.<\/p>\n\n\n<span style=\"display:none\" class=\"tl-placeholder-f-type-shortcode_12653\"><\/span>\n\n\n<h3 class=\"wp-block-heading\" id=\"h-symmetric-encryption-algorithms\">Symmetric Encryption Algorithms<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\"><a href=\"https:\/\/www.thesslstore.com\/blog\/symmetric-encryption-algorithms\/\">Symmetric algorithms<\/a> are broken down into two main types: stream and block ciphers. Block ciphers encrypt data in chunks (blocks), whereas stream ciphers encrypt data one bit at a time. So, what are some of the most commonly used or well-known symmetric algorithms?<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>Data Encryption Standard (DES)<\/strong> \u2014 DES is a type of block cipher that encrypts data in 64-bit blocks and using a single key that is one of three sizes (64-bit, 128-bit and 192-bit keys). However, one of every 8 bits is a parity bit, meaning that a single-length key that\u2019s 64 bits is really like using a 56-bit key. Although DES is one of the earliest symmetric encryption algorithms, it\u2019s viewed as insecure and has been deprecated. &nbsp;<\/li>\n\n\n\n<li><strong>Triple Data Encryption Standard (TDEA\/3DES)<\/strong> \u2014 Unlike DES, triple DES can use two or three keys, which enables this algorithm to use multiple rounds of encryption (or, more accurate, a round of encryption, round of decryption, and another round of encryption). While 3DES is more secure than its DES predecessor, it\u2019s not as secure as its successor, AES.<\/li>\n\n\n\n<li><strong>Advanced Encryption Standard (AES)<\/strong> \u2014 This encryption algorithm is what you\u2019ll most commonly find is use across the internet. The <a href=\"https:\/\/www.thesslstore.com\/blog\/advanced-encryption-standard-aes-what-it-is-and-how-it-works\/\">advanced encryption standard<\/a> is more secure and efficient than DES and 3DES with key options that are 128 bits, 192 bits and 256 bits. However, while it\u2019s also a type of block cipher, it operates differently than DES and 3DES because it\u2019s based on a substitution-permutation network instead of the Feistel cipher. &nbsp;<\/li>\n<\/ul>\n\n\n\n<p class=\"wp-block-paragraph\">Of course, we\u2019re going to cover these three symmetric key algorithms \u2014 along with the differences between block and stream ciphers \u2014 in the coming weeks in additional articles. But for now, let\u2019s move on to discussing the \u201csecret\u201d in secret key encryption.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"h-for-symmetric-encryption-to-work-the-key-must-stay-secret\">For Symmetric Encryption to Work, the Key Must Stay Secret\u2026<\/h3>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"663\" height=\"341\" src=\"https:\/\/www.thesslstore.com\/blog\/wp-content\/uploads\/2020\/11\/top-secret.jpg\" alt=\"A top secret warning -- your symmetric encryption key should be kept secret\" class=\"wp-image-13454\" srcset=\"https:\/\/www.thesslstore.com\/blog\/wp-content\/uploads\/2020\/11\/top-secret.jpg 663w, https:\/\/www.thesslstore.com\/blog\/wp-content\/uploads\/2020\/11\/top-secret-300x154.jpg 300w\" sizes=\"auto, (max-width: 663px) 100vw, 663px\" \/><\/figure>\n<\/div>\n\n\n<p class=\"wp-block-paragraph\">For symmetric encryption to work, however, it means that you and your intended recipient both must know the key and keep it secret. Otherwise, if someone else knows the key, then they can decrypt your data and read it, which makes the entire encryption process pointless. That\u2019s why it\u2019s vital to keep the secret key secret and away from prying eyes to limit the number of people who have the key.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">As such, you should never store secret or private keys in any internet-facing environment. This is true for both asymmetric encryption private keys as well as symmetric keys. You need to keep those keys hidden somewhere where no one is going to be able to find, access, or steal them. Basically, protect those keys like you would a lifetime paid subscription that someone gave you to your favorite gaming service \u2014 \u2018cause I know that <em>no one\u2019s<\/em> getting their hands on that.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">But the tricky part with symmetric encryption is that there\u2019s an assumption that you and your recipient both already have identical copies of the key. But what do you do if you and your recipient have never met, and if you don\u2019t already have those identical keys?<\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"h-remote-key-distribution-how-to-share-a-key-securely-to-facilitate-symmetric-encryption\">Remote Key Distribution: How to Share a Key Securely to Facilitate Symmetric Encryption<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">Let\u2019s say that you want to share secret messages with your friend, Erica, who\u2019s in another country but she doesn\u2019t have a key to decrypt said messages. This means you\u2019d need to get a shared key to her so that she can securely decrypt the message.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">To do this, you\u2019d have to send the secret key across the internet \u2014 which you know is anything but secure. After all, your internet connection gets bounced through potentially <em>dozens<\/em> of different touchpoints in its journey. This means that any Tom, Dick or Harry \u2014 any cybercriminal, government, or anyone else you don\u2019t want reading your messages \u2014 could intercept the key en route and decrypt your messages with ease, and you\u2019d be none the wiser. This is known as a <a href=\"https:\/\/www.thesslstore.com\/blog\/man-in-the-middle-attack\/\">man-in-the-middle attack<\/a> (MitM).<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">So, sending data (especially keys) across the internet isn\u2019t a good idea, which means we need to look at an alternative method. This is where asymmetric tactics \u2014 such as asymmetric key exchange (i.e. key generation) methods like RSA and Diffie-Hellman \u2014 come into play.<\/p>\n\n\n\n<h4 class=\"wp-block-heading\" id=\"h-the-role-of-key-exchange-protocols\">The Role of Key Exchange Protocols<\/h4>\n\n\n\n<p class=\"wp-block-paragraph\">Earlier, we touched on the fact that <a href=\"https:\/\/www.thesslstore.com\/blog\/symmetric-encryption-algorithms\/\">symmetric encryption algorithms<\/a> aren\u2019t the only algorithms out there that PKI depends upon. There are also asymmetric algorithms and asymmetric key exchange protocols. So, if you\u2019re trying to communicate securely with your friend Erica using symmetric key cryptography, you\u2019ll use asymmetric encryption tactics to generate and share a secure key that only you and Erica will know.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Historically, symmetric <a href=\"https:\/\/www.thesslstore.com\/blog\/is-it-still-safe-to-use-rsa-encryption\/\">encryption is paired with either RSA<\/a> or Diffie-Hellman asymmetric algorithms (i.e., key exchange protocols) for the key exchange\/generation process. However, these two algorithms have separate roles.<\/p>\n\n\n\n<h5 class=\"wp-block-heading\" id=\"h-rsa-vs-diffie-hellman-key-exchanges\">RSA vs Diffie-Hellman Key Exchanges<\/h5>\n\n\n\n<p class=\"wp-block-paragraph\">The RSA encryption algorithm, which stands for Rivest-Shamir-Adleman (the surnames of the three people who created it), is an authentication and key exchange mechanism that\u2019s commonly used in the TLS 1.2 handshake process. In an RSA key exchange, public key encryption facilitates the exchange of a pre-master secret and a randomly generate number from the client that, together, generate a shared session key.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">With the Diffie-Hellman key exchange, the server and client instead mutually agree upon a value that\u2019s used for the session key. (More on that shortly.)<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">However, the use of <a href=\"https:\/\/www.thesslstore.com\/blog\/bleichenbachers-cat-rsa-key-exchange\/\">RSA for key exchanges<\/a> is frowned upon (although some systems are still using it) due to vulnerabilities that were discovered by cryptologist Daniel Bleichenbacher. In fact, the RSA key exchange cipher suites (and non-ephemeral Diffie-Hellman groups) were deprecated with the rollout of TLS 1.3 in an effort to mandate perfect forward secrecy (which uses an ephemeral key). So, RSA key exchange was replaced by the exclusive use of ephemeral Diffie-Hellman key exchanges.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">The Diffie-Hellman key exchange algorithm is a public key distribution system that uses modular arithmetic to come to an agreed upon secret number (session key). So, as you can see, calling Diffie-Hellman an \u201cencryption\u201d algorithm is actually misleading because it can\u2019t be used to encrypt or decrypt anything. And it\u2019s not so much a key \u201cexchange\u201d as it is a key <em>generation<\/em> process. Yes, there are variables exchanged, but you\u2019re still actually creating the key based on those exchanges.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Diffie-Hellman uses the exchange of public variables (numbers) to generate a shared solution known as a session key. This secret session key is what you\u2019d use to exchange data in a secure channel that\u2019s protected by symmetric encryption.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Check out this great video to see how the Diffie-Hellman key exchange process works using colors:<\/p>\n\n\n\n<figure class=\"wp-block-embed is-type-video is-provider-youtube wp-block-embed-youtube wp-embed-aspect-4-3 wp-has-aspect-ratio\"><div class=\"wp-block-embed__wrapper\">\n<iframe loading=\"lazy\" title=\"Public key cryptography - Diffie-Hellman Key Exchange (full version)\" width=\"960\" height=\"720\" src=\"https:\/\/www.youtube.com\/embed\/YEBfamv-_do?start=126&#038;feature=oembed\" frameborder=\"0\" allow=\"accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share\" allowfullscreen><\/iframe>\n<\/div><\/figure>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"h-how-secure-are-symmetric-keys\">How Secure Are Symmetric Keys?<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">The strength of any cryptographic key depends on a few specific considerations.<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>The length of the key,<\/li>\n\n\n\n<li>The randomness (entropy) of how it was generated, and<\/li>\n\n\n\n<li>How long it takes to reverse it to figure out is individual components.<\/li>\n<\/ul>\n\n\n\n<p class=\"wp-block-paragraph\">Now, you may be wondering whether a cybercriminal could just reverse the process to guess the variables to calculate the numbers that were used. It\u2019s possible, but the reality of that happening is so remote that it\u2019s not practical. I say that because even though cybercriminals understand how these calculations work, it\u2019s incredibly difficult to reverse the process to find out the secret number you or your recipient used to generate your matching session keys.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">It goes back to the concept that was discussed in the video that shows the uses of mixing of specific colors to create a shared value. While it\u2019s easy to combine colors to create the shared value, it\u2019s virtually impossible to deconstruct those values to figure out exactly which shades of the colors were used to create them.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Furthermore, since the numbers that are used in these calculations are massive, it would take way longer than any cybercriminal would have during a session to figure them out. Even with the most current supercomputers, an attacker would have to spend hundreds \u2014 if not thousands of years \u2014 trying to figure out the individual numbers you both used. I don\u2019t know about you, but we mortals don\u2019t have that much time to spend on such tasks.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">So, now that we know what symmetric encryption is and how it works, how is it used in the real world?<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"h-examples-of-where-you-re-already-using-symmetric-encryption\">Examples of Where You\u2019re Already Using Symmetric Encryption<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">Symmetric encryption is useful in many cases and has implementation opportunities across various industries. For example, symmetric encryption is useful for encrypting banking-related data as well as data storage.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"h-banking\">Banking<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">Ever heard of PCI DSS? The <a href=\"https:\/\/www.pcisecuritystandards.org\/documents\/PCI_DSS_v3-2-1.pdf?agreement=true&amp;time=1604330901416\">Payment Card Industry Data Security Standards<\/a> is a set of 12 requirements that businesses or organizations that accept credit card payments must adhere to. Symmetric encryption is a key component of <a href=\"https:\/\/www.thesslstore.com\/blog\/demystifying-pci-dss-compliance\/\">PCI compliance<\/a>, as it directly correlates to requirement No. 3, which focuses on protecting at-rest cardholder data.&nbsp;<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">This different from requirement No. 4, which focuses on protecting in-transit data. That\u2019s all about using asymmetric encryption (basically, the SSL\/TLS and HTTPS we were talking about earlier).<\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"h-data-at-rest\">Data At Rest<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">Data at rest refers to the state of your data while it\u2019s sitting on a server or a device. It\u2019s not in transit, meaning that it\u2019s not being sent across a network or the internet. So, consider the example of a private ledger or a diary. You write either highly valuable or sensitive information in it that you don\u2019t want anyone other people to read. So, while you\u2019re not sending it anywhere, it doesn\u2019t mean that you want someone else to be able to read its contents should they manage to get their hands on it. At rest data encryption is what prevents that type of exposure from happening.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Wondering what products or services you use that incorporate symmetric encryption into their platforms or tools? Here\u2019s just a handful of such services:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>CodeGuard <\/strong>\u2014 <a href=\"https:\/\/www.thesslstore.com\/knowledgebase\/other-codeguard\/codeguard-faqs\/\">CodeGuard<\/a> is a website backup tool that uses AES-256 encryption to secure your backups.<\/li>\n\n\n\n<li><strong>Google Suite<\/strong> \u2014 Many of Google\u2019s <a href=\"https:\/\/support.google.com\/googlecloud\/answer\/6056693?hl=en\">G Suite services use at-rest data encryption<\/a> (in addition to in-transit encryption via HTTPS) to secure your data.<\/li>\n\n\n\n<li><strong>Microsoft Azure<\/strong> \u2014 <a href=\"https:\/\/docs.microsoft.com\/en-us\/azure\/security\/fundamentals\/encryption-atrest\">Azure Encryption<\/a> uses symmetric encryption to encrypt and decrypt lots quantities of data quickly.<\/li>\n\n\n\n<li><strong>SalesForce<\/strong> \u2014 The <a href=\"https:\/\/www.salesforce.com\/content\/dam\/web\/en_us\/www\/documents\/reports\/wp-platform-encryption-architecture.pdf\">SaleForce Platform<\/a> uses AES-256 encryption to secure data at rest.<\/li>\n<\/ul>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"h-https-and-website-security\">HTTPS and Website Security<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">We already touched on this earlier. Remember how we talked about how symmetric encryption is a part of the HTTPS process? This is where asymmetric encryption is used to facilitate a key exchange between two parties, and then identical symmetric session keys are what\u2019s used to actually process the encryption for the session.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">So, this means that symmetric encryption is an integral component of website security.<\/p>\n\n\n<span style=\"display:none\" class=\"tl-placeholder-f-type-shortcode_12753\"><\/span>\n\n\n<h2 class=\"wp-block-heading\" id=\"h-final-thoughts-on-symmetric-key-encryption\">Final Thoughts on Symmetric Key Encryption<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">Okay, we\u2019ve reached the finish line. Needless to say, breaking down what symmetric key cryptography is and how symmetric encryption works is a lot to take in. I hope this article has provided you with insights that will help you better understand the process and its role in cybersecurity.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">One quick note: This blog post is the first in a group of articles that we\u2019re going to publish in the coming weeks that break down various aspects of symmetric encryption. So, be sure to keep an eye out and check back for those upcoming articles on Hashed Out as well.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Although symmetric cryptography is an old method of encryption, it still holds an invaluable place in our digital world.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Symmetric key encryption is part of virtually everything you do online. We\u2019ll break down everything you need to know about what it is and how and where you\u2019re using it\u2026&#8230;<\/p>\n","protected":false},"author":17,"featured_media":13456,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"inline_featured_image":false,"footnotes":"","tve_updated_post":"","tve_custom_css":"","tve_user_custom_css":"","tve_globals":{},"tcb2_ready":0,"tcb_editor_enabled":0,"tve_landing_page":"","_tve_header":"","_tve_footer":""},"categories":[13107,130],"tags":[13102,12264],"class_list":["post-13449","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-beyond-hashed-out","category-everything-encryption","tag-how-symmetric-encryption-works","tag-symmetric","post-with-tags"],"views":85330,"jetpack_featured_media_url":"https:\/\/www.thesslstore.com\/blog\/wp-content\/uploads\/2020\/11\/symmetric-encryption.jpg","_links":{"self":[{"href":"https:\/\/www.thesslstore.com\/blog\/wp-json\/wp\/v2\/posts\/13449","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.thesslstore.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.thesslstore.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.thesslstore.com\/blog\/wp-json\/wp\/v2\/users\/17"}],"replies":[{"embeddable":true,"href":"https:\/\/www.thesslstore.com\/blog\/wp-json\/wp\/v2\/comments?post=13449"}],"version-history":[{"count":0,"href":"https:\/\/www.thesslstore.com\/blog\/wp-json\/wp\/v2\/posts\/13449\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.thesslstore.com\/blog\/wp-json\/wp\/v2\/media\/13456"}],"wp:attachment":[{"href":"https:\/\/www.thesslstore.com\/blog\/wp-json\/wp\/v2\/media?parent=13449"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.thesslstore.com\/blog\/wp-json\/wp\/v2\/categories?post=13449"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.thesslstore.com\/blog\/wp-json\/wp\/v2\/tags?post=13449"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}