Public key encryption (article) | Khan Academy (2024)

Want to join the conversation?

Log in

  • Alex Ewart

    4 years agoPosted 4 years ago. Direct link to Alex Ewart's post “Is all data sent on the i...”

    Public key encryption (article) | Khan Academy (2)

    Is all data sent on the internet due to regulations automatically encrypted?
    When getting other's public keys, generating private keys, and decrypting data, when does all this happen, because I now know that my computer does this but I have no idea when it is all this going on. Is it like when I type in someone's email address? Is the address a public key? If so, is the email address like a way humans can remember the public key like domain names instead of typing IP addresses?
    Does every computer have its own designated keys, or do they change like IP addresses?
    Hope this is not too confusing to answer.

    (6 votes)

    • Abhishek Shah

      4 years agoPosted 4 years ago. Direct link to Abhishek Shah's post “This is a great question!...”

      Public key encryption (article) | Khan Academy (4)

      This is a great question!

      All data sent over the Internet is not encrypted. Only if you use certain protocols like HTTPS will it be encrypted. There is no regulation requiring all data to be encrypted.

      A person's email address is not a public key. Every computer has the ability to create its own keys, but when you get a new computer, it doesn't magically already exist. You have to generate it. Once it's generated, keys don't change. You can always generate a new set of keys though.

      One way I find it easy to think about is the following:

      Think about your home. If someone sends you mail, do they need a key to your home to put it inside? No, they could just slide it under the door or put into your mailbox. When you reach home, you can unlock your home and read the mail.

      This is why as users we don't have to generate keys with our own computers. In some sense, we just send mail to servers by slipping it underneath their doors (via a public key encryption) and they can read it via a private key decryption.

      I hope this helps!

      (9 votes)

  • ronanmacg

    4 years agoPosted 4 years ago. Direct link to ronanmacg's post “When I encrypt something ...”

    Public key encryption (article) | Khan Academy (6)

    When I encrypt something using my public key, eg "Hi" it seems like it can have many different encrypted forms. How is this possible?

    (1 vote)

    • Abhishek Shah

      4 years agoPosted 4 years ago. Direct link to Abhishek Shah's post “This occurs because each ...”

      Public key encryption (article) | Khan Academy (8)

      This occurs because each encryption takes in some amount of randomness. So encrypt("hi") and encrypt("hi") are different because each encrypt() call uses different randomness.

      Imagine a world in which this wasn't the case. In other words, encrypt("hi") and later encrypt("hi") returned the same thing. Then, you could create replay attacks. The different encrypted forms help prevent this.

      See here for more. https://www.kaspersky.com/resource-center/definitions/replay-attack

      Hope this helps!

      (7 votes)

  • sebastian nielsen

    5 years agoPosted 5 years ago. Direct link to sebastian nielsen's post “I don't get how the priva...”

    Public key encryption (article) | Khan Academy (10)

    I don't get how the private and public key looks like a mess. Shouldn't the private and public key just be a number? Then what is all those symbols doing in the private and public key?

    -----BEGIN RSA PRIVATE KEY-----
    MIICWwIBAAKBgH1gajwsAHgJKHD7QEFpzWRSbqA2SxdwpmC/QEdqGZpn4ueGI_REMOVED_SOMEPF4TzF/VAPlJ4IJ6f39oohZU27If3jqStYYY2ctwsQ==
    -----END RSA PRIVATE KEY-----

    P.s. I went through the math but at no point is it mentioned how this strange looking key was derived.

    (2 votes)

    • Abhishek Shah

      5 years agoPosted 5 years ago. Direct link to Abhishek Shah's post “For convenience, the RSA ...”

      Public key encryption (article) | Khan Academy (12)

      For convenience, the RSA private key is represented with text. It makes transferring and comparing the keys easier for people. This large text is indeed a large number as there is a one-to-one well-defined encoding between every letter and number. ASCII is one such encoding.

      (4 votes)

  • Gamar

    3 years agoPosted 3 years ago. Direct link to Gamar's post “What I wanna know is: The...”

    Public key encryption (article) | Khan Academy (14)

    What I wanna know is: The whole public key process, how it really works in a real life situation.

    The receiver shares their public key so the sender can encrypt with it, and then it decrypts it with it’s private key, the only thing that can decrypt it...
    But in what way does this process happen?

    Do they need eachothers public keys for the entire process until TCP/IP disconnection?
    Does every step in the communication require another key?
    Do you always have the same public key on your machine or when does it change?

    (2 votes)

    • KLaudano

      3 years agoPosted 3 years ago. Direct link to KLaudano's post “A common scenario is for ...”

      Public key encryption (article) | Khan Academy (16)

      A common scenario is for a party to publish their RSA public key. Then, when someone communicates with that party, they create an AES key and encrypt it with the RSA public key. The encrypted AES key is sent over to the party who then decrypts it with their RSA private key. After that, the remaining messages are encrypted with the AES key for the rest of the session.

      AES encryption is used to encrypt the majority of the messages as it is significantly faster than RSA encryption.

      (2 votes)

  • Aland Soran

    a year agoPosted a year ago. Direct link to Aland Soran's post “In step 1, it is mentione...”

    Public key encryption (article) | Khan Academy (18)

    In step 1, it is mentioned that the generated keys are only 512 bits long. However, using a character counter, I counted the first key generated and it was 824 characters. How is that 512 bits? am I misunderstanding something?

    (2 votes)

    • Evan Lewis

      10 months agoPosted 10 months ago. Direct link to Evan Lewis's post “Great question! The reaso...”

      Public key encryption (article) | Khan Academy (20)

      Great question! The reason for this is the difference between bits and characters. In a computer, a character is represented as a byte (or 8 bits). So, if a key is 512 bits long, that does not mean it is 512 characters long.

      The 512 bits refers to the length of the binary representation of the key. When this binary sequence is encoded as text (for example, using Base64 encoding, which is common for keys), it will indeed be longer than 512 characters.

      (2 votes)

  • clara Headstrong

    7 months agoPosted 7 months ago. Direct link to clara Headstrong's post “What format is the encryp...”

    What format is the encrypted output? is it base64?

    (1 vote)

  • EmilyT

    21 days agoPosted 21 days ago. Direct link to EmilyT's post “why does this matter to i...”

    why does this matter to internet safety?

    (1 vote)

  • frostbite0104

    25 days agoPosted 25 days ago. Direct link to frostbite0104's post “i don't understand the pu...”

    i don't understand the public encryption key description. Is it the same key being sent for everybody or is it different depending on whos reciveing it?

    (1 vote)

  • hikenna13

    3 months agoPosted 3 months ago. Direct link to hikenna13's post “can someone please make t...”

    can someone please make this a bit more understandable because i am not 100% sure i understand all of it

    (0 votes)

    • joshua

      3 months agoPosted 3 months ago. Direct link to joshua's post “When we transfer data to ...”

      When we transfer data to others, the data may be intercepted by attackers. Therefore, we want to encrypt the data so that the attacker doesn't know what it is, but the person we sent the data to know what it is.

      Public key encryption makes use of 2 pairs of keys, each pair for each side. The pair of keys is special. You can think of it like having a lock, but you can use either one to lock, and use the other one to unlock. Note you cannot use the same key to lock & unlock.

      Let's use a process of us sending data to others to demonstrate.

      First, we have a private key. This key is hidden, and shouldn't be exposed to the public. Now, you can encrypt the data using this key.
      Then, you place another key in the public (For simplicity, everyone can access it). This is called the public key.
      Following this, find the public key of the target you want to send the data to. Encrypt the data using that public key.

      After that, send the encrypted data to the target. Since the data is encrypted using your private key and the target's public key, attackers cannot intercept the data. Even if the attacker has your public key, they still don't have the target's private key.

      Last, the encrypted data is sent to the target.
      They first verify your identity using your public key. Note public key not only serves as an encryption method, but also an identity verification.
      If it matches, then they first decrypt the data using your public key. Last, they use their own private key to decrypt the data.

      (3 votes)

  • phindilemolefe345

    18 days agoPosted 18 days ago. Direct link to phindilemolefe345's post “how to encrypte a message”

    how to encrypte a message

    (1 vote)

