<?xml version='1.0'?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:georss="http://www.georss.org/georss" xmlns:atom="http://www.w3.org/2005/Atom" >
<channel>
	<title><![CDATA[Signet Loupe: A Deep Dive on End-to-End Encryption: How Do Public Key Encryption Systems Work?]]></title>
	<link>https://ememiom.fr/iom/blog/view/695/a-deep-dive-on-end-to-end-encryption-how-do-public-key-encryption-systems-work</link>
	<atom:link href="https://ememiom.fr/iom/blog/view/695/a-deep-dive-on-end-to-end-encryption-how-do-public-key-encryption-systems-work" rel="self" type="application/rss+xml" />
	<description><![CDATA[]]></description>
	
	<item>
	<guid isPermaLink="true">https://ememiom.fr/iom/blog/view/695/a-deep-dive-on-end-to-end-encryption-how-do-public-key-encryption-systems-work</guid>
	<pubDate>Thu, 19 Aug 2021 21:57:38 +0000</pubDate>
	<link>https://ememiom.fr/iom/blog/view/695/a-deep-dive-on-end-to-end-encryption-how-do-public-key-encryption-systems-work</link>
	<title><![CDATA[A Deep Dive on End-to-End Encryption: How Do Public Key Encryption Systems Work?]]></title>
	<description><![CDATA[<p dir="ltr" id="docs-internal-guid-ffcda0dd-618e-0858-d389-420296479710">If used correctly, <a href="https://ssd.eff.org/en/glossary/end-end-encryption" class="glossify-link" title="End-to-end encryption ensures that a message is turned into a secret message by its original sender, and decoded only by its final recipient. Other forms of encryption may depend on encryption performed by third-parties. That means that those parties have to be trusted with the original text. End-to-end encryption is generally regarded as safer, because it reduces the number of parties who might be able to interfere or break the encryption. ">end-to-end encryption</a> can help protect the contents of your messages, text, and even files from being understood by anyone except their intended recipients. It can also be used to prove that a message came from a particular person and has not been altered.</p><p dir="ltr">In the past few years, end-to-end encryption tools have become more usable. <a href="http://eff.org/sms">Secure messaging tools</a> like Signal (<a href="https://ssd.eff.org/en/module/how-use-signal-ios">iOS</a> or <a href="https://ssd.eff.org/en/module/how-use-signal-android">Android</a>)—for voice calls, video calls, chats and file sharing— are good examples of apps that use end-to-end encryption to <a href="https://ssd.eff.org/en/glossary/encrypt" class="glossify-link" title="To scramble information or a message mathematically so that it seems meaningless, but can still be restored to its original form by a person or device that possesses a piece of data that can unscramble it (a key.) This limits who can access the information or message because without the right key, it is nearly impossible to reverse the encryption and recover the original information. Encryption is one of several technologies that make up the field called cryptography. ">encrypt</a> messages between the sender and intended recipient. These tools make messages unreadable to eavesdroppers on the network, as well as to the service providers themselves.</p><p dir="ltr">With that said, some implementations of end-to-end encryption can be difficult to understand and use. Before you begin using end-to-end encryption tools, we strongly recommend taking the time to understand the basics of <a href="https://ssd.eff.org/en/glossary/public-key-encryption" class="glossify-link" title="Traditional encryption systems use the same secret, or key, to encrypt and decrypt a message. So if I encrypted a file with the password &quot;bluetonicmonster,&quot; you would need both the file and the password &quot;bluetonicmonster&quot; to decode it. Public key encryption uses two keys: one to encrypt, and another to decrypt. This has all kinds of useful consequences. For one, it means that you can hand out the key to encrypt messages to you, and as long as you keep the other key secret, anyone with that key can talk to you securely. The key you hand out widely is known as the &quot;public key&quot;: hence the name of the technique. Public key encryption is used to encrypt email and files by Pretty Good Privacy (PGP), OTR for instant messaging, and SSL/TLS for web browsing. ">public key cryptography</a>.</p><p dir="ltr">The type of <a href="https://ssd.eff.org/en/glossary/encryption" class="glossify-link" title="A process that takes a message and makes it unreadable except to a person who knows how to &quot;decrypt&quot; it back into a readable form. ">encryption</a> we’re talking about in this guide, which end-to-end encryption tools rely on, is called public key cryptography, or <a href="https://ssd.eff.org/en/glossary/public-key-encryption" class="glossify-link" title="Traditional encryption systems use the same secret, or key, to encrypt and decrypt a message. So if I encrypted a file with the password &quot;bluetonicmonster,&quot; you would need both the file and the password &quot;bluetonicmonster&quot; to decode it. Public key encryption uses two keys: one to encrypt, and another to decrypt. This has all kinds of useful consequences. For one, it means that you can hand out the key to encrypt messages to you, and as long as you keep the other key secret, anyone with that key can talk to you securely. The key you hand out widely is known as the &quot;public key&quot;: hence the name of the technique. Public key encryption is used to encrypt email and files by Pretty Good Privacy (PGP), OTR for instant messaging, and SSL/TLS for web browsing. ">public key encryption</a>. To read about other types of encryption, check out our <a href="https://ssd.eff.org/en/module/what-encryption">What Should I Know About Encryption?</a> guide.</p><p dir="ltr">Understanding the underlying principles of public key cryptography will help you to use these tools successfully. There are things that public key cryptography can and can’t do, and it’s important to understand when and how you might want to use it.</p><p dir="ltr">Here’s how encryption works when sending a secret message:</p>
<p>A clearly readable message (“hello mum”) is encrypted into a scrambled message that is incomprehensible to anyone looking at it (“OhsieW5ge+osh1aehah6”).<br />The encrypted message is sent over the Internet, where others see the scrambled message, “OhsieW5ge+osh1aehah6”<br />When it arrives at its destination, the intended recipient, and only the intended recipient, has some way of decrypting it back into the original message (“hello mum”).<br />Symmetric <a href="https://ssd.eff.org/en/glossary/encryption" class="glossify-link" title="A process that takes a message and makes it unreadable except to a person who knows how to &quot;decrypt&quot; it back into a readable form. ">Encryption</a>: A Story of Passing Secret Notes with a Single <a href="https://ssd.eff.org/en/glossary/key" class="glossify-link" title="In cryptography, a piece of data which gives you the capability to encrypt or decrypt a message. ">Key</a> <a class="anchor-link-icon" href="https://ssd.eff.org/en/module/deep-dive-end-end-encryption-how-do-public-key-encryption-systems-work#2">Anchor link</a></p>
<p dir="ltr">Julia wants to send a note to her friend César that says “Meet me in the garden,” but she doesn’t want her classmates to see it.</p><p dir="ltr"></p><p dir="ltr" id="docs-internal-guid-9d83bae7-6192-1022-07c6-d93620d04994">Julia’s note passes through a bunch of intermediary classmates before reaching César. Although neutral, the intermediaries are nosy and can easily sneak a peek at the message before passing it on. They are also making copies of this message before passing it on and noting the time at which Julia is sending this message to César.</p><p dir="ltr"></p><p dir="ltr">Julia decides to <a href="https://ssd.eff.org/en/glossary/encrypt" class="glossify-link" title="To scramble information or a message mathematically so that it seems meaningless, but can still be restored to its original form by a person or device that possesses a piece of data that can unscramble it (a key.) This limits who can access the information or message because without the right key, it is nearly impossible to reverse the encryption and recover the original information. Encryption is one of several technologies that make up the field called cryptography. ">encrypt</a> her message with a key of 3, shifting the letters down the alphabet by three. So A would be D, B would be E, etc. If Julia and César use a simple key of 3 to encrypt, and a key of 3 to <a href="https://ssd.eff.org/en/glossary/decrypt" class="glossify-link" title="Make a scrambled message or data intelligible. The goal of encryption is to make messages that can only be decrypted by the person or people who are meant to receive them. ">decrypt</a>, then their gibberish encrypted message is easy to crack. Someone could “brute force” the key by trying all the possible combinations. In other words, they can persistently guess until they get the answer to decrypt the message.</p><p dir="ltr"></p><p dir="ltr" id="docs-internal-guid-d44c8afa-6193-cdc3-5916-09d8f3e4c221">The method of shifting the alphabet by three characters is a historic example of encryption used by Julius Caesar: the Caesar cipher. When there is one key to encrypt and decrypt, like in this example where it’s a simple number of 3, it is called symmetric <a href="https://ssd.eff.org/en/glossary/cryptography" class="glossify-link" title="The art of designing secret codes that let you send and receive messages to a recipient without others being able to understand the message. ">cryptography</a>.</p><p dir="ltr">The Caesar cipher is a weak form of symmetric cryptography. Thankfully, encryption has come a long way since the Caesar cipher. Using amazing math and the help of computers, a key can be generated that is much, much larger, and is much, much harder to guess. Symmetric cryptography has come a long way and has many practical purposes.</p><p dir="ltr">However, symmetric cryptography doesn’t address the following issue: what if someone could just eavesdrop and wait for Julia and César to share the key, and steal the key to decrypt their messages? What if they waited for Julia and César to say the secret for decrypting their messages by 3? What if Julia and César were in different parts of the world, and didn’t plan on meeting in person?</p><p dir="ltr">How can César and Julia get around this problem?</p><p dir="ltr">Let’s say that Julia and César have learned about <a href="https://ssd.eff.org/en/glossary/public-key-encryption" class="glossify-link" title="Traditional encryption systems use the same secret, or key, to encrypt and decrypt a message. So if I encrypted a file with the password &quot;bluetonicmonster,&quot; you would need both the file and the password &quot;bluetonicmonster&quot; to decode it. Public key encryption uses two keys: one to encrypt, and another to decrypt. This has all kinds of useful consequences. For one, it means that you can hand out the key to encrypt messages to you, and as long as you keep the other key secret, anyone with that key can talk to you securely. The key you hand out widely is known as the &quot;public key&quot;: hence the name of the technique. Public key encryption is used to encrypt email and files by Pretty Good Privacy (PGP), OTR for instant messaging, and SSL/TLS for web browsing. ">public key cryptography</a>. An eavesdropper would be unlikely to catch Julia or César sharing the decryption key—because they don’t need to share the decryption key. In public key cryptography, encryption and decryption keys are different.</p><p dir="ltr">Let’s look at the problem more closely: How does the sender send the symmetric decryption <a href="https://ssd.eff.org/en/glossary/key" class="glossify-link" title="In cryptography, a piece of data which gives you the capability to encrypt or decrypt a message. ">key</a> to the recipient without someone spying on that conversation too? In particular, what if the sender and recipient are physically far away from each other, but want to be able to converse without prying eyes?</p><p dir="ltr">Public-key <a href="https://ssd.eff.org/en/glossary/cryptography" class="glossify-link" title="The art of designing secret codes that let you send and receive messages to a recipient without others being able to understand the message. ">cryptography</a> (also known asymmetric cryptography) has a neat solution for this. It allows each person in a conversation to create two keys—a public key and a private key. The two keys are connected and are actually very large numbers with certain mathematical properties. If you encode a message using a person’s public key, they can decode it using their matching private key.</p><p dir="ltr">Julia and César are now using their two computers to send encrypted messages using <a href="https://ssd.eff.org/en/glossary/public-key-encryption" class="glossify-link" title="Traditional encryption systems use the same secret, or key, to encrypt and decrypt a message. So if I encrypted a file with the password &quot;bluetonicmonster,&quot; you would need both the file and the password &quot;bluetonicmonster&quot; to decode it. Public key encryption uses two keys: one to encrypt, and another to decrypt. This has all kinds of useful consequences. For one, it means that you can hand out the key to encrypt messages to you, and as long as you keep the other key secret, anyone with that key can talk to you securely. The key you hand out widely is known as the &quot;public key&quot;: hence the name of the technique. Public key encryption is used to encrypt email and files by Pretty Good Privacy (PGP), OTR for instant messaging, and SSL/TLS for web browsing. ">public key cryptography</a>, instead of passing notes. Their classmates passing the notes are now replaced with computers. There are intermediaries between Julia and César: Julia and César’s respective Wi-Fi points, Internet Service Providers, and their email servers. In reality, it may be hundreds of computers in between Julia and César that facilitate this conversation. These intermediaries are making and storing copies of Julia and César’s messages each time they are passed through.</p><p dir="ltr"></p><p dir="ltr" id="docs-internal-guid-139efc04-6194-fb6b-fb7b-e9491c4be27f">They don’t mind that the intermediaries can see them communicating, but they want the contents of their messages to remain private.</p><p dir="ltr">First, Julia needs César’s public key. César sends his public key (file) over an insecure channel, like unencrypted email. He doesn’t mind if the intermediaries get access to it because the public key is something that he can share freely. Note that the key metaphor breaks down around here; it’s not quite right to think of the public key as a literal key. César sends the public key over multiple channels, so that the intermediaries can't send one of their own public keys on to Julia instead.</p><p dir="ltr"></p><p dir="ltr" id="docs-internal-guid-8ff7500b-6195-7a44-1606-7d3ea2f2dedb">Julia receives César’s public key file. Now Julia can <a href="https://ssd.eff.org/en/glossary/encrypt" class="glossify-link" title="To scramble information or a message mathematically so that it seems meaningless, but can still be restored to its original form by a person or device that possesses a piece of data that can unscramble it (a key.) This limits who can access the information or message because without the right key, it is nearly impossible to reverse the encryption and recover the original information. Encryption is one of several technologies that make up the field called cryptography. ">encrypt</a> a message to him! She writes her message: “Meet me in the garden.”</p><p dir="ltr">She sends the encrypted message. It is encrypted only to César.</p><p dir="ltr"></p><p dir="ltr" id="docs-internal-guid-fb2bda82-6197-7c00-11d9-d891fdde3b33">Both Julia and César can understand the message, but it looks like gibberish to anyone else that tries to read it. The intermediaries are able to see <a href="https://ssd.eff.org/en/glossary/metadata" class="glossify-link" title="Metadata (or &quot;data about data&quot;) is data that describes a piece of information, apart from the information itself. So the content of a message is not metadata, but who sent it, when, where from, and to whom, are all examples of metadata. Legal systems often protect content more than metadata: for instance, in the United States, law enforcement needs a warrant to listen to a person's telephone calls, but claims the right to obtain the list of who you have called far more easily. However, metadata can often reveal a great deal, and will often need to be protected as carefully as the data it describes. ">metadata</a>, like the subject line, dates, sender, and recipient.</p><p dir="ltr"></p><p dir="ltr" id="docs-internal-guid-8b8117de-6199-d256-3c7c-baf738b7ac19">Because the message is encrypted to César’s public key, it is only intended for César and the sender (Julia) to read the message.</p><p dir="ltr">César can read the message using his private key.</p><p dir="ltr"></p><p dir="ltr" id="docs-internal-guid-9bc569f2-619a-a47f-6997-c661223320c8">To recap:</p>
<p>Public key cryptography allows someone to send their public key in an open, insecure channel.<br />Having a friend’s public key allows you to encrypt messages to them.<br />Your private key is used to <a href="https://ssd.eff.org/en/glossary/decrypt" class="glossify-link" title="Make a scrambled message or data intelligible. The goal of encryption is to make messages that can only be decrypted by the person or people who are meant to receive them. ">decrypt</a> messages encrypted to you.<br />Intermediaries—such as the email service providers, Internet service providers, and those on their networks—are able to see metadata this whole time: who is sending what to whom, when, what time it’s received, what the subject line is, that the message is encrypted, and so on.<br />Another Problem: What About Impersonation? <a class="anchor-link-icon" href="https://ssd.eff.org/en/module/deep-dive-end-end-encryption-how-do-public-key-encryption-systems-work#4">Anchor link</a></p>
<p dir="ltr">In the example with Julia and César, the intermediaries are able to see <a href="https://ssd.eff.org/en/glossary/metadata" class="glossify-link" title="Metadata (or &quot;data about data&quot;) is data that describes a piece of information, apart from the information itself. So the content of a message is not metadata, but who sent it, when, where from, and to whom, are all examples of metadata. Legal systems often protect content more than metadata: for instance, in the United States, law enforcement needs a warrant to listen to a person's telephone calls, but claims the right to obtain the list of who you have called far more easily. However, metadata can often reveal a great deal, and will often need to be protected as carefully as the data it describes. ">metadata</a> this whole time.</p><p dir="ltr">Let’s say that one of the intermediaries is a bad actor. By bad actor, we mean someone who intends to harm you by trying to steal or interfere with your information. For whatever reason, this bad actor wants to spy on Julia’s message to César.</p><p dir="ltr">Let’s say that this bad actor is able to trick Julia into grabbing the wrong public <a href="https://ssd.eff.org/en/glossary/key" class="glossify-link" title="In cryptography, a piece of data which gives you the capability to encrypt or decrypt a message. ">key</a> file for César. Julia doesn’t notice that this isn’t actually César’s public key. The bad actor receives Julia’s message, peeks at it, and passes it along to César.</p><p dir="ltr"></p><p dir="ltr">The bad actor could even decide to change the contents of the file before passing it along to César.</p><p></p><p dir="ltr">Most of the time, the bad actor decides to leave the contents unmodified. So, the bad actor forwards along Julia’s message to César as though nothing has happened, César knows to meet Julia in the garden, and ~gasp~ to their surprise, the bad actor is there too.</p><p dir="ltr"></p><p dir="ltr">This is known as a <a href="https://ssd.eff.org/en/glossary/man-middle-attack" class="glossify-link" title="A type of attack where an adversary intercepts communications sent between you and your intended recipient, then sends them on after interception, so that neither you nor the recipient know there is a “man (or machine) in the middle.” Men-in-the-middle can spy on communications or even insert false or misleading messages into your communications. Security-focused internet communications software needs to defend against the man-in-the-middle attack to be safe against adversaries who have control of any part of the Internet between two communicators. As an example, suppose you believe you were speaking to your friend, Bahram, via encrypted instant messenger. To check it's really him, you ask him to tell you the city where you first met. &quot;Istanbul&quot; comes the reply. That's correct! Unfortunately, without you or Bahram knowing, someone else online has been intercepting all your communications. When you first connected to Bahram, you actually connected to this person, and she, in turn, connected to Bahram. When you think you are asking Bahram a question, she receives your message, relays the question to Bahram, receives his answer back , and then sends it to you. Even though you think you are communicating securely with Bahram, you are, in fact, only communicating securely with the spy, who is also communicating securely to Bahram! This is the man-in-the-middle attack. ">man-in-the-middle attack</a>. It’s also known as a machine-in-the-middle <a href="https://ssd.eff.org/en/glossary/attack" class="glossify-link" title="In computer security, an attack is a method that can be used to compromise security. An attacker is the person or organization using an attack. An attack is sometimes called an &quot;exploit.&quot; ">attack</a>.</p><p dir="ltr">Luckily, <a href="https://ssd.eff.org/en/glossary/public-key-encryption" class="glossify-link" title="Traditional encryption systems use the same secret, or key, to encrypt and decrypt a message. So if I encrypted a file with the password &quot;bluetonicmonster,&quot; you would need both the file and the password &quot;bluetonicmonster&quot; to decode it. Public key encryption uses two keys: one to encrypt, and another to decrypt. This has all kinds of useful consequences. For one, it means that you can hand out the key to encrypt messages to you, and as long as you keep the other key secret, anyone with that key can talk to you securely. The key you hand out widely is known as the &quot;public key&quot;: hence the name of the technique. Public key encryption is used to encrypt email and files by Pretty Good Privacy (PGP), OTR for instant messaging, and SSL/TLS for web browsing. ">public key cryptography</a> has a method for preventing man-in-the-middle attacks.</p><p dir="ltr">Public key cryptography lets you double-check someone’s digital identity with their real-life identity through something called “<a href="https://ssd.eff.org/en/glossary/fingerprint" class="glossify-link" title="The keys of public key cryptography are very large numbers, sometimes a thousand or more digits long. A fingerprint is a much smaller number or set of numbers and letters that can be used as a unique name for that key, without having to list all of the key's digits. So, for instance, if you and a friend wished to make sure you both had the same key, you could either spend a long time reading off all the hundreds of digits in the key, or you could each compare your key's fingerprints instead. The fingerprints presented by cryptographic software usually consist of around 40 letters and numbers. If you carefully check that a fingerprint has the right value, you should be safe against impersonation using a fake key. Some software tools may offer more convenient alternative ways to verify a friend's key, but some form of verification needs to happen to prevent communications providers from easily being able to listen in. ">fingerprint</a> verification.” This is best done in real-life, if you are able to meet with your friend in person. You’d have your public <a href="https://ssd.eff.org/en/glossary/key-fingerprint" class="glossify-link" title="A sequence of letters or numbers that represent a public key. Some privacy tools let you check the match between someone's key fingerprint as seen by your device and by their device. The purpose of this check is to prevent a man-in-the-middle attack, where someone tricks you into using the wrong key. ">key fingerprint</a> available and your friend double-checks that every single character from your public key fingerprint matches what they have for your public key fingerprint. It’s a little tedious, but it’s really worth doing.</p><p dir="ltr">Other end-to-end encrypted apps also have a way to check for fingerprints, though there are some variations on what the practice is called and how it is implemented. In some instances, you’ll read each character of the fingerprint extremely carefully and ensure it matches what you see on your screen, versus what your friend sees on their screen. In others, you might scan a QR code on another person’s phone in order to “verify” their device.” In the example below, Julia and César are able to meet in person to verify their phone fingerprints by scanning each other’s QR codes using their phone’s camera.</p><p dir="ltr"></p><p dir="ltr">If you don’t have the luxury of meeting in person, you can make your fingerprint available through another secure channel, like another end-to-end encrypted messaging app or chat system, or a <a href="https://ssd.eff.org/en/glossary/https" class="glossify-link" title="If you've ever seen a web address spelled out as “http://www.example.com/”, you'll recognize the “http” bit of this term. HTTP (hypertext transfer protocol) is the way a web browser on your machine talks to a remote web server. Unfortunately, standard http sends text insecurely across the Internet. HTTPS (the S stands for “secure”) uses encryption to better protect the data you send to websites, and the information they return to you, from prying eyes. ">HTTPS</a> site.</p><p dir="ltr">In the below example, César sends his public key fingerprint to Julia using a different end-to-end encrypted app with his smartphone.</p><p></p><p dir="ltr"></p><p dir="ltr">To review:</p>
<p>A man-in-the-middle attack is when someone intercepts your message to someone else. The attacker can alter the message and pass it along or choose to simply eavesdrop.<br />Public key cryptography lets you address man-in-the-middle attacks by providing ways to verify the recipient and sender’s identities. This is done through fingerprint verification.<br />In addition to being used to <a href="https://ssd.eff.org/en/glossary/encrypt" class="glossify-link" title="To scramble information or a message mathematically so that it seems meaningless, but can still be restored to its original form by a person or device that possesses a piece of data that can unscramble it (a key.) This limits who can access the information or message because without the right key, it is nearly impossible to reverse the encryption and recover the original information. Encryption is one of several technologies that make up the field called cryptography. ">encrypt</a> a message to your friend, your friend’s public key also comes with something called a “public key fingerprint.” You can use the fingerprint to verify your friend’s identity.<br />The private key is used to encrypt messages, as well as for digitally signing messages as you.</p>
<p dir="ltr"><a href="https://ssd.eff.org/en/glossary/public-key-encryption" class="glossify-link" title="Traditional encryption systems use the same secret, or key, to encrypt and decrypt a message. So if I encrypted a file with the password &quot;bluetonicmonster,&quot; you would need both the file and the password &quot;bluetonicmonster&quot; to decode it. Public key encryption uses two keys: one to encrypt, and another to decrypt. This has all kinds of useful consequences. For one, it means that you can hand out the key to encrypt messages to you, and as long as you keep the other key secret, anyone with that key can talk to you securely. The key you hand out widely is known as the &quot;public key&quot;: hence the name of the technique. Public key encryption is used to encrypt email and files by Pretty Good Privacy (PGP), OTR for instant messaging, and SSL/TLS for web browsing. ">Public key cryptography</a> makes it so you don’t need to smuggle the decryption <a href="https://ssd.eff.org/en/glossary/key" class="glossify-link" title="In cryptography, a piece of data which gives you the capability to encrypt or decrypt a message. ">key</a> to the recipient of your secret message because that person already has the decryption key. The decryption key is their private key. Therefore, all you need to send a message is your recipient’s matching public, encrypting key. And you can obtain this easily because your recipient can share their public key with anyone, since public keys are only used to <a href="https://ssd.eff.org/en/glossary/encrypt" class="glossify-link" title="To scramble information or a message mathematically so that it seems meaningless, but can still be restored to its original form by a person or device that possesses a piece of data that can unscramble it (a key.) This limits who can access the information or message because without the right key, it is nearly impossible to reverse the encryption and recover the original information. Encryption is one of several technologies that make up the field called cryptography. ">encrypt</a> messages, not <a href="https://ssd.eff.org/en/glossary/decrypt" class="glossify-link" title="Make a scrambled message or data intelligible. The goal of encryption is to make messages that can only be decrypted by the person or people who are meant to receive them. ">decrypt</a> them.</p><p dir="ltr">But there's more! We know that if you encrypt a message with a certain public key, it can only be decrypted by the matching private key. But the opposite is also true. If you encrypt a message with a certain private key, it can only be decrypted by its matching public key.</p><p dir="ltr">Why would this be useful? At first glance, there doesn't seem to be any advantage to sending a secret message with your private key that everyone who has your public key can decrypt. But suppose you wrote a message that said “I promise to pay Aazul $100,” and then turned it into a secret message using your private key. Anyone could decrypt that message—but only one person could have written it: the person who has your private key. And if you’ve done a good job keeping your private key safe, that means you, and only you, could’ve written it. In effect, by encrypting the message with your private key, you’ve made sure that it could have only come from you. In other words, you’ve done the same thing with this digital message as we do when we sign a message in the real world.</p><p dir="ltr">Signing also makes messages tamper-proof. If someone tried to change your message from “I promise to pay Aazul $100” to “I promise to pay Ming $100,” they would not be able to re-sign it using your private key. So, a signed message guarantees it originated from a certain source and was not messed with in transit.</p>
<p>In Review: Using Public Key Cryptography <a class="anchor-link-icon" href="https://ssd.eff.org/en/module/deep-dive-end-end-encryption-how-do-public-key-encryption-systems-work#5">Anchor link</a></p>
<p dir="ltr">Let’s review. Public key cryptography lets you encrypt and send messages safely to anyone whose public key you know.</p><p dir="ltr">If others know your public key:</p>
<p>They can send you secret messages that only you can decode using your matching private key and,<br />You can sign your messages with your private key so that the recipients know the messages could only have come from you.</p>
<p dir="ltr">And if you know someone else’s public key:</p>
<p>You can decode a message signed by them and know that it only came from them.</p>
<p dir="ltr">It should be clear by now that public key cryptography becomes more useful when more people know your public key. The public key is shareable, in that it’s a file that you can treat like an address in a phone book: it’s public, people know to find you there, you can share it widely, and people know to encrypt messages to you there. You can share your public key with anyone who wants to communicate with you; it doesn’t matter who sees it.</p><p dir="ltr">The public key comes paired with a file called a private key. You can think of the private key like an actual key that you have to protect and keep safe. Your private key is used to encrypt and decrypt messages.</p><p class="warning" dir="ltr">It should also be apparent that you need to keep your private key very safe. If your private key is accidentally deleted from your device, you won’t be able to decrypt your encrypted messages. If someone copies your private key (whether by physical access to your computer, <a href="https://ssd.eff.org/en/glossary/malware" class="glossify-link" title="Malware is short for malicious software: programs that are designed to conduct unwanted actions on your device. Computer viruses are malware. So are programs that steal passwords, secretly record you, or delete your data. ">malware</a> on your device, or if you accidentally post or share your private key), then others can read your encrypted messages. They can pretend to be you and sign messages claiming that they were written by you.</p><p class="warning" dir="ltr">It’s not unheard of for governments to steal private keys off of particular people's computers (by taking the computers away, or by putting malware on them using physical access or phishing attacks). This undoes the protection private key <a href="https://ssd.eff.org/en/glossary/cryptography" class="glossify-link" title="The art of designing secret codes that let you send and receive messages to a recipient without others being able to understand the message. ">cryptography</a> offers. This is comparable to saying that you might have an unpickable lock on your door, but somebody might still be able to pickpocket you in the street for your key, copy the key and sneak it back into your pocket and hence be able to get into your house without even picking the lock.</p><p dir="ltr">This goes back to <a href="https://ssd.eff.org/en/glossary/threat-model" class="glossify-link" title="A way of thinking about the sorts of protection you want for your data so you can decide which potentional threats you are going to take seriously. It's impossible to protect against every kind of trick or adversary, so you should concentrate on which people might want your data, what they might want from it, and how they might get it. Coming up with a set of possible threats you plan to protect against is called threat modeling or assessing your risks. ">threat modeling</a>: determine what your risks are and address them appropriately. If you feel that someone would go through great trouble to try to get your private key, you may not want to use an in-browser solution to <a href="https://ssd.eff.org/en/glossary/end-end-encryption" class="glossify-link" title="End-to-end encryption ensures that a message is turned into a secret message by its original sender, and decoded only by its final recipient. Other forms of encryption may depend on encryption performed by third-parties. That means that those parties have to be trusted with the original text. End-to-end encryption is generally regarded as safer, because it reduces the number of parties who might be able to interfere or break the encryption. ">end-to-end encryption</a>. You instead may opt to just have your private key stored on your own computer or phone, rather than someone else’s computer (like in the cloud or on a server).</p>
<p>Review of Public Key Cryptography, and A Specific Example: <a href="https://ssd.eff.org/en/glossary/pgp" class="glossify-link" title="PGP or Pretty Good Privacy was one of the first popular implementations of public key cryptography. Phil Zimmermann, its creator, wrote the program in 1991 to help activists and others protect their communications. He was formally investigated by the U.S. government when the program spread outside the United States. At the time, exporting tools that included strong public key encryption was a violation of U.S. law. PGP continues to exist as a commercial software product. A free implementation of the same underlying standard that PGP uses called GnuPG (or GPG) is also available. Because both use the same interchangeable approach, people will refer to using a “PGP key” or sending a “PGP message”, even if they are using GnuPG. ">PGP</a>. <a class="anchor-link-icon" href="https://ssd.eff.org/en/module/deep-dive-end-end-encryption-how-do-public-key-encryption-systems-work#5">Anchor link</a></p>
<p dir="ltr">So, we went over symmetric <a href="https://ssd.eff.org/en/glossary/encryption" class="glossify-link" title="A process that takes a message and makes it unreadable except to a person who knows how to &quot;decrypt&quot; it back into a readable form. ">encryption</a> and <a href="https://ssd.eff.org/en/glossary/public-key-encryption" class="glossify-link" title="Traditional encryption systems use the same secret, or key, to encrypt and decrypt a message. So if I encrypted a file with the password &quot;bluetonicmonster,&quot; you would need both the file and the password &quot;bluetonicmonster&quot; to decode it. Public key encryption uses two keys: one to encrypt, and another to decrypt. This has all kinds of useful consequences. For one, it means that you can hand out the key to encrypt messages to you, and as long as you keep the other key secret, anyone with that key can talk to you securely. The key you hand out widely is known as the &quot;public key&quot;: hence the name of the technique. Public key encryption is used to encrypt email and files by Pretty Good Privacy (PGP), OTR for instant messaging, and SSL/TLS for web browsing. ">public key encryption</a> as separate explanations. However, we should note that public key encryption uses symmetric encryption as well! Public key encryption actually just encrypts a symmetric key, which is then used to decrypt the actual message.</p><p dir="ltr">PGP is an example of a <a href="https://ssd.eff.org/en/glossary/protocol" class="glossify-link" title="A communications protocol is a way of sending data between programs or computers. Software programs that use the same protocol can talk to each other: so web browsers and web servers speak the same protocol, called &quot;http&quot;. Some protocols use encryption to protect their contents. The secure version of the http protocol is called &quot;https&quot;. Another example of an encrypted protocol used by many different programs is OTR (Off-the-Record), a protocol for secure instant messaging. ">protocol</a> that uses both symmetric cryptography and public key cryptography (asymmetric). Functionally, using end-to-end encryption tools like PGP will make you very aware of public key cryptography practices.</p>
<p>What Exactly Are Keys. And How Are Keys Tied Together? <a class="anchor-link-icon" href="https://ssd.eff.org/en/module/deep-dive-end-end-encryption-how-do-public-key-encryption-systems-work#6">Anchor link</a></p>
<p dir="ltr"><a href="https://ssd.eff.org/en/glossary/public-key-encryption" class="glossify-link" title="Traditional encryption systems use the same secret, or key, to encrypt and decrypt a message. So if I encrypted a file with the password &quot;bluetonicmonster,&quot; you would need both the file and the password &quot;bluetonicmonster&quot; to decode it. Public key encryption uses two keys: one to encrypt, and another to decrypt. This has all kinds of useful consequences. For one, it means that you can hand out the key to encrypt messages to you, and as long as you keep the other key secret, anyone with that key can talk to you securely. The key you hand out widely is known as the &quot;public key&quot;: hence the name of the technique. Public key encryption is used to encrypt email and files by Pretty Good Privacy (PGP), OTR for instant messaging, and SSL/TLS for web browsing. ">Public key cryptography</a> is based on the premise that there are two keys: one <a href="https://ssd.eff.org/en/glossary/key" class="glossify-link" title="In cryptography, a piece of data which gives you the capability to encrypt or decrypt a message. ">key</a> for encrypting, and one key for decrypting. How it basically works is you can send a key over an insecure channel, like the Internet. This key is called the public key. You can post this public key everywhere, in very public places, and not compromise the security of your encrypted messages.</p><p dir="ltr"></p><p dir="ltr">This shareable key is the public key: a file that you can treat like an address in a phone book: it’s public, people know to find you there, you can share it widely, and people know to <a href="https://ssd.eff.org/en/glossary/encrypt" class="glossify-link" title="To scramble information or a message mathematically so that it seems meaningless, but can still be restored to its original form by a person or device that possesses a piece of data that can unscramble it (a key.) This limits who can access the information or message because without the right key, it is nearly impossible to reverse the encryption and recover the original information. Encryption is one of several technologies that make up the field called cryptography. ">encrypt</a> to you there.</p><p dir="ltr">The public key comes paired with a file called a private key. You can think of the private key like an actual key that you have to protect and keep safe. Your private key is used to encrypt and <a href="https://ssd.eff.org/en/glossary/decrypt" class="glossify-link" title="Make a scrambled message or data intelligible. The goal of encryption is to make messages that can only be decrypted by the person or people who are meant to receive them. ">decrypt</a> messages.</p><p dir="ltr">We’re going to examine the key generation in a commonly-used public key cryptography algorithm called RSA (Rivest–Shamir–Adleman). RSA is often used to generate key pairs for <a href="https://ssd.eff.org/en/glossary/pgp" class="glossify-link" title="PGP or Pretty Good Privacy was one of the first popular implementations of public key cryptography. Phil Zimmermann, its creator, wrote the program in 1991 to help activists and others protect their communications. He was formally investigated by the U.S. government when the program spread outside the United States. At the time, exporting tools that included strong public key encryption was a violation of U.S. law. PGP continues to exist as a commercial software product. A free implementation of the same underlying standard that PGP uses called GnuPG (or GPG) is also available. Because both use the same interchangeable approach, people will refer to using a “PGP key” or sending a “PGP message”, even if they are using GnuPG. ">PGP</a> encrypted email.</p><p dir="ltr"></p><p dir="ltr"></p><p dir="ltr">The public key and private key are generated together and tied together. Both rely on the same very large secret prime numbers. The private key is the representation of two very large secret prime numbers. Metaphorically, the public key is the product number: it is made up of the same two very large prime numbers used to make the private key. What’s amazing is that it’s very hard to figure out which two large prime numbers created the public key.</p><p dir="ltr">This problem is known as prime factoring, and some implementations of public key cryptography take advantage of this difficulty for computers to solve what the component prime numbers are. Modern <a href="https://ssd.eff.org/en/glossary/cryptography" class="glossify-link" title="The art of designing secret codes that let you send and receive messages to a recipient without others being able to understand the message. ">cryptography</a> allows us to use randomly chosen, ridiculously gigantic prime numbers that are hard to guess for both humans and computers.</p><p dir="ltr">And, the strength here is that people can share their public keys over insecure channels to let them encrypt to each other! In the process, they never reveal what their private key (secret prime numbers) is, because they never have to send their private key for decrypting messages in the first place.</p><p dir="ltr">Remember: For public key cryptography to work, the sender and the recipient need each other’s public keys.</p><p dir="ltr">Another way you can think of it: The public key and private key are generated together, like a yin-yang symbol. They are intertwined.</p><p dir="ltr"></p><p dir="ltr">The public key is searchable and shareable. You can distribute it to whoever. You can post it on your social media, if you don’t mind that it reveals the existence of your email address. You can put it on your personal website. You can give it out.</p><p dir="ltr">The private key needs to be kept safe and close. You just have one. You don’t want to lose it, or share it, or make copies of it that can float around, since it makes it harder to keep your private messages private.</p><p dir="ltr">Let's see how public key cryptography might work, still using the example of PGP. Let’s say you want to send a secret message to Aarav:</p>
<p>Aarav has a private key and, like a good <a href="https://ssd.eff.org/en/glossary/public-key-encryption" class="glossify-link" title="Traditional encryption systems use the same secret, or key, to encrypt and decrypt a message. So if I encrypted a file with the password &quot;bluetonicmonster,&quot; you would need both the file and the password &quot;bluetonicmonster&quot; to decode it. Public key encryption uses two keys: one to encrypt, and another to decrypt. This has all kinds of useful consequences. For one, it means that you can hand out the key to encrypt messages to you, and as long as you keep the other key secret, anyone with that key can talk to you securely. The key you hand out widely is known as the &quot;public key&quot;: hence the name of the technique. Public key encryption is used to encrypt email and files by Pretty Good Privacy (PGP), OTR for instant messaging, and SSL/TLS for web browsing. ">public key encryption</a> user, he has put its connected public key on his (<a href="https://ssd.eff.org/en/glossary/https" class="glossify-link" title="If you've ever seen a web address spelled out as “http://www.example.com/”, you'll recognize the “http” bit of this term. HTTP (hypertext transfer protocol) is the way a web browser on your machine talks to a remote web server. Unfortunately, standard http sends text insecurely across the Internet. HTTPS (the S stands for “secure”) uses encryption to better protect the data you send to websites, and the information they return to you, from prying eyes. ">HTTPS</a>) web page.<br />You download his public key.<br />You encrypt your secret message using Aarav’s public key and send it to him.<br />Only Aarav can decode your secret message because he’s the only one with the corresponding private key.</p>
<p dir="ltr"><a href="https://ssd.eff.org/en/glossary/pgp" class="glossify-link" title="PGP or Pretty Good Privacy was one of the first popular implementations of public key cryptography. Phil Zimmermann, its creator, wrote the program in 1991 to help activists and others protect their communications. He was formally investigated by the U.S. government when the program spread outside the United States. At the time, exporting tools that included strong public key encryption was a violation of U.S. law. PGP continues to exist as a commercial software product. A free implementation of the same underlying standard that PGP uses called GnuPG (or GPG) is also available. Because both use the same interchangeable approach, people will refer to using a “PGP key” or sending a “PGP message”, even if they are using GnuPG. ">Pretty Good Privacy</a> is mostly concerned with the minutiae of creating and using public and private keys. You can create a public/private <a href="https://ssd.eff.org/en/glossary/key-pair" class="glossify-link" title="To receive encrypted messages using public key cryptography (and to reliably inform others that a message genuinely came from you), you need to create two keys. One, the private key, you keep secret. The other, the public key, you can let anyone see. The two keys are connected mathematically, and are often collectively known as a &quot;keypair.&quot; ">key pair</a> with it, protect the private key with a <a href="https://ssd.eff.org/en/glossary/password" class="glossify-link" title="A secret meant to be memorized or otherwise protected and kept private, and meant to limit access to something so that only someone who knows the password can gain access. It might limit access to an online account, a device, or something else. A long password based on multiple words may also be called a &quot;passphrase&quot; to remind us that it's not just one &quot;word.&quot; A master password is a main password used to unlock other passwords in a password manager or password safe application. ">password</a>, and use it and your public key to sign and encrypt text.</p><p class="warning" dir="ltr">If there's one thing you need to take away from this overview, it's this: Keep your private key stored somewhere safe and protect it with a long <a href="https://ssd.eff.org/en/glossary/passphrase" class="glossify-link" title="A passphrase is a kind of password. We use &quot;passphrase&quot; to convey the idea that a password which is a single word is far too short to protect you and a longer phrase is much better. The webcomic XKCD has a good explanation. http://xkcd.com/936/ ">passphrase</a>.</p><p dir="ltr">Public key encryption is all about making sure the contents of a message are secret, genuine, and untampered with. But that's not the only privacy concern you might have. As we've noted, information about your messages can be as revealing as their contents (See “<a href="https://ssd.eff.org/en/glossary/metadata">metadata</a>”).</p><p dir="ltr">If you exchange encrypted messages with a known dissident in your country, you may be in danger for simply communicating with them, even if those messages aren’t decoded. In some countries you can face imprisonment simply for refusing to decode encrypted messages.</p><p>Disguising that you are communicating with a particular person is more difficult. In the example of PGP, one way to do this is for both of you to use anonymous email accounts, and access them using <a href="https://ssd.eff.org/en/module/how-use-tor-windows#overlay=en/node/57/">Tor</a>. If you do this, PGP will still be useful, both for keeping your email messages private from others, and proving to each other that the messages have not been tampered with.</p><p dir="ltr">Now that you’ve learned about public key cryptography, try out using an <a href="https://ssd.eff.org/en/glossary/end-end-encryption" class="glossify-link" title="End-to-end encryption ensures that a message is turned into a secret message by its original sender, and decoded only by its final recipient. Other forms of encryption may depend on encryption performed by third-parties. That means that those parties have to be trusted with the original text. End-to-end encryption is generally regarded as safer, because it reduces the number of parties who might be able to interfere or break the encryption. ">end-to-end encryption</a> tool like <a href="https://ssd.eff.org/en/module/how-use-signal-ios">Signal for iOS</a> or <a href="https://ssd.eff.org/en/module/how-use-signal-android">Android</a>.</p>]]></description>
	<dc:creator>La loupe</dc:creator>
</item>
<br>Source : <a href="https://ssd.eff.org/en/module/deep-dive-end-end-encryption-how-do-public-key-encryption-systems-work" class="" rel="nofollow">https://ssd.eff.org/en/module/deep-dive-end-end-encryption-how-do-public-key-encryption-systems-work</a><br>
</channel>
</rss>