The Internet: Encryption & Public Keys

Hi my name is Mia Gil-Epner, I’m majoring
in Computer Science at UC Berkeley and I work for the Department of Defense, where I try
to keep information safe. The Internet is an open and public system. We all send and receive information over
shared wires and connections. But even though it’s an open
system, we still exchange a lot of private data. Things like credit card numbers,
bank information, passwords, and emails. So how is all this private stuff kept secret?
Data of any kind can be kept secret through a process known as encryption, the scrambling
or changing of the message to hide the original text. Now decryption is the process of un-scrambling
that message to make it readable. This is a simple idea, and people have been doing
it for centuries. One of the first well known methods of encryption was Caesar’s Cipher. Named after Julius Caesar, a Roman general who encrypted his military commands to make sure that if a message was intercepted by enemies, they wouldn’t be able to read it. Caesar Cipher is an algorithm that substitutes each letter in the original message with a
letter a certain number of steps down the alphabet. If the number is something only
the sender and receiver know, then it’s called the key. It allows the reader to unlock the
secret message. For example, if your original message is ‘HELLO’ then using the Caesar Cipher algorithm with a key of 5, the encrypted message would be this… To decrypt the message, the recipient
would simply use the key to reverse the process. But there is a big problem
with Caesar Cipher, anybody can easily break or crack the encrypted message, by trying
every possible key, and in the english alphabet there are only 26 letters, which means you would only need to try at most 26 keys to decrypt the message. Now trying 26 possible
keys isn’t very hard, it would take at most an hour to do. So lets make it harder. Instead of shifting every letter by the same amount, let’s shift each letter by a different amount.
In this example, a ten digit key shows how many positions each successive letter will be changed
to encrypt a longer message. Guessing this key would be really hard. Using 10 digit encryption,
there could be 10 billion possible key solutions. Obviously that’s more then any human could
ever solve, it would take many centuries. But an average computer today, would take
just a few seconds to try all 10 billion possibilities. So in a modern world, where the bad guys are
armed with computers instead of pencils, how can you encrypt messages so securely that
they’re too hard to crack? Now “too hard” means that there are too many possibilities to compute in a reasonable amount of time. Today’s secure communications are encrypted using 256 bit keys. That means a bad guy’s computer that intercepts your message would need to try
this many possible options… until they discover the key and crack the message. Even if you had a 100,000 super computers and each of them was able to try a million billion keys
every second it would take trillions of trillions of trillions of years to try every option, just to crack
a single message protected with 256 bit encryption. Of course computer chips get twice as fast
and half the size every year or so. If that pace of exponential progress continues, today’s
impossible problems will be solvable just a few hundred years in the future and 256
bits won’t be enough to be safe. In fact, we’ve already had to increase the standard key
length to keep up with the speed of computers. The good news is, using a longer key doesn’t
make encrypting messages much harder, but it exponentially increases the number of guesses
that it would take to crack a cipher. When the sender and receiver share the same key
to scramble and unscramble a message it’s called Symmetric Encryption. With Symmetric Encryption,
like Caesar Cipher, the secret key has to be agreed on ahead of time by two people in private.
So that’s great for people, but the internet is open and public so it’s impossible for two computers to “meet” in private to agree on a secret key. Instead, computers use Asymmetric keys, a public key that can be exchanged with anybody and a private key that is
not shared. The Public Key is used to encrypt data and anybody can use it to create a secret
message, but the secret can only be decrypted by a computer with access to the private key. How this works is with some math that
we won’t get into right now. Think of it this way,
imagine that you have a personal mailbox, where anybody can deposit mail but they need
a key to do it. Now you can make many copies of the deposit key and send one to your friend
or even just make it publicly available. Your friend or even a stranger can use the public
key to access your deposit slot and drop a message in. But only you can open the mailbox
with your private key, to access all of the secret messages you’ve received. And you can
send a secure message back to your friend by using the public deposit key to their mailbox.
This way people can exchange secure messages without ever needing to agree on a private
key. Public Key cryptography is the foundation of all secure messaging on the open internet, including the Security Protocols known as SSL and TLS, which protect us when we are
browsing the web. Your computer uses this today, anytime you see the little lock or the letters “https” in your browser’s address bar. This means your computer is using public
key encryption to exchange data securely with the website you’re on. As more and more people
get on the internet more and more private data will be transmitted, and the need to
secure that data will be even more important. And as computers become faster and faster
we will have to develop new ways to make encryption too hard for computers to break. This is what
I do with my work and it’s always changing.


  1. DaSchmed said:

    This explanation makes so much sense! Great job!

    August 22, 2015
  2. DogLaS سكتش said:

    can you showe the lassens Arabic language

    August 22, 2015
  3. Ashutosh Bhardwaj said:

    Awesome 🙂

    August 30, 2015
  4. Tung Nguyen said:

    Awesome video! Finally, I have understood clearly the meaning of Public Key and Private Key.

    September 2, 2015
  5. GreenBeen2 said:

    thats cool and all but the NSA can break 2048-bit encryption

    September 14, 2015
  6. jb b said:

    thanks! helps a lot

    September 29, 2015
  7. soufiane dermoumi said:

    awesome 🙂

    October 25, 2015
  8. Robert Wong said:

    wow! thank you so much. very informative =)

    December 2, 2015
  9. John W said:

    Great video.

    December 6, 2015
  10. YouTubeFreeTuPhonez said:

    But some say encrypt and some say decrypt is better. Which is it? lol

    December 14, 2015
  11. Suresh Nory said:


    February 11, 2016
  12. Logical Dark said:

    Ah but then I have a question! Would a Quantum Computer such as the Dwave, be able to crack 256 bit encryption? Since the way a quantum computer works is that it lays down all the possible conclusions and picks the right one. Would we need to develop quantum encryption to prevent this?

    February 18, 2016
  13. Abhishek Sharma said:

    I have a question at [4:44], In asymmetric encryption How is the private key is different from public key as the encryption method used by the public key should be same for the private key so what's the difference? PS: don't have any idea about computer encryption techniques.

    February 23, 2016
  14. Rasan Samarasinghe said:

    Simple and very well explained!

    April 14, 2016
  15. Aravind M said:

    Best Video 🙂

    July 3, 2016
  16. Amit Singh said:

    Wow , just WOW.. What an amazing explaination.. Encryption seems so much interesting to me now. Thanks

    July 5, 2016
  17. Arsalan Ahmad said:

    Excellent explanation in every video, Thankyou (y)

    September 2, 2016
  18. _passby said:

    Looks fun

    September 4, 2016
  19. V T VISHWANATH said:


    November 8, 2016
  20. jaacк шayиё мacy said:

    that makes no sense, why would the deposit slot have a key?? If everyone has the encryption key then why cant they just reverse engineer to find the decryption key also?

    November 20, 2016
  21. DOPE BEATZ BOY$ said:

    4:58 i only fukin clicked this vid cuz i wanted to know how tht math works fuck this

    December 4, 2016
  22. LKINGJ Gamer said:

    she is so boring

    January 20, 2017
  23. Nelly Tolbert said:

    Awesome explanation! Thanks!

    February 12, 2017
  24. kyungmon said:

    If you look closely the people are all reading off a script

    now you'll never be able to watch these in the same way ever again you're welcome

    February 24, 2017
  25. Danny Hans said:

    Thank you for quite a good clarification however if i may ask what if i want to share and change public keys and private keys what are the security mechanisms involved

    April 1, 2017
  26. Doodelay said:

    256^256 is a stupefyingly large number. Christ

    April 17, 2017
  27. krishna chaitanya said:

    finally found someone who can explain pretty well. thank you

    May 8, 2017
  28. Sarah Weaver said:

    Ok but how does the mailbox translate over into cipher keys? This doesnt give me any clues on engineering at all.

    June 14, 2017
  29. Hemanth S said:

    Thanks a lot !!

    July 19, 2017
  30. supriya gowda said:

    very nicely explained

    August 3, 2017
  31. Dylan Hudson said:

    Would quantum computers break all encryption??

    September 3, 2017
  32. Jim Bradshaw said:

    Great video!

    September 6, 2017
  33. A Clapham said:

    Very informative but I want to know how to use it in my email accounts or should I even be worrying about not having public key?

    October 8, 2017
  34. Olumuyiwa Smith said:

    Super Great Job

    October 24, 2017
  35. Vtuber Vtuber said:

    She has a fucking annoying

    November 4, 2017
  36. Tech Adda said:

    Nice explanation

    December 12, 2017
  37. narra rohit said:

    Great job in explaining the keys !!

    January 9, 2018
  38. Martin H said:

    Great job! I use this with my students to discuss public/private key encryption. thank you!

    January 17, 2018
  39. Matthew the Kerbal Guy said:

    How did you calculate 10 billion possible encryptions at 2:31?

    January 18, 2018
  40. Jemmeh said:

    Very well done! The public/private keys explanation was superb!

    February 9, 2018
  41. Deepanshu Mahey said:

    awesome explanation👍

    March 12, 2018
  42. Bahareh Hashemi said:

    Thank you so mush😄

    May 5, 2018
  43. Care Air said:

    I do not want speculative hypothesis but concrete evidences that can be documented.
    The generation of public key is from a primitive non-reducible polynomial which is not necessary but a random code.
    There is no math unless it’s an unknown polynomial.

    May 15, 2018
  44. Wing-Mort said:

    Good video, thanks a lot! I had 20/20 at my english test! <3 <3

    May 15, 2018
  45. ΜΟΛΩΝ ΛΑΒΕ said:

    Good explanation!

    May 31, 2018
  46. Ashley S said:

    But how could a public key that can encrypt a message not decrypt the same message.

    July 3, 2018
  47. Patrik Bányai said:

    Good job!

    August 6, 2018
  48. Rintarō Okabe said:

    But does encryption protect from cold sores?

    September 4, 2018
  49. wattereddownanxiety said:

    this video sucks asssssss

    September 14, 2018
  50. Future baby said:

    This explanation is very good mam. it's all easy to understand

    November 17, 2018
  51. yasir said:

    Hands down one of the best videos I have watched today🙏👌👌👍

    November 20, 2018
  52. CHAMMY LIU said:

    Like if from BTHS.

    December 10, 2018
  53. Danny Yang said:

    i dunno. ANYONE HERE A TECHIE?

    December 10, 2018
  54. Kevin Covins said:

    This girl actually tried to understand this .. and she got it

    January 10, 2019
  55. Nesi_Wilson13 said:

    This girl is a virgin bad !!!!

    January 10, 2019
  56. Darth Revan said:

    Mia Khalifa

    February 4, 2019
  57. FancyWaifu said:

    Just imagine what would happen when quantum computers get released to the public

    February 4, 2019
  58. Owen Moskovitz said:

    now this is epic.

    February 7, 2019
  59. Cameron Hartley said:

    Anyone else because of business homework

    February 20, 2019
  60. Bobby Doan said:

    wow what a nice video!

    February 28, 2019
  61. stalker Santa said:

    It says my password can only be 15 characters long. How am i supposed to fit 256 characters on there?

    March 8, 2019
  62. Anton Casciano said:

    ya yeet

    March 21, 2019
  63. AD Writes said:

    there is so much to learn…..great work

    March 26, 2019
  64. benjamin lewin bonnassiolle said:

    I love u <3

    April 11, 2019
  65. Vipin Chakrapani said:

    Excellent presentation, thanks Mia
    But can you please explain how does a different key (Private key) will work. Doesn't it be the same key to get the same data back?

    April 25, 2019
  66. Ismee said:

    This is the problem. How can a civilisation stand up to its corrupted government and institutional authorities when their face looks like this young lady? Kinda hard to conceptualise the reality of this probably lovely lady is, technically, the enemy. Guilty by association….
    Hard concept to grasp as she probably just wants to put her considerable intellect to use in a way that most benefits her and her family. Maybe she believes she is helping constructively by focusing on the positive aspects of the organisation and/or her experience and/or knowledge of the bigger picture actually makes her an innocent component who has a clear conscience and genuinely believes she is ‘helping’ the country in which she lives well and loves this reality she has been granted.
    Is a hard one, probably would be good friends if you grew up together….

    Unfortunately, ignorance is not an excuse and when the time comes, all must pick a side. And those who support evil and are not willing to end this support knowing full well that not only the defeat of evil, but the opposition to it, will initially require compromise and sacrifice to our way of life and the way of life of our loved ones…..
    I may sound nuts lol, but its a cyclical process that repeats over and over due to the nature of the democratic system. (Im not saying Democracy in its essence is flawed, just mankind’s self righteous adaption of it to protect wealth and property from others inevitably leads to concentration of wealth and power until the system can not/will not continue to function and collapses, and begins over again….
    It all stems from the ‘One God’ (one master) ideology, if mankind were a species that universally believed there to be many gods of all shapes and forms, and one was free to choose to believe what they may as long as they had a kind heart and strong back, do you think they would tolerate this form of civilisation that is centred around fear of ‘Obey or suffer’ policy? Or being told we need protection from ourselves because without the levels of governance being inferred to, we would all suffer at the hands of each other???? The overwhelmingly main reason man fights is over a share of a resource that is of limited abundance. At its heart, mankind’s instinct for survival makes him sympathetic to the needs of the group which makes him inherently kind (If there is no conflict over scarcity of resources and fear) There is of course those among us who fight over the pursuit of a dominant share of influence and power to satisfy their own interests. These people in a otherwise flourishing existence are the root of true evil. Their destructive lack of survival instinct allows them to disregard the needs of the group in order to satisfy themselves. They are masters of manipulation as they are well aware that if they sufficiently upset enough of the group, or the wrong dynamic within the group, that they will be overthrown. Slowly but surely, circumstances are manufactured that validate a need for less freedoms and support is won by selecting the correct souls and offering the person greater freedom in exchange for obedience and support.
    …..Aaaaaand you eventually end up were we are contaminating the planet and its very life bloods for us to a points of in sustainability (and im not talking Carbon emissions, im talking contamination of water tables under food producing ground, contamination of waterways near populations, contamination of the atmosphere by release of native but non-organic forms of metals and proteins, contamination of our genetic code from ingestion of poisonous chemicals designed to kill biological structures in order to increase financial returns on business investments (food), contamination of bloodlines through hereditary disease and cancerous tumours cause by damaged DNA from exposure of sudden increases of potentially damaging energy sources, contamination of social cultures due to sustained divides over inequality and non-harmonious control mechanisms.

    May 1, 2019
  67. Gideon Dorff said:

    Bitcoin language

    May 16, 2019
  68. Bob Bob said:

    That shit on her lip has some shit on it’s lip.

    August 10, 2019
  69. AresTalk said:

    Great video!! I am also doing my youtube channel about blockchain technology,
    This episode is about "private key and public how do they work?"

    August 14, 2019

Leave a Reply

Your email address will not be published. Required fields are marked *