Public key encryption (article) | Khan Academy (2024)

FAQs

What is public key encryption explain your answer in detail? ›

Public key cryptography is a method of encrypting or signing data with two different keys and making one of the keys, the public key, available for anyone to use. The other key is known as the private key. Data encrypted with the public key can only be decrypted with the private key.

Why is public key encryption hard to crack? ›

That's due to the math involved. The keys are generated by multiplying together two incredibly large primes. The algorithm repeatedly generates random large numbers and checks if they're prime, until it finally finds two random large primes.

How to decrypt a public key? ›

Anyone can encrypt a message by using your public key, but only you can read it. When you receive the message, you decrypt it by using your private key. Similarly, you can encrypt a message for anyone else by using their public key, and they decrypt it by using their private key.

What is public key encryption quizlet? ›

Public key encryption is a highly secure encryption scheme that in which a single shared key is used by both the sender and receiver of the message.

How safe is public key encryption? ›

Viewed simply, the public key secures the data from illegitimate use, and the private key makes it available and accessible. Public Key Encryption also enables non-repudiation. Non-repudiation prevents the sender of the data from claiming that the data was never sent. It also prevents the data from being modified.

What are the two types of public key encryption? ›

Symmetric key encryption algorithms use a single symmetric key for both encryption and decryption, whereas asymmetric key encryption algorithms (aka public key algorithms) use two different but related keys for encryption and decryption.

