The RSA Encryption Algorithm (1 of 2: Computing an Example)

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
I have to kind of apologize. [I] thought about how to do this, right? I could have done this with actual How the Irsa system would actually work with actual numbers? With an actual like long message and all that kind of thing and we could do with computers I could show you how to do it, and I thought no No, I actually want you to see the maps of what's going on So I have picked simple simple things like a one letter message okay, so forgive me for that. I should Okay, yeah, so so now let me start So the RSA Cryptosystem right RSA stands for these three names on rivest. That's a V rivest shamir Adelman these guys were geniuses okay, [and] you'll see why as you as the method unfold But no one no one remembers their names, so we just call it rSA. Okay the rSA Cryptosystem it works like so What you need is an encryption? Pair of numbers okay, and this is kind of like the pair of locks [that's] sorry not the pair of lock the pair of numbers is the lock that I hand out to everyone okay, so I? This pair of numbers okay, and I say look you want to send me you want to send me any message you like okay? Use this this lock right to lock up your message And then I'll be able to decipher it and only I will be able to separate so just as an example suppose you want [to] Very secretive you want to send you the letter b. Okay, so go home my boat all right? So how do we do this let me show you then that saab is deceptively simple But you do need to remember a little bit about what we did with modular arithmetic on the Caesar cipher I promised our dear heart okay, so here's what we're going to do First there, this is this is text, but we need to deal with numbers right so I'll convert this to a number okay, so numerically Like we can decide whatever, but I suppose We'll call it - what are we okay so - that's the actual definite text for number. We're going to send okay Now I want to I Want to use the cipher on this thing okay? So [I'm] going to do is I'm going to take this number - okay I'm going to raise it to the first power the power of the first number as you said, right So to the power of five and then I'm going to say more The second number this is what I'm going to calculate This is how I'm using the numbers so first if you set the letter C Which would be 3 then what you would calculate is 3 to the power of five more 14, okay? Let's just quickly do this because the numbers are okay. That's how I chose them right to the power of 5 To 2 notice that's 32 good right mod 14 now Do you remember what Mod means [no] [sugar] is knitted right this number 14 is called the modulus What I want is the remainder that I get that's left after I divide 32 by 14, okay? So of course the biggest number the biggest multiple the 14 you can fit into this is 28 And so what's left over is 4 does that make sense? Yeah, so that's a 4 mod 14 okay, so now for This is my ciphertext okay, so the ciphertext My encrypted message, okay will be 4 which is D I guess [ok] so that's what you send to me right and now it's a secret the original message is lost How do I decipher this okay? Well? You don't use this pair of numbers, okay? I have the R value of the key right the key is related to this the second number [the] 14 is the same But for decryption the first number is different Right so in some sense is this first number. It's the secret. It's the it's the key if you find it out You can decipher everything that comes to me okay? So in this case The decryption Key is 11 14 like I said this number here the modulus is the same but this number here this one is the key Now what do I do with this well? I'm going to go through the same process, but I'm going to use this pair of numbers instead [of] this pair of numbers, okay? I take your ciphertext right which was the ladder deep and I'm going to go through this whole person again I have to convert it to a number which is 4 [ok] then I raise [it] to this power, and I say more 14 okay now to the power of 5 you could do that in your head [before] [the] power of 11 Maybe not so get your calculator out Yes, well, how do you get [Eleven]? I'll get to that, but the point is I know what it is And you don't talk That's part of the point that you can't just you can't just see oh, yeah Five means Eleven right the point is that no one can work it out? In fact, it's I'll show I'll tell you how hard is to a gap in the end So I have this can yep No, no, and you also think what if it was always going to be [11], it'll be a pretty lousy education All [right]. See you guys later there now. Yeah, so the first thing you do The first thing you do is for the power of 11 okay for to the power of 11? Okay now then you get out this monstrous number Okay, and this is Mod 14 okay, Mod 14 so Unfortunately or maybe fortunately um our calculators don't have a mod button on there, okay? So I will short show you a sort of a quick and dirty Shortcut that will work out what this number is and actually part of your homework [I'm] going to make a star here, so I don't forget it Part of your homework in a post after this lesson is to explain What I'm about to do, so you want to take note of what I do fairly carefully, okay? Why does what I do? What is why is what? I will do why does it work and it introduces there's a problem with the method It's easy to solve by what you work out number one. Why does it work number, two? Why does it introduce this problem to strange kind of problem all right? So here's what we going to do remember? This is about remainders right [and] division all I kind of think so the first thing I'll do is I'll take that number which is on my display and I'll divide by the modulus 14, so you divide by 14 [and] it'll give you like I gives you a fraction, but I want the decimal okay So this shows me two nine nine five nine three point one four two nine blah blah blah blah blah, okay [so] I see that number okay now what I want to do is just mentally take note of the Integer part of that no which is two nine [nine] five nine three Okay, so what I'm going to do is Actually should put that off on the side But I'm running in a space swimming what I'm going to do is I'm going to subtract the integer part from the whole number Okay, so on my calculator [with] this on the display. I say minus two nine [nine]. Five nine three Okay, and what's left is a decimal in fact it's this decimal. Okay now once I've got that decimal there I want to multiply back by this [modulars] fourteen okay, if I multiply by fourteen What my calculator then says is no [money] cookies my calculator then says this? and There's an eight or a couple of eights on the end. Okay. Now. What number is this close to 2 so this is 2 mod? 14 okay, let me just remind you what's going to go in that hand [word] person number one why does this work? It's not that that's not the hard part okay. Why does this spit out the correct this is called the residue What's left over okay? Why does [that] work and secondly? Why does it do this? Hmm you think about it. You can work it out. Okay? That's that's going to go into your home if you have a it's up I Know there's an easy way. I this is a particular way that there's being for all of us suffering. Yeah, okay, all right. So yeah yeah, why doesn't he give us two why doesn't it give [it] to because the shit gives [to] Okay So now how about what just happened I? Finished the process the process is Done. I Started with your cipher texts you sent me d right and so I went through this process and at the end I end up with this which is your original text B, and I have deciphered it it would and you can go [ahead] and you [can] test out what you need is you need to Encrypt it like this and Then decipher it with this using this interesting combination of the power and this module of the relative
Info
Channel: Eddie Woo
Views: 1,072,841
Rating: undefined out of 5
Keywords: math, maths, mathematics, Algorithm (Literature Subject), Encryption (Literature Subject), RSA (Literature Subject)
Id: 4zahvcJ9glg
Channel Id: undefined
Length: 8min 40sec (520 seconds)
Published: Tue Nov 04 2014
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.