 What is going on everybody welcome back from the YouTube video look at a little bit more of the seesaw red Competition not too many people played this but I did want to highlight some of the cool stuff that it had This is the challenge easy RSA for 50 points just the first challenge in the cryptography category It's literally simple RSA. So if you don't know what RSA is you could simply Google it RSA and you'll get the crypto system article on Wikipedia Kind of explains a little bit more of what it is the math behind it, but it is just in a sense Public create a public key crypto system. So I've covered it in many many videos And you can totally find more of them if you just Google or YouTube search My name and RSA and some other CTF stuff, but it explains that okay, you have Some numbers here and being your plain text being the original message e being an exponent and being a modulus D being a private key C being the ciphertext, etc And this article explains a little bit more Normally you're given just N and E because that would make up the public key You are not given D and that that is the private key Because because D as the private key will let you decrypt the ciphertext that you're given in this case We are given D so we don't have to try and figure it out through some cool mathematical calculations of Modular multiplicative inverses and the phi function and totian function stuff like that and maybe Phi I don't know the correct pronunciation. Sorry, but we don't need to deal with P and Q in this case because we're just given D we aren't however given E, but we can assume that it will be kind of the default normally just six five five three seven and Yeah, that is kind of this the usual e or exponent that's given and that public e is n and e since we're not given that e We can just kind of assume and work with that. So we've given these values here Let's go ahead and do this because the Wikipedia article explains how we can just simply decrypt and this decryption segment here It says you can recover M the plain text from seek the ciphertext by using your private key exponent D by computing a I'm sorry C to the power of D Mod n is equal to M. So let's go ahead and do that. We can do it simply in Python here I'm just going to create a yet flag script. Let's go ahead and make a directory for this. Oh Already made it But I didn't make the easy RSA And let's mark it as complete just because we are We were confident. We know we're gonna solve this easy so we'll get flag Let's get a simple shebang line and We have our numbers that we can just paste in here So we're giving all these variables and let's go ahead and print out just the power function Which is the power function in Python? So something raised to a power or something given an exponent. Let's actually determine what e should be as well Let's say 0x 1 0 0 0 1 and that should be the proper Number I believe I paste it in hex. Yes, that is that is the default The decimal number that we would see for e except just in hex because a little bit easier to remember For some reason in my mind So power if you were using the original function, you wouldn't normally expect to see it with a base raised to an exponent So in this case C raised to D However, if you give it a third argument, you can give it a modulus. You can give it that percent Symbol as you saw or mod in some mathematical format here So we can just say as a third argument n and then we print this out And it's not defined because it's capital N print this out We're given this which is a decimal number, but we want to in hex so we can give her and ask you pretty easily So let's wrap that in hex and then you can see some of these letters are ASCII characters Let's cut out the 0x and L at the very end So I'll just do a slice operation from starting two places in Colon to represent all the way through this this the string here and then negative one So I cut out the L at the very end So now I just have that number in hex then we can go ahead and decode it as hex and we have the flag flag Ron and a these individuals that help make the that did make the RSA crypto system They would be proud. So that's it. That's all you could submit for 50 points simple challenge Just kind of basics of RSA. We didn't have to try and factor and or determine peaking queue or any of that hardcore stuff It is simply easy RSA. So you could submit that and get some points Hey, just a quick shout out to the people that support me on patreon. Thank you guys so much I cannot say it enough you are really what keeps this channel moving Keeping me motivated to keep making cool stuff. So thank you. Thank you. Thank you Thank you $1 a month on patreon will give you just a special shout out just like this at the end of every video Where you can have a little bit of some feel-good feels that you're helping something helping me helping I'm just supporting the channel. Just donating. It's it's it's wonderful feel-good vibes $5 a month on patron will give you early access to every video that I create If I don't go ahead and put it on YouTube immediately I am admittedly right now behind schedule So I do not have a whole lot of early access stuff to show you so but that that should not suede you That should not move you from from being willing to give me $5. I don't know. Thanks. You guys are the best. Thanks so much If you do like this video, please do like comment and subscribe If you're willing to join our discord server link in description It is a cool cool place full of CTF players programmers and hackers It's really neat community if you want to hang out with me hang out with some other cool people That's the place to do it. I hope to see you there. Thanks