What is the most common public key encryption? ›

The most commonly used public-key cryptosystem is RSA, which is named after its three developers Ron Rivest (b. 1947), Adi Shamir, and Leonard Adleman (b. 1945). At the time of the algorithm's development (1977), the three were researchers at the MIT Laboratory for Computer Science.

What are the 6 elements of public key encryption? ›

The following figure illustrates public-key encryption process and shows that a public-key encryption scheme has six ingredients: plaintext, encryption algorithm, public & private keys, ciphertext & decryption algorithm. The essential steps involved in a public-key encryption scheme are given below: 1.)

What is the main problem with public key cryptography? ›

Possible Attacks Against RSA

This situation is a lot like a one-way street. Anyone can go in one direction (i.e. encrypt something using a public key), but people cannot decrypt something unless they possess the private key.

What is a weakness of public key cryptography? ›

The public key due to its public nature is vulnerable to brute-force attacks. And since incoming data are encrypted with the same public key, a third party can impersonate the original sender and pass along false data to the key owner [6] . ...

Does public key encryption provide confidentiality? ›

Public-key encryption thus provides for both confidentiality and authentication. The benefits of public-key encryption are clear. The sender and recipient no longer need to communicate previously, nor do they need to exchange private keys to send a communication that is signed and secure.

What is public key cryptography for dummies? ›

Public key encryption provides confidentiality because the message is encrypted with an individual's public key and can only be decrypted with the individual's private key, ensuring that only the intended recipient can decrypt the message.

Can public key encryption be intercepted? ›

Digital Certificates

If this happens, the data that is encrypted with that public key (and intended to be sent to the user whose name was associated with it) could be intercepted by the unauthorized user who posted the key. That unauthorized person would then be able to decrypt the data and read the message.

What is the vulnerability of public key? ›

As with all cryptographic functions, public-key implementations may be vulnerable to side-channel attacks that exploit information leakage to simplify the search for a secret key. These are often independent of the algorithm being used.

What is an example of encryption using a public key? ›

Bob wants to send Alice an encrypted email. To do this, Bob takes Alice's public key and encrypts his message to her. When Alice receives the message, she uses the matching private key that is known only to her in order to decrypt the message from Bob.

Which of the following is an example of public key encryption? ›

Public Key Cryptography (asymmetric) uses encryption algorithms such as RSA and Elliptic Curve Cryptography (ECC) to create the public and private keys.

What is public key encryption in what way is it different from private key encryption Why is it important in e commerce? ›

A public key, on the other hand, is used to encrypt data, while the private key is used for decryption. Simply put, a user can encrypt data using a single (public) key, and then the receiver uses a private key to decrypt the ciphertext and read the message. This is also referred to as asymmetric cryptography.

Top Articles
Latest Posts
Article information

Author: Jamar Nader

Last Updated:

Views: 6076

Rating: 4.4 / 5 (55 voted)

Reviews: 94% of readers found this page helpful

Author information

Name: Jamar Nader

Birthday: 1995-02-28

Address: Apt. 536 6162 Reichel Greens, Port Zackaryside, CT 22682-9804

Phone: +9958384818317

Job: IT Representative

Hobby: Scrapbooking, Hiking, Hunting, Kite flying, Blacksmithing, Video gaming, Foraging

Introduction: My name is Jamar Nader, I am a fine, shiny, colorful, bright, nice, perfect, curious person who loves writing and wants to share my knowledge and understanding with you.