Public Key Cryptography - Computerphile

Sdílet
Vložit
  • čas přidán 21. 07. 2014
  • Spies used to meet in the park to exchange code words, now things have moved on - Robert Miles explains the principle of Public/Private Key Cryptography
    note1: Yes, it should have been 'Obi Wan' not 'Obi One' :)
    note2: The string of 'garbage' text in the two examples should have been different to illustrate more clearly that there are two different systems in use.
    / computerphile
    / computer_phile
    This video was filmed and edited by Sean Riley.
    Computer Science at the University of Nottingham: bit.ly/nottscomputer
    Computerphile is a sister project to Brady Haran's Numberphile. See the full list of Brady's video projects at: bit.ly/bradychannels

Komentáře • 1,2K

  • @tobortine
    @tobortine Před 9 lety +4926

    You didn't mention Alice or Bob.

    •  Před 9 lety +441

      oh boy, *that* will upset cryptographers

    • @666Tomato666
      @666Tomato666 Před 9 lety +203

      Don't you think that Eve is misunderstood? She's there, working hard to show that your protocols are secure and we call her the bad person.
      Imaginary actors in cryptographic proofs have feelings too!

    • @Narutokunie5
      @Narutokunie5 Před 9 lety +55

      sent me on a laughing fit. Sorry for my shallow humor tolerance, but you sir, deserve a like. And a pat on the back. XD

    • @jmark1062
      @jmark1062 Před 9 lety +23

      Not to mention Eve, the Evil do-er.

    • @dante2k8
      @dante2k8 Před 9 lety +9

      Captain, please explain what is going on here.

  • @another-person-on-youtube
    @another-person-on-youtube Před 8 lety +1306

    Jeez, I wish this is how it was explained to me the first time. This was a brilliant video. And now I appreciate the brilliance of public key encryption. The idea of encrypting something twice, first with the other person's public key so only they can decrypt it, and then sign it with your own private key, so they know that you were legitimately the person sending it, is GENIUS. Thank you very, very much.

    • @ajayphilipsabu
      @ajayphilipsabu Před 8 lety +38

      +Samuel Hobbs first encrypt using private key and then using public key. the same happens at decryption.

    • @lambertbrother1628
      @lambertbrother1628 Před 6 lety +3

      Wouldn't encrypting it with the public key as well mean that only the sender could decrypt it (using the private key)?

    • @jimswenson6131
      @jimswenson6131 Před 6 lety +41

      They don't encrypt with their public key--they encrypt with the public key of the recipient. That's the point you missed.

    • @hkr667
      @hkr667 Před 6 lety +12

      At this time 171 likes means 171 people had the same, including me! It always annoyed me that as an IT person I didn't understand this. But nobody ever explains the basics, they always make the explanation confusingly complex. Now I know!

    • @user-ol2gx6of4g
      @user-ol2gx6of4g Před 6 lety +14

      Not really that brilliant. The whole idea relies on the belief that there exist one-way functions, i.e., it's very hard to calculate the inverse of such class of functions. Anyone can come up with the *idea* . It is the implementation that is hard as advanced mathematics is involved.

  • @rajivramroop6848
    @rajivramroop6848 Před 9 lety +202

    You explained this better in 6 mins than my lecturer did in a whole semester. Thank you.

    • @suchitragulb184
      @suchitragulb184 Před 2 lety +8

      Right. Professors waste time of time using outdated education methods.

    • @afr0z
      @afr0z Před rokem +1

      same here bro!

    • @tvtvvtvt8017
      @tvtvvtvt8017 Před rokem +1

      Phoenix College too?

    • @tbluebird1421
      @tbluebird1421 Před rokem +1

      I've did a 4 year university course on computer networking and cyber security, and I understand private/public key better now than I did after that 4 years 😂

  • @BhargaviCN
    @BhargaviCN Před 4 lety +365

    Cryptographers are upset because you didn't mention "Alice or Bob or THE EVE!"

    • @ha-bf2xh
      @ha-bf2xh Před 3 lety +1

      Alice----------> Trudy ------------> Bob

    • @ltnlabs
      @ltnlabs Před 3 lety

      I am the Bob they speak of in the examples

  • @harshrajjadeja7087
    @harshrajjadeja7087 Před 3 lety +37

    never ever understood public private key encryption decryption in this way, coming from a non-coding background the epiphany I had at 5:00 was just amazing, great explanation!!

    • @TheMR-777
      @TheMR-777 Před 9 měsíci +4

      Same here man.
      I really paused the video there - locked the system - went for a walk - for 10min, to digest what I just heard.
      (It also happened some days ago, when I first heard about encryption with private key)

  • @captplatonic
    @captplatonic Před 4 lety +79

    This was the first explanation in about 5 on public key cryptography where I had my lightbulb moment - thank you!

  • @Noxbite
    @Noxbite Před 8 lety +420

    I love listening to that guy. His use of examples and explaining is out of this world. Please more videos! Whatever it might be about

    • @afr0z
      @afr0z Před rokem

      yes, he makes videos about ai and ml on his channel

    • @deekshithathota5204
      @deekshithathota5204 Před rokem +1

      @@afr0z what's his channel..?

  • @krazyq00
    @krazyq00 Před 4 lety +25

    It's crazy how after class and so many videos, only one of them finally makes sense (this one) and now when I start watching the other stuff it starts making sense. Every time I search for stuff now I hope I find a video from you guys with an explanation.

  • @RohitGupta-ms5jt
    @RohitGupta-ms5jt Před 8 lety +7

    You made my day.I am a Commerce student who had no idea about Public key and I needed to understand it because of IT subject in my course curriculum.
    I was totally frustrated and was not able to understand the concept from my book however by watching you video I got a basic idea about Public Key which is more than sufficient for my purpose.Thanks for the video.Love from India.

  • @foxdash
    @foxdash Před 9 lety +62

    Wow this guy is really good on camera, would be nice to see him in more videos.

  • @Jacksaur_
    @Jacksaur_ Před 2 lety +3

    This was the first explanation I've seen that actually explained there was nothing special between the keys other than which one you personally made public or private.
    I never understood why anything done with your public key could only ever be undone with your private, but yet you could also sign emails with your private key to have them confirmed through the public without risking the private at all.
    Brilliant video.

  • @ankontini
    @ankontini Před 7 lety +19

    Thank you! Finally a video that explains what public keys are!!

  • @magikarpusedsplash8881
    @magikarpusedsplash8881 Před 7 lety +5

    I was trying to get started on cryptography in my spare time and tried to understand the private/public key thing, but now it makes complete sense.
    Now I have to learn a bazillion more things and probably go to uni for computer science.

  • @shayansec
    @shayansec Před 2 lety +5

    Really he has oversimplified it...no one can simplify it more than him in just 6 minutes. Great man!!

  • @bhaaratsharma6023
    @bhaaratsharma6023 Před 3 lety +2

    I just waste my time watching other channels for this kind of stuff when I know in the end this is where the real juice is. Impeccable.

  • @veloxsouth
    @veloxsouth Před 9 lety +2

    This is the clearest explanation I've ever seen for asymmetric cryptography.

  • @brandonfrancey5592
    @brandonfrancey5592 Před 9 lety +448

    I'd like to see some simple algorithms on how exactly information is encrypted and decrypted with the keys.

    • @DarksteelPowerchord
      @DarksteelPowerchord Před 9 lety +81

      lmgtfy.com/?q=simple+encryption+algorithm
      You're welcome

    • @kinositajona
      @kinositajona Před 9 lety +31

      It's not exactly simple... but I am simplifying it and leaving out some of the more difficult parts.
      Encrypt
      R = kG mod p
      S = Px where P(x,y) = kQ mod p
      KDF(S) = ke || km
      Use ke in an asymmetric encryption scheme with the message, most of which xor information against a hash. This gives the encrypted message c.
      Run km and c through a message authentication code to get d.
      Encrypted message = R || c || d
      Decrypt
      S = Px where P(x,y) = qR mod p (because your private key times their random public key is equivalent to their random private key times your public key)
      Run S through KDF again to (hopefully) get the same ke || km.
      run c and km through the MAC and if it equals d then you can decrypt, if it doesn't, something went wrong.
      Run the inverse of the encryption scheme with ke and c to get the decrypted message m.

    • @frxstrem
      @frxstrem Před 9 lety +121

      This is a very simple algorithm (that's somewhat similar to RSA, but way less secure):
      Pick any prime N. Then pick any two numbers P and Q such that when you multiply them together and subtract 1, the result will be divisible by N.
      For instance, we can let N = 19, P = 7, Q = 11. We see that this works because 7 × 11 - 1 = 76 = 4 × 19.
      Now to encrypt a message with the key P, we shall multiply it by P, divide by N and let the remainder be our encrypted message. For instance, if we want to encrypt the message M = 5, we would multiply 7 × 5 to get 35. Then we would divide by 19, which gives us 1 and 16 as the remainder. Therefore, our encrypted message is 16.
      To decrypt the message, we do the same thing again, only this time using our key Q. We multiply 16 by 11 to get 176, then divide this by 19, giving 9 and 5 as the remainder. Therefore, 5 is our decrypted result. This is our original message! Therefore, we have decrypted our message successfully.
      As the video mentioned, a message encrypted with P can only be decrypted with Q and vice versa. My example algorithm is pretty bad, though, as it is pretty easy to find Q given P and N, but other (more advanced) algorithms are much harder to crack, because you have to test every possible Q less than N (which is really hard if N is, say, 100 digits long).

    • @aizhol
      @aizhol Před 9 lety +13

      watch?v=M7kEpw1tn50 RSA from Numberphile

    • @niilemak
      @niilemak Před 9 lety +1

      A simple one is the cesar encryption that only consist on moving the letters around the alphabet by a certain key which is a number from 1 to 25.
      You get ABC transformed into a BCD with a key of 1 or the other way around i don't remember.

  • @arunkumaragasar1350
    @arunkumaragasar1350 Před 2 lety +6

    This is a great explanation. I never understood the concept and it bothered me very much being an IT person. This is an exciting concept and I now understand the value of it.

  • @puddingunderground
    @puddingunderground Před 9 lety +1

    I would really enjoy seeing more videos like this. Privacy is in the spotlight right now and I can't explain things simply, so being able to link people to these videos is awesome.

  • @jordansean18
    @jordansean18 Před 4 lety +1

    I must have heard dozens of different explanations of public key encryption, but this one is the first one that just makes sense for the big picture of it all!

  • @raminmdn
    @raminmdn Před 8 lety +5

    Thanks for the simple and thorough explanation, more videos from this guy please

  • @Yizak
    @Yizak Před 9 lety +19

    Brilliant! I wish I'd picked this knowledge up earlier.

  • @doveshouse
    @doveshouse Před 8 měsíci

    I understand that the more complicated explanation for this and yet fully appreciate your simplified description. Even when they full description of how it works is provided in chinhoyi start with your simplified description and then move on from there. Perfect perfect. Nice work!

  • @johndunn8154
    @johndunn8154 Před 7 lety +17

    This video was soooooooo clear and helpful. That was FANTASTIC!

    • @RodneyDavis
      @RodneyDavis Před rokem

      Lol. You’re smarter than me for sure. Even this I couldn’t make sense from.

    • @ManeelxAkosAdor
      @ManeelxAkosAdor Před rokem +1

      @@RodneyDavis That's ok man. For me it was confusing at the beginning because I couldn't make my head around that a function can be capable of encrypting and decrypting with two different keys. that's thanks to RSA algorithm which it is used behind the scenes, which can make the magic. Just try another public-private key encryption video, it's gonna click eventually. Any doubts you have I can help, just bring them here.

  • @ag4ve
    @ag4ve Před 8 lety +18

    I think a numberphile on Fermat's little theorem and how the special primes are used to generate key pairs would be cool

  • @typo148
    @typo148 Před 9 lety +1

    Well done! You obviously understand public key stuff well. It is so obvious when people who don't understand it try to explain it, they always mess it up.

  • @MiscDotGeek
    @MiscDotGeek Před 2 lety

    Where has this video been all my life. Thank you. Excellent explanation, oversimplifications and all. Regarding that, sometimes it takes oversimplifying something so that you can see the elegance of it more clearly. The details will come later.

  • @TechXMarine
    @TechXMarine Před 9 lety +18

    This guy is great
    Perfectly explained

  • @isgdre
    @isgdre Před 9 lety +65

    Does anyone else thing that this guy would do great at playing a young Wolverine?

  • @omegapointsingularity6504

    Computerphile is love. Thank you! Im so happy because the thing in itself is awesome and the explanation was very awesome.

  • @rizwanudoy8280
    @rizwanudoy8280 Před 3 lety +2

    Awesome! Very simply yet efficiently explained.
    So only asymmetric encryption (encrypting with other peer's public key) only ensures encryption, not authentication. But encryption with both own private key and other person's public key gives both authentication and encryption at the same time.

  • @eotikurac
    @eotikurac Před 9 lety +105

    the message always says hello

    • @SocratesAth
      @SocratesAth Před 9 lety +39

      One wonders why they even bother to encrypt it, everyone already knows what it says.

    • @tommysandal6930
      @tommysandal6930 Před 9 lety +1

      ***** Possibly the amount of likes on there comment

    • @SocratesAth
      @SocratesAth Před 9 lety +11

      ***** Tommy Sandal Actually, a sense of humor is usually considered a sign of intelligence.

    • @Darkness93
      @Darkness93 Před 7 lety

      That's quite funny

    • @stefanoc49
      @stefanoc49 Před 4 lety

      And probably the sender is Alice

  • @sth128
    @sth128 Před 9 lety +137

    Yes, pan down and show us his private key...

  • @gabrimatic
    @gabrimatic Před 2 lety

    It was the most simple and valuable explained video that I ever watched!
    Thanks man

  • @liresto
    @liresto Před 6 lety

    Studying for Security Fundamentals for Cisco's CyberOps and this video explained things very clearly. Thank you!

  • @dedwarmo
    @dedwarmo Před 7 lety +156

    Let me see if I understand.
    The message is encrypted using the sender's private key and recipient's public key.
    The message is decrypted with the recipient's private key and sender's public key.

    • @CodeCommand
      @CodeCommand Před 7 lety +26

      Yes.

    • @lixiaochen6
      @lixiaochen6 Před 7 lety +34

      Only if you want to "sign" your message.

    • @dedwarmo
      @dedwarmo Před 7 lety +3

      Xiaochen Li If you encrypt a message without "signing" it. Which keys are needed to encrypt and decrypt the message?

    • @talhatariqyuluqatdis
      @talhatariqyuluqatdis Před 7 lety

      XD

    • @goulougoulou1666
      @goulougoulou1666 Před 7 lety +50

      If you don't want to "sign" your message, you encrypt the message with the recipient's public key and he will decrypt it with his private key.

  • @Wizardofgosz
    @Wizardofgosz Před 8 lety +4

    Believe it or not, the movie SNEAKERS got me interested in the idea of crypto, and right around that time, Phil Zimmerman was becoming famous for having published pgp2.62 to the internet. That was illegal in the US at the time, which led to a lot of trouble for him (Google his name and ITAR and you will find it), and I have been encrypting my email to many friends, since then. Now I run GPG under linux, which is essentially an open source, more sophisticated implementation of PGP, and I highly recommend it. I also had the good fortune of meeting Phil at a lecture about 20 years ago and he signed my PGP users guide.
    I've also read most everything that Bruce Schneier has written on the subject, and subscribe to his newsletter. Something else I recommend. It's very entertaining and informative.

  • @chrissavage4289
    @chrissavage4289 Před 5 lety +1

    Fantastic video -- I've not seen this explained so clearly anywhere.

  • @Rutger5498
    @Rutger5498 Před rokem

    Thank you for this explanation. Really, really helpful, especially because the digital signing part is also clearly explained.

  • @g4bone
    @g4bone Před 8 lety +215

    oh god, that marker on paper noise is killing me!!!

    • @iAmTheSquidThing
      @iAmTheSquidThing Před 8 lety +9

      Yeah. It does put my teeth on edge a bit. They should try taking it out with a de-esser or something.

    • @MrHarsh3600
      @MrHarsh3600 Před 7 lety +24

      Allan Meters it's ASMR for me. Very relaxing

    • @Mariscos420
      @Mariscos420 Před 6 lety

      Using the pointy end of the marker is worse to me.

    • @kennys1881
      @kennys1881 Před 6 lety

      I always write like that xD even when I have normal pen

    • @Anonymous-vh6kp
      @Anonymous-vh6kp Před 5 lety +3

      Sends shivers across my body

  • @yungholocaust6990
    @yungholocaust6990 Před 9 lety +28

    >obi one

    • @U014B
      @U014B Před 8 lety +6

      I know, right! His name is Obee-Juan!

  • @SuperWolfkin
    @SuperWolfkin Před 9 lety

    this right here was my favorite part of the free to download book "little brother"
    it also does a great explanation of public/private keys

  • @sameershahiddd
    @sameershahiddd Před rokem +1

    Well explained in a simple, easy to grasp format!

  • @HAWX4
    @HAWX4 Před 6 lety +15

    "look down in my trousers, where there's a lot of commenters" xD

  • @scbtripwire
    @scbtripwire Před 9 lety +4

    What I would really be interested in watching is a video from Computerphile about what recently happened with TrueCrypt with respect to the author suddenly ending its development and suggesting what are clearly very poor alternatives. :)

  • @headcheese3
    @headcheese3 Před 7 lety +1

    Thank you for putting up this video. I was trying to explain to my roommate how PGP worked and I realized I had no idea how. So, I watched this video and I knew (at the basic level sure, but it's more than I knew before).

  • @petersuvara
    @petersuvara Před 5 lety

    I know cryptography, your explanation is wonderful. No need to go into technical details of the algorithms involved. Well done!!

  • @sheiladikshit5110
    @sheiladikshit5110 Před 11 měsíci

    absolutely brilliant presentation. a clear, concise overview of the technology anyone can understand, in just five minutes.

  • @19kevva93
    @19kevva93 Před 9 lety +3

    You should do a follow up on DiffieHellman Key exchange. It's really simple to implement!

  • @dsarti1
    @dsarti1 Před 8 lety +36

    Amazing how many preppers are to lazy to use this

    • @3nertia
      @3nertia Před 7 lety +1

      Operational security eludes many

  • @yashsolanki069
    @yashsolanki069 Před 2 lety

    This is the Best explanation I've ever come across on public cryptography key.🔥🔥

  • @efeincir3254
    @efeincir3254 Před měsícem

    He's style of telling is perfect. Simplicity of his sentences shows how great his knowledge

  • @Kantenkugel
    @Kantenkugel Před 9 lety +30

    I didnt know that the system is bidirectional / you can encrypt with private key and decrypt with public... thought it was only the other way around

    • @totoritko
      @totoritko Před 9 lety +32

      When used in reverse, it's called signing. When you hear cryptographers talk about digital signatures, this is what they're talking about.
      Just to clarify here, by "reverse" I don't mean public key being used to DEcrypt and the private to ENcrypt. They are always used for the same operation (public key for ENcryption, private key for DEcryption). What happens in reverse is the sequence of operations. When encipherment & concealment is desired, the plaintext is encrypted using the RECIPIENT'S public key, transmitted & decrypted by the private key. When signing is desired, the plaintext is DEcrypted using the SENDER'S private key, this is then transmitted & ENcrypted using the sender's public key to yield the original plain text. This works because public-key cryptographic algorithms have this property:
      D(E(plaintext) = E(D(plaintext)) = plaintext

    • @Kantenkugel
      @Kantenkugel Před 9 lety

      totoritko ty... is this possible for all keypairs? or do they have to be generated specially to be able to do signing too?
      I have used public key encryption already but didnt know i could use them in reverse for signing

    • @kinositajona
      @kinositajona Před 9 lety +7

      Kantenkugel All private keys can sign and decrypt and all public keys can verify and encrypt. Nothing special is required.

    • @denisdionigidelgrande7961
      @denisdionigidelgrande7961 Před 9 lety +1

      Kantenkugel keypairs have to be generated with an algorithm which involves prime numbers (big prime numbers, that's why there are super computers trying to calculate all the prime numbers)

    • @FrancescoBurato
      @FrancescoBurato Před 9 lety +7

      Denis Dionigi Del Grande just for the record: (1) not every asymmetric cryptography system requires prime numbers (look for elliptic curve cryptoghraphy en.wikipedia.org/wiki/Elliptic_curve_cryptography) and (2) since prime numbers are infinite you can't compute *all* prime numbers (I know what you mean but it is just a clarification to be preciser).

  • @shazbots
    @shazbots Před 9 lety +33

    So can any cryptographers tell me what was "overly simplified?" Can somebody direct me to a source, so I can learn more about this?

    • @blenderpanzi
      @blenderpanzi Před 9 lety +2

      Nosey Nick And even that is a simplification when it comes to things like perfect forward secrecy. Because if someone records the communication you described and only later gets hold of the private key of one of the communication partner they can decrypt everything. If I understand it correctly this is fixed by another step where both communication partners generate yet another temporary asym. key pair, exchange the temp. public keys encrypted with the other public keys and use the temp. keys to exchange the symm. key and then immediately throw away the temp. asym. keys. Or something like that. Then the sym. key can never again be decrypted, even if the private key of both communication partners get leaked.

  • @umanggupta4821
    @umanggupta4821 Před 6 lety +1

    Short simple and precise. Thanks Robert for explaining yet so complicated system in a simple way. You have widened my horizon much more than it was 6 minutes ago.

  • @waqaskamal4428
    @waqaskamal4428 Před 4 lety

    Excellent explanation. Has clarified the confusion I had on how it works. Thanks

  • @FlyingTurtleLP
    @FlyingTurtleLP Před 9 lety +9

    More Crypto-Stuff, please!

  • @subvind
    @subvind Před 7 lety +9

    0:38 *paranoid look*

  • @codydv7388
    @codydv7388 Před 5 lety

    This is the most well constructed explanation I've seen yet.

  • @liekna
    @liekna Před 9 lety +2

    very nice and simple way to explain PKI. you dont need to go more into detail then you did! good work :)

  • @rajshrisukhani6318
    @rajshrisukhani6318 Před 3 lety +3

    i wasn't doing Ceasar cipher when I was a kid...

  • @AsbjornGrandt
    @AsbjornGrandt Před 9 lety +39

    For this to work for "the masses", we'd need companies like Google, Apple and Microsoft to put their heads together, and provide a universal public key server/service across their respective platforms, and integrate its use into their products.
    The problem is, do we trust them enough to handle even the public keys?

    • @RaminHonary
      @RaminHonary Před 9 lety +2

      You mean like this?
      developers.google.com/accounts/docs/OAuth2Login

    • @AsbjornGrandt
      @AsbjornGrandt Před 9 lety +1

      *****
      That's for authentications. I'm thinking more about encryption, and getting that technology into the public sphere. Even with PGP and similar tools, meant to make this easy, it's really only used by the few, because it's not easy, and it requires the recipient to install special software as well.
      What if Google, Apple, Microsoft and other providers were tied into the public key services, and would automatically handle for instance authentication of incoming messages, should they have been signed, and in turn help you to generate the private key needed, and get its public key exported to the servers, in a nearly seamless manner.

    • @RaminHonary
      @RaminHonary Před 9 lety

      Asbjørn Grandt you mean, so people could share encrypted and signed files with their friends? So for example if you circle someone on Google+ you get a copy of their public key and you can send files intended for them only?

    • @AsbjornGrandt
      @AsbjornGrandt Před 9 lety +1

      ***** That's not a bad idea. But also if someone sends you a signed message on for instance Gmail, it'll ask if you want to verify it.
      I know there are plug-ins (probably) and other email clients can do this. I would just like it to be built in, and active by default.

    • @KimNilsson
      @KimNilsson Před 9 lety

      Most email software support encryption with S/MIME, but for webmail the user needs to install addons.

  • @magdalenawalczak8725
    @magdalenawalczak8725 Před 2 lety

    The idea is brilliant and the explanation is great too! Thank you!

  • @dushyantm9579
    @dushyantm9579 Před 2 lety +1

    Loved it. Finally someone who can understand and also explain.

  • @stensoft
    @stensoft Před 8 lety +11

    One important thing: the key pair for decrypting incoming messages should never be the same as the key pair for signing outgoing messages. There are some clever attacks that allow someone to impersonate you or read your messages if you use the same pair for both ways. So you should have two key pairs.

    • @kickthejetengine
      @kickthejetengine Před 8 lety

      +Jan Sten Adámek Why and how? I'm interested to know.

    • @GtaRockt
      @GtaRockt Před 8 lety

      +Jan Sten Adámek can you explain those attacks or forward me a link please?

    • @GtaRockt
      @GtaRockt Před 8 lety

      Jan Sten Adámek thx I'll look at it :)

    • @davetherave112
      @davetherave112 Před 8 lety +3

      +Lobster with Mustard and Rice Was there a link sent? I'm also interested in this example, can you forward to me?

    • @the1exnay
      @the1exnay Před 8 lety

      +David Engelhardt if it got forwarded to you can you just post it publicly. pls

  • @SyphistPrime
    @SyphistPrime Před 7 lety +4

    That is clever. Granted now there are bigger fish to fry because this is only the beginning.

  • @KulasangarGowrisangar
    @KulasangarGowrisangar Před 6 lety

    This is an absolute peach, and kudos to the explainer. This is the only vid which explains, what happens when you encrypt a message with a sender's private key and the receiver's public key. +1

  • @DarkFall01
    @DarkFall01 Před 7 lety

    Best explanation I could find. Simple and to the point. Thank you.

  • @thadeuluz
    @thadeuluz Před 7 lety +18

    what I would really like to understand is how they get made and how the algorithm to encrypt/decrypt works.. it makes no sense to me that you can encrypt something with a public key and other people with de public key cannot decode it..

    • @MrRichiban
      @MrRichiban Před 7 lety +47

      It's called a trapdoor function in mathematics, that is: a function that's relatively easy to do one way but very difficult (read: practically impossible) to to the reverse.
      The closest everyday situation I can come up with is to imagine a person with a pen and piece of paper. Ask that person to square the number 213. Given some time and providing they know long multiplication they could probably work that out. However, if you ask them to square root the number 45369 they'd probably give up and go home.
      This is how public/private keys work--given one of the keys in the pair you can encrypt, but the maths is too hard to decrypt without the other key.
      If you're interested the keys are basically very large prime numbers, and you raise your message (represented as a number) to the power of one prime and then mod the result (taking the remainder after division) by the other prime.

    • @marco4568
      @marco4568 Před 7 lety

      boss!

    • @sebastjansslavitis3898
      @sebastjansslavitis3898 Před 7 lety +14

      Simple example.
      You have two dictionaries, English - Chinese and Chinese - English. You can encrypt text with first book quite easy, but its very hard to decrypt something with same book, it just don't do the trick, for that you need second dictionary.

    • @kuradag
      @kuradag Před 6 lety

      So what keeps someone from intercepting the public key so they can read the message? was it sent metaphorically separately?

    • @chloegantzel
      @chloegantzel Před 6 lety

      A public key was never sent. Both public keys are available to anyone who looks for them. However, the private keys are never ever shared. So you encrypt your message with the OTHER person's public key, because that encryption can only be undone with the OTHER person's private key, which they already have and you don't need.

  • @Lorryslorryss
    @Lorryslorryss Před 9 lety +4

    Yes, good explanation. But what are Alice, Bob and Eve doing while this is going on?

  • @ramprasath219
    @ramprasath219 Před 5 lety +2

    You explained very clearly that a normal person without the knowledge of cryptography can also understand 👌

  • @student99bg
    @student99bg Před 9 měsíci

    This is so clever and a very nice explanation as well

  • @mphomathabathe8558
    @mphomathabathe8558 Před 4 lety +5

    "..everyone and his dog" XD

  • @YumekuiNeru
    @YumekuiNeru Před 9 lety +7

    I do not understand how you solved the problem of agreeing on the key to encrypt with at all, I feel you just added one more step. How do you get the public key from a person while knowing the public key has not been modified?
    Are there public keys all the way down?

    • @Niki_0001
      @Niki_0001 Před 9 lety

      I may be completely wrong or misundertood your question, but let's see: instead of having to meet in secrecy, you can give your public key to anyone and everyone to see and encrypt messages with, but only you (or anyone you've given the private key to) can decrypt the messages.
      This way two spies could simply share their public keys so that the other spy can encrypt the message using it, but only the spy with the private key can decrypt it.

    • @YumekuiNeru
      @YumekuiNeru Před 9 lety

      how do they share their public keys?

    • @Niki_0001
      @Niki_0001 Před 9 lety +1

      YumekuiNeru Right, I guess that would be troublematic... If the spies were modern people, they could simply publish the key online anywhere (like a pastebin file) and the other person could simply copy it from there.
      It doesn't matter if other people copy the key because they can only use it to encrypt messages, not decrypt them.
      I don't think I've properly understood this myself, so someone please correct me if I'm wrong.

    • @KaiserSpherical
      @KaiserSpherical Před 9 lety +2

      Rented Mule No, you've got it right. Since it doesn't matter who has the public key, you could simply e-mail me and I could send it to you. Or post it on a tiny url page. Or post it to a mailbox. Or on Facebook.
      Once you have the public key, you can use it to encrypt "shared secret" keys that're used for encrypting messages to each other. Which is part of the simplification here: Public Key or Asymmetric Cryptography is just one part of a grandiose system, designed to allow you privacy and safe passage in the tumultuous internet waters.

    • @YumekuiNeru
      @YumekuiNeru Před 9 lety +2

      Rented Mule yes but how do you as a visitor of a pastebin file know that the person who published that key is the person you think, or how do you know that key is the same as the one the person published?

  • @fluffykickflipper
    @fluffykickflipper Před 3 lety +1

    Thank you! This was by far the most helpful for me to understand this concept!

  • @justtoleavecomments3755
    @justtoleavecomments3755 Před 3 lety +2

    Great video, quick intuitive explanation that was easy to understand!

  • @ChosenOne41
    @ChosenOne41 Před 8 lety +20

    What I don't get is why you can't figure out someone's private key from their public key. If one undoes what the other does doesn't that mean they are opposites of each other? Can't you just sort of reverse the public key and you would have the private key? I mean, obviously not because then this whole system wouldn't work but then why doesn't it work?
    A bigger question would be what exactly is the contents of these keys, is it just a large jumble of numbers or something?

    • @mibblemerp
      @mibblemerp Před 8 lety

      +Chosen One 41 A key looks something like this...
      -----BEGIN CERTIFICATE-----
      MIIDBzCCAe+gAwIBAgIJAL6xD+LpwcWhMA0GCSqGSIb3DQEBBQUAMBoxGDAWBgNV
      BAMMD3d3dy5leGFtcGxlLmNvbTAeFw0xNjAxMDYxNDIwNDZaFw0yNjAxMDMxNDIw
      NDZaMBoxGDAWBgNVBAMMD3d3dy5leGFtcGxlLmNvbTCCASIwDQYJKoZIhvcNAQEB
      BQADggEPADCCAQoCggEBAM1YVdJj10e/4pkXo9I029HrxWTR6TDN9sc82KkxggeX
      5e33bSTwtxI6f7e0dO07bjPvrN/tTebdKRTK83wu62mdjuajVWgWecUp0AtP7GYs
      9WfLfecWRlydKpaUh2gyVL7oM/jnMKFi49YeRxpYPwqX+D/C5QB4I8yAiwolcosN
      9amL6E7JT3vIR8Gne5xit0lpaW86uw92dyB1WHkFUQkj3ny5MEhXYOIc4anlgDWC
      vL2LhpwCpgLagKE+3/wTAWjLgFAB75xKqfYbb3FZSUzz6xUBhQ1XsgoBTbcGhvc8
      UeQ0Ok6w1XDm41DxEUvB3FqJt76W0YW4cSob2X+Rf+MCAwEAAaNQME4wHQYDVR0O
      BBYEFG8cYrrtLs8Sc4RJgc8hsxiwUoSAMB8GA1UdIwQYMBaAFG8cYrrtLs8Sc4RJ
      gc8hsxiwUoSAMAwGA1UdEwQFMAMBAf8wDQYJKoZIhvcNAQEFBQADggEBAHxX9Q1b
      WxLC10ZrIAkArULUwOmjTRfUZ+Ty+6hw6SJ+2W39iDRpacN+IguNos/f1opYfz6b
      lTkIH7OMyuTGQ0HeoUO7h37jxE9qNABtZAVWz93WZvqYtC0PH1cXVRhIlQB5W7fd
      +89gBI1ptFmhGS2SOlOt4pa4G4XSMqsYoDk69pvg5v6egs1kBcmdC1MvLAb9SFBz
      /OEWSlaIA1dpJxmV4VKQPKMcNAouAbgWIareCOQcGjEnS5o5lp/U3HFhqigWGnGB
      NsLMrZeGdnEwXlx6uoYIU9W5Z/F+ji8RkY8jOugvYybQth35B3PuTluNUYMviEJE
      b+fCWkRdkh7CBm0=
      -----END CERTIFICATE-----

    • @TylerDehan
      @TylerDehan Před 8 lety +24

      You can, but that's like having "f(x) = y" and deriving x from y. If you have x, you just run the function to get y. But if you have y, you'll have to go through all possible x values to see which one ends as y. If you take the example of 1024-bit keys, that's 2^1024 possible values to check. It would just take too long to go through them all.

    • @kriptonis
      @kriptonis Před 8 lety +2

      +Chosen One 41 the quick answer is: Yes it is possible but the time it would take to guess the very large random prime numbers used to generate the keys is so big, it would take millions of years to guess them. So this technique works because current computer processing is limited.
      And even if it didn't take 1million years, even if it only took 10 years to decrypt a communication based on public/private key. Would it be useful to find that facebook password or credit card number used today in 10 years? For all communication that is not "government secret" level this would mean you can't do anything useful with the info you get.

    • @anthonydevellis6708
      @anthonydevellis6708 Před 8 lety +1

      +Chosen One 41 the last layer you encrypted is the first layer you need to decrypt. Let's say there's p1, p2, s1, s2, (public key 1, public key 2, secret key 1, secret key 2).
      If you encrypt with p1, it must be decrypted by s1, and vice versa. Same for the second pair. So if you encrypt with s1 then p2, the other person first needs to decrypt the text using s2, then must decrypt the ciphertext generated by your private key, s1. The order matters. Rigorously (yes, I know I am using a key to mean cipher function but this is simpler to explain):
      Given a message M, the intermediate ciphertext becomes C = s1(M). The cipher text that the other person actually received is encrypted with their public key, p2: C' = p2(C). This means that C' = p2(s1(M) ) (by substitution). To decrypt, we apply the inverse functions in reverse order, M = p1( s2( p2( s1( M ) ) ) ), since s2 is the inverse of p2 and p1 is the inverse of s1,.
      First we get back to C by applying s2(C') to get C (since p2 ( s2 ( s1 ( M) ) ) ) = s1(M). Then we apply p1 ( C ) = p1( s1( M ) = M.
      The order is what makes this secure.

    • @300096586
      @300096586 Před 8 lety

      If anyone asks, just say "lots of math" and big numbers rendering infeasibility unless you possess a super computer.

  • @MrBenMcLean
    @MrBenMcLean Před 5 lety +13

    Sometimes just knowing the size of a message, when it was sent, from where and to where is enough to effectively guess the significance of an encrypted message. One encrypted message in a sea of unencrypted messages stands out. I guess the only solution is for everyone to be sending lots of encrypted garbage to each other all the time.

    • @Another_Look
      @Another_Look Před 3 lety +1

      Well, you might now it is significant, but the problem is actually decrypting it.
      Sending lots of garbage to each other fills the system with unnecessary data and reduces efficiency/availability and so on.

  • @mrtoad1408
    @mrtoad1408 Před 3 lety

    Thank you for the oversimplification. As you say some things are simple at concept and then layers are built on top as they become more complex. To explain to a complete novice you need only make sure they understand the core concept.
    It reminds me of an ancient system used when there were only physical messengers running long distances with lockboxes to communicate. Person 1 would send the box with their padlock (A) to person 2. Person 2 would add their padlock (B) and send it back to person 1. Person 1 would then unlock padlock A and send it back to person 2 who would then unlock padlock B.

  • @stevensmith5626
    @stevensmith5626 Před 2 lety

    U hooked me with the Greenbar!!! I'm a programmer from the 70's and that was what we used. thanks for your great explanation

  • @thevoidreturnsnull62
    @thevoidreturnsnull62 Před 8 lety +18

    "obi one" -- welp, now we know who isn't a Star Wars nerd!

    • @U014B
      @U014B Před 8 lety +28

      I know, right? They didn't even mention Captain Kirk!

  • @larax222
    @larax222 Před 6 lety +5

    I want the complicated version :D

    • @prana6854
      @prana6854 Před 2 lety +1

      3 years passed and I hope you dont need it :)

    • @larax222
      @larax222 Před 2 lety +1

      @@prana6854 not need just want

    • @eroorefulufoo6625
      @eroorefulufoo6625 Před 2 lety +1

      @@larax222 i would honestly like to see it too, i'm scrolling through the comments not finding anything

  • @SC-rb2jr
    @SC-rb2jr Před 2 lety

    This is very well explained. Its a very clever system and very satisfying to understand.

  • @hung216mc
    @hung216mc Před 2 lety

    I know this concept long time ago, this is the first time I understand it, thanks so much friend

  • @thrillscience
    @thrillscience Před 9 lety +8

    I think he goes to the same hairstylist as Martyn Poliakoff!

  • @kisaposti
    @kisaposti Před 7 lety +6

    i didnt know that wolverine was a crypto expert when he was young.

  • @vytas5584
    @vytas5584 Před 14 dny

    Thank you. This was the third video I tried and I understand it now. There are two different processes to understand, and other educators were unable to clearly delineate them for me.

  • @palmomki
    @palmomki Před 9 lety +3

    This is kinda cool, but I'd be much more interested in understanding how this key-pair works, I don't understand how can it.

    • @jorl17
      @jorl17 Před 9 lety +1

      Not sure if this helps, but here goes. This is the most widely used assymetric crypto system out there en.wikipedia.org/wiki/RSA_(cryptosystem)

    • @joealias2594
      @joealias2594 Před 9 lety

      Math.

    • @palmomki
      @palmomki Před 9 lety

      Joe Alias Ok XD I'm not saying "I can't believe it works", I'm just saying I don't understand it.

    • @joealias2594
      @joealias2594 Před 9 lety

      palmomki Yeah I just gave you the super super short version.

    • @palmomki
      @palmomki Před 9 lety

      Joe Alias I had a feeling you meant that.
      By the way, ***** the page is a bit too far for me, but I think I can see that the point I didn't understand isn't explained there (or maybe it's just not said explicitly). What I actually didn't understand is how can the two keys be interchangeable without being compromised. (How can it be that the private key decrypts a public encryption and the public key decrypts a private encryption avoiding that the private key is reachable) I would guess that in this case you could somehow obtain the private key by analyzing how both the encryption and decryption with the public key work, because if they can decrypt each other it means that both the public encryption and decryption processes are strictly related to the private key.
      In brief, it seems to me that there are actually many data about the private key in the public key itself.

  • @j.richie3352
    @j.richie3352 Před 2 lety +10

    Very well explained but I keep on finding it difficult to learn or become and expert trader by watching tutorials here on CZcams until I was introduced to a licenced investor a great tutor and a mentor ,I must say Sir Brown is nothing but a genius.

    • @jamiel8385
      @jamiel8385 Před 2 lety +10

      Oh that's awesome to know you also let Mr Brown trade for you ...he is such a genius in crypto market ..

    • @clayty8689
      @clayty8689 Před 2 lety +9

      I used to make loss trading crypto until I found people talking about the expertise of sir brown when it comes to the crypto market ...meeting sir Brown changed my life ..I no longer have to worry about debts because I invest another so I make huge profit trading with him

    • @AVRoy-nt2yk
      @AVRoy-nt2yk Před 2 lety +9

      Please does anyone have an Idea how I can reach out to sir brown..its urgent ..

    • @clayty8689
      @clayty8689 Před 2 lety +9

      OK that's easy..all you need to do is connect with him on LinkedIn as

    • @clayty8689
      @clayty8689 Před 2 lety +9

      Sir Obrowne

  • @mistercochella1044
    @mistercochella1044 Před 3 lety

    Just learned about public key cryptography from Mungo Jerry and I love it! Seriously, with your help, I was able to pass my Security+ (first attempt)!

  • @ArturGrigio
    @ArturGrigio Před 9 lety

    A very clear explanation of cryptography!
    Great video!!!

  • @sghost128
    @sghost128 Před 8 lety +12

    His hair reminds me of Guy Martin.

    • @thevoidreturnsnull62
      @thevoidreturnsnull62 Před 8 lety +1

      +sghost128 If you speed it up to 1.5x, it almost sounds like him too! ;) Only with clear enunciation.

    • @sghost128
      @sghost128 Před 8 lety

      TheVoidReturnsNull And less motorcycles.

  • @xanokothe
    @xanokothe Před 9 lety +4

    You know why so people use it? Because it can cost hundreds of dollars per year! The cheap ones: 100$ for a domain, 300$ for all company domains, 500$ for subdomain of one domain. Dafuck? It's like 1kb of data (public key, private key, company info, domain). This is the expensive storage system on the Internet.

    • @TheFerdi265
      @TheFerdi265 Před 9 lety

      workaround: Put a folder for public keys on an ftp server and just en/decrypt messages yourself (using software like OpenPGP), afterwards, paste the messages whereever you wanna send them to

    • @xanokothe
      @xanokothe Před 9 lety +2

      I'm talking about domain verification (https). Self Signed Certificate triggers on browser "a not secured website".

    • @TheFerdi265
      @TheFerdi265 Před 9 lety

      oh, that's what you mean. Yeah, that stuff sure is expensive

    • @xanokothe
      @xanokothe Před 9 lety

      yeah and piss me off really hard too

    • @DFPercush
      @DFPercush Před 9 lety +5

      There's a limited supply of prime numbers (edit: within a given finite range which can be stored on the computer), and a very large demand. That's why it costs money.

  • @colinallcars5239
    @colinallcars5239 Před 6 lety +1

    Just watched a dozen videos on this....this is BY FAR the best explanation. Thanks.

  • @theupthere9989
    @theupthere9989 Před 6 lety +1

    I visualize 256 bit encryption like 2^256 railroads arranged in a circle so that they all point towards the middle (sort of like a clock with 2^256 positions), and they are also stacked 2^256 high. There is a rotatable platform in the middle that has a straight piece of railroad that can only connect two railroad-pieces at a time, to make a connection from one side to the other.
    At which position your track is on "the clock" is your public key.
    At which level your track is (height wise) is the private key.
    Combine them and you get the only possible way to connect the railroad for passage.

  • @nunyabiznez4408
    @nunyabiznez4408 Před 9 lety +3

    secrets are for evil doers.

    • @JonathanJardine
      @JonathanJardine Před 9 lety

      nunya biznez What... Did you read the whole thing and realize there isn't anything you could do but complain about it's length? Or is this another misdirection trick? Are you saying you don't have the mental fortitude to understand and reply appropriately? Do you ever think that maybe anger isn't the driving force in the universe? Why do you feel the need to project your anger issues onto everyone?

    • @nunyabiznez4408
      @nunyabiznez4408 Před 9 lety

      Jonathan Jardine

    • @phesterful
      @phesterful Před 8 lety

      +nunya biznez nice nick. no, you're not trolling at all... OK (for the audience), not just evildoers (even though law enforcement knows their identity *because* they encrypted a message...), but also people installing software, publishing official documents, talking with attorneys, discussing trade secrets over the internet like before software is public, self-defense against terrorists and other criminals, talking with their bank, logging into any sites on the internet, buying anything on the internet, thwarting spies, checking for viruses... the list just goes on & on.

  • @iralepppi
    @iralepppi Před dnem +1

    why is this filmed so aesthetically 💅

    • @iralepppi
      @iralepppi Před dnem

      that camera tilt👩‍🎨

  • @dhwanilthakkar9398
    @dhwanilthakkar9398 Před 4 lety

    The last part was really intresting , i hvae never thought of it in such a way. thanks man.

  • @ajaxSAF
    @ajaxSAF Před 4 lety

    Wow... Thanks a lot! I was really having a tough time with understanding digital signatures until the second half of this video

  • @grahamrichardson4328
    @grahamrichardson4328 Před 6 lety

    THANK YOU. So so so so so well described as opposed to other attempts on the internet.