Oh, by the way. Good. Hi. Yeah, I'm off by exactly two minutes every day. Okay. All right. Step or a whole in a bar. Okay. Great. Big one. What start in on the project to sit here we go. Take a look, see. I did not check my Discord for people with a NBA. Good. So here's the idea of this project too. I should probably call it Project 3. And Project 2 is like you're hacking Project 1 or whatever. I, you know, I think of that as Project 1, 0.5 doesn't get a number. So here this is a wasp bingo. And the idea is roughly this. Here's this done little spreadsheet or whatever. And the concept is that you're going to make video write ups of you solving a bunch of different web exploit CTF problems or whatever. If that gives you the CBGB's because you're like, gosh, I've never gotten a single one ever or whatever and I'm no JD or, you know, then that's fine. Ish. But here's how that will feel. Here's a set of six different types of prompts that yeah, exactly. I wanted to add a couple of others to that. So I think adding some other places where write-ups exist, imaginary if the write-up doesn't exist yet, right? So if it came out recently, so what right. So. Let's talk it out in just a few seconds, like with everybody. But after I've, I've laid out the point system. Because imaginary might actually be something that's like three points per imaginary or something like that. Okay. So here's the concept of this is, again, it's trying to honor Lake, my crazy teaching philosophy, which is that you're the driver of the car here, not a passenger on the bus. I want you to focus on mastery and your own sense of mastery. And I don't like rubrics and things or whatever in this kind of sense. But at the same time. Okay, So here's the notion. There are 11 fillable roles. One eats for the top 10 most important web app security problems that exist, right? This second one extra for all the other weird things that show up and CTFs all the time that don't quite fit the top ten. Okay? Don't abuse that too much or whatever. Actually, it doesn't matter because for each of those rows of those 11 categories, you can only get 10 points per row. So if your plan was to get really good at SQL injection and just get all of your 50 points for finding every SQL injection problem ever or whatever. Too bad, you got 10 points out of that. And so you have to pick at least five different categories of exploit to pull. Okay? So the idea is that each one of those rows, maximum of 10 points per row. That's an order to force you to be familiar with the top 10. The other subversive thing it does, you get some problem. It's the git directory is public or something or whatever, and you're scraping everything, you have to go and assess which of those rows it belongs in, right? That means you've gotta be familiar enough with all the different natures of the exploits. Now people classify it so you'll want to stare at this site for a little bit. And each one of these top 10 has got sort of a description of why it's there, what it really means to them, like a beyond just the buzzwords. So you can say like okay. So for you to get pretty familiar with that top 10 list and be able to assess in your mind that a particular vulnerability you found fits into one of those categories or not or whatever. That's it. That's a Meta skill that I like out of this. Okay. It's not just about the flag. I actually want you to make some sort of a video. Now for you to make a video is a little bit out of scope, maybe except for you've all got Zoom from UDL. You can just record your own screen recording to the Cloud. You know, do your thing. I would recommend you could also use OBS or something like that. Here's some notes on this. So each row is maximum ten points. You have to cover at least five topics. But if you are freaked out, then you're gonna be living down in this space is the space where problems exist on the Internet already. Here's problem sets out there. Tyler and Daniel. I have other sets of problems that I want to add to this and I just didn't last night or whatever, but it's going to say, yeah, actually tell me the other problems I should add to this. That, but the problem with these ones is that other people have made write-ups for them, right? So if you're tackling a thing by going through somebody else's write-up. That's not worth any points. That's good though. It's more of a training thing. So if you're imagining this or you don't know yet what you're doing. Then you live down in the write up space for a bit. And then keep your eye out for live CTFs. So to say every weekend there's live CTF. So you've got to CTF discord. I'll, I'll make an extra note to sort of in our Web App Security discord channel be like, Hey, there's a good one for you guys. Go jump on this right now. And unlike our flag Bragg channel, just because one person gets it doesn't mean you have to stop. Somebody gets it fine. Keep going. Do it yourself. And then just be sure to try to pay attention to if it shows it the number of solves that problem had. So on CTFs typically this show you how many people in the world solved it. And if you've got one where very few people solved it and you did 10 out of 10 max your points right there or whatever. That's hard, It's hard to do. So probably you're going to end up more in like this area, you know, when you do a live one. So it's a little bit high risk, high reward. Or you can craft your own problem. So you're on the other side of this. You say, I have an idea for how I would make a website that's vulnerable to this thing. And, and so you make it and you host it and you have me happier flag or whatever. So if you craft your own problem that's hosted out there, do a little video write-up of you doing your own thing. That's when I'll call that ten out of ten, you, you've created a problem for the world or whatever good made the world a better place. That's how that works. I was going to have a conversation with Tyler publicly, but he's left the room right at the key moment, that's fine. So inside the box, give me a URL to your video write up. So I wanna be able to click the box and listen to you test that, you know, like Go to, go to a browser you're not normally log into or something and just click the box and think, Oh, okay, cool, That link worked. Because if you just do as record to the Cloud Zoom, it's going to have a private settings by default or something like that, maybe see up to allow me to watch it. Another thing on that, UD doesn't hold your Zoom cloud recordings forever. It might even be a shortage like two weeks or something, which means if you do it now, then by the time I actually look at this in December, the video is not there, right? So I think there's a setting at UT. We can say this one's important, keep it. I know that there is for me as a faculty, but hopefully there is for you as a student. If not, push it over to YouTube or Vimeo or something or whatever. So it's a little bit more annoying to do that. But my thinking is this. I actually would like it if you thought of the video you're making as an educational resource for future generations, for your little siblings out there. Something for future students that you want to teach, or even that you'd be happy to show in a job interview. You're like, yeah, right. Here's me. I can I think take a look. You know, obviously that adds a little bit to it, but yeah, in terms of a sense of excellence or whatever, do that. Probably the best strategy if you're not accustomed to this kind of thing, is train on some problems that have write-ups. Get your 12 points or whatever, grab three points in a category isn't like that. Maybe in a couple of different categories, grabbed two or three points and then jump on. Just pay attention on the weekends for life CTF one to see if you can cover the gap. By, you know, you've trained a little bit in this one. Now here's alive when trained a little bit in this one. Now here's a live one. So this is not a project that lends itself well to procrastination. If you imagine putting it off to the last weekend, the only CTF running is DEF CON and it's really hard. And so you're not going solve any of those, which means that you're stuck making 50 videos of one pointers. You know, like that's a lot of work. Versus if you've been added every weekend or just like putting a little bit and I'm not I'm not saying spend all of your weekends unless I'm saying, yeah, you look every Friday for a problem. You find a few, you grab it. You can be done in as few as five videos, right? So it's like the amount of work for procrastinating it it actually penalizes you for procrastinating right? In naturally, which is okay. If you're doing that, you've learned more. Maybe if you did 50 problems or something, but and yet you probably don't have the skill set to knock it out in just five. So you'll probably have to do some amount of training at the 12 point level and work your way up. So definitely progress. If I'm right, I think you should enjoy the experience like kinda like a discord. You guys were really nervous at first. Let's say you're gonna build discord. But a lot of people afterwards, like okay, I get it now, Thank you. That was really valuable. So here as the opposite or the yin to the yang of discourse, this is now a bunch of websites are built and you're exploiting them. The other half of the course at the security side. So all the flags have been doing every single lecture and things like that or whatever else or I'll find prepped for that training every Wednesday and Friday afternoon. So hopefully that all lines up nicely and you can make something that you're proud of. So. I don't like things that feel quite box checking is like literally box checking. But inside of each of those boxes, I think it's like a real potentially life-changing experience, each one. So that's, that's the goal, right? Questions or thoughts on that. Okay, cool. That's Project 2. I put a due date that I wanted to look it up, but I just said, you know, whatever our final is, that's when the project is due. You know, there isn't a final just turn that in. Okey-dokey. So this so you'll want to get to know this pretty well. You'll want to get to know this classification set. I think it's timed out nicely. They, they just revamped it for 2021. Said it feels a little bit more like topical at this exact moment. They did it in kind of looking at all known CVEs and CW ease and things or whatever to say, hey, out of all the websites we could find that are actually vulnerable, most of the more vulnerable to this and then this and then this, and this is almost all data except for the last one. Really cute about it. They're like, Hey, so server-side request forgery, we found very few problems like that in real life, but the community thinks it's really important. It was their number one, so we're going to throw it on, it's number 10. So this is to say there's like a mismatch of perceptions from the community and the reality. So this is largely aligned with reality, but we'll see. Okay, Tyler, I wanted to have a conversation in the middle of all that you let just at the wrong time. That's cool. The conversation was roughly this. For imaginary CTF. I like imagine ACT UP. I'd like you guys doing imaginary CTF. I think that unlike alive CTF, the problem lives for a month, right? Like the problem is live for a month. It's so and you've probably even jump in the Discord and get people giving you hints and things roughly or whatever. I think. So. Either imaginary CTF counts as like five points just by nature or it's more like three points as some sort of in-between the two. Because normally CTFs, you've got 24 hours, like that's a that's a good amount of intensity. You've got to be pretty good to pull that off. Okay. So if you did imaginary CTF within 24 hours of that web problem coming out, than to count that as it again, it'll probably be five. Yeah. Yeah. Yeah, Yeah. All right. I'll I'll add one column here for like imaginary CTF after 48 hours. 48 hours from edge and CTF up. And, and this is just to say here's imaginary CTF. Okay, Cool, That's good. That's good. So they just they do live problems every day at that last like the month, roughly. So we're at the beginning of the month, a new problem will come out. And they're pleasant, but they live for a month. So it's somewhere in between because you can find them on Reddit and discord and stop and you can get hints, things, blah, blah, blah. So they tend to be very beginner friendly. So that's nice. That's why it's broken. Okay, cool. We'll live with that already. That was the first thing I wanted to say to you today. No other questions on that. So let's try to I'd like to move on from the crypto stuff. I think I did release a thing. Well, let's take a look at it. This comes out in whatever wacky order. So this like five script thing here is me copying and pasting for you on how to set up your like Discord secure channel. So I'm pretty sure that if you just run this first one from a to B is part one. If you just run this, it'll say share these three values. You're the one who sets the prime, you're the one who sets the base, and you're the one who sets the first public key. So this is part 1 of the conversation. Then the next part is person be receiving from a will copy those three things from you into the source code and then run this. And now this will be your public key that you have to give back to a is this line. But note that a also has this little part that you have to copy paste and keep secret. So do not share this part. Okay, careful with your And the outputs, that is to say this is my private key. It's important to be also now doesn't even the arrow. All right, that's a typo there. They don't actually need to know. They're little b anymore. This is now just the shared secret. I wrote it as b equals, but it's shared secret. Change it here, not there. By the way, this is why comments or self commencing code is nice. Comments get outdated pretty quick. Since I actually, you know what, I don't need to store B, I just have the secret already. Okay. Point. Then. A will copy and paste in all the stuff that they already knew their private, the B public, PG, whatever. And now they'll have the shared secret key. Now my typo propagated itself the two scripts. Great. So now there's assume that are wrong, that say b equals even though they're the shared secret key. Then can both just move to encryption and decryption. So here type what you want to encrypt, copy the shared key. The rest will just sort of work itself out. And for decrypting, put in the ciphertext in hex, but in the IB in hex convert from hex to bites. I was a little bit cute about the way I printed this. Where like ciphertext from bites and I put the hex right in there so you could copy that directly, in which case these lines aren't necessary. So it says or if you have the direct stuff and then decrypt it. So those are just little helpers that do the work for you to set up your public key channel in discord. Okay? Alright. Body language is sleek, muted or neutral for that. So that was a gift that had maybe less value than I imagined. That's fine. So just to say, this as a thing is at the guts of how all of the Internet really works. There's two changes from this thing to the real internet, like I said, for change one, this is now an elliptic curve. Change to, this is now GCM mode. That's it. That's the internet. Okay. So the thing I wanted to say to you to wrap this up is there is a whole hell of a lot of work that goes on by the Internet Engineering Task Force and a lot of government agencies and a lot of really important and powerful people because of the following problem. The second problem, first of all, show you one problem that is not that. But it's good to know also. And this is the first problem I'll show you. I'm going to show you two flaws. One, Let's Play Game. Thermonuclear war or whatever. Okay? I've picked a random number between 2500 in JavaScript here. You all are my gameshow contestants. And our job. Let's say that there is a $90 prize and I'm going to take away $10 for every guess that you make or every clue that you need. Right now, you have no clues for me. Are you willing to go for the number 0, 2500 for your 90 dollar prize without getting any clues. Probably not, you know. So let's say that you've got very little risk tolerance. So here's the thing. You shout out a number, one to nine, and I will tell you my number, modulo your number. Okay? So imagine my number 17, you shout out three, I saved my number is two mod three. Okay? And now you're closer to knowing that the number is 17. Okay? So that's the DMM. What one should we click first as a class, right, to NADH for to get a lot of people are into two. Okay? So we're clicking to the number is 1 mod 2. Okay, So what did we do? We took it from 0 to 2500, and now we know it's odd. So we go 1, 3, 5, 7. All right, so we eliminated half of the guesses. One clue eliminated half of the guesses. All right, three. Okay? 0 mod 3. So now let's talk about what this does. I knew it was an odd number. Alright, so first off, monomer with number one. Now I know that it is 0 mod 3. So here's the way I think about that. Take the number one. I can add 3, 4, I can add two. So I'm going to add two. So I can go 1357, whatever. If I take a number and add two ways to mod 3, 2, diplomat number 1. And I add to this a little bit nutty, but I can look at what is 1 mod 3. 1 mod 3 was one. So obviously our number is not the number one, but I can add to it, I'll still have something that is 1 mod 2. And I'm going to start to cycle through the answers mod 3. So if I add two to one, I actually get 3. 3 happens to be both odd and 0 mod three. So three is the best I can do. How far is that valid for? So, you know, what is the next number after three that satisfies both of these constraints? Nine. Okay. It's not six, not 59. How far was nine from three. Kindergarten question. Find a first grader. Okay. The six is up with it in. Six is the smallest number that is told in total agreement on 236 is the least common multiple of 23. So adding six will not affect the answer it all right? So if I've got three, I can add six. And I will also have something that is 0 mod 31 mu2. And I can add 600, something that is 0 mod 31 month two. So adding six will take me through all your answers. So I now have a sequence of possible answers of the form 39152127, etc. Okay, so three plus six k are the possibilities. What's Next button that you want to push? Seven, okay? Alright, this is interesting. I like seven here. Now what made you choose 75 number? It's a prime number. Why not five? Well, you're going to have five. Other one. Well, do you not quite sure why 7 over 5 intuitively knew it bigger. Well, it's a prime number. Well, it got it. Okay. All right, so, so 96 and things have stuff in common, a 23. So that kind of messes with me. So one of the things we've picked up here is that the numbers I know the answer for, I guess the least common multiple of those that dictates the gap in which I might answer is unique. So a different way of looking at this problem is, what set of numbers, what's the fewest numbers I can know that have a gap bigger than 2500. Which case we made the wrong choice as a group by starting with 2 and 3 are on the wrong end of that spectrum. You know, we, we've eliminated one in six numbers, 56 numbers. But if we had done 98, we might've already eliminated 72 numbers per 7172, right? So, so we went on the wrong side of that spectrum. So you moving to seven. That's a move in the right direction philosophically. Okay? So we're going 70 mod seven. Okay, so now let's think about our numbers. Our options were 39152127, etc. Okay. Now, you probably already know the answer because I'm being long-winded. But if I'm at three, what is the number three? The smallest candidates of art, what is number 3 mod 7 is 3. And the unit that I can add right now is six. So what is six mod seven? Six, yes, also negative one. So when I think six months, then when I think of negative one. So if I'm sitting at 3 mod 7, every time I go up a unit of six, might the answer there is going to shift backwards mod 7. So let's pay attention to how that feels. I'm at 3 mod 7, add six, I get to nine. What is 9 mod 7, 2. I went from three mod seven down to 2 mod 7. If I do it again, I'll be at 1 mod 7. If I do it again, albeit 0 minus 7, and that's where I want to be. So I'm going to add 63 times. It's going to take 18 plus 3 is 21. What is 21 mod 7, 0. So that is to say there's a cycle and a cycle in a cycle, the current kind of interval I'm moving by has a remnant that only affects the new data. It only affects the world mod 7 because it's fixed for the first two world. All right, so I can jump pretty quickly to 21 as the smallest answer. Now here's the question. What is the next number after 21? That honors all three of these things. 63. I'll buy that because they find seven. No, 867 is 4384. Cool. So we took 21, we added 42. And now we're going to have another thing that 0 my 300 months that and and what not to. Okay. So now how accurate is our range? A range is accurate up to 42 numbers at a time. So we know 30 is the unique answer. From 0 to 40 to 63 is the next, and so on. Okay? So we now know the answer mod 42. Okay, what's the next button? I suppress going with nine. All right. Do you guys agree with him? That's not as clear right now because we because we started with 23, what will nine do? Nine is going to grow our 42 up to a 126. I'm going to go up by a multiple of three. Is there a number here that I can click that will take me further. Five will take me the farthest. I agree with that. Nine is still not bad, but it's a little better. And five was the best at that exact moment in terms of just grow in the darn thing. So where are we? We're at 21 mod 42, okay? So 21 plus 42 plus p2 equals 42. What is 21 mod 5 is 1. So now the question is, what is 42 mod 5? 2? So find that one. And I'm going to add two for every action I take. How long before I'm at 2 mod 5, What's the cycle I gotta do? I'm going to start on that one. I'm going to go to three and we go to 0. I'm gonna go back to two. So I'm going to take three steps mod 42 before I met two mod 5. And we found that little abstract, not writing anything down. So what is 42 times three hundred and twenty six. Twenty one hundred and twenty six. That'll take me to 147. Alright. Let's check 147. Is on. Yes. Is it a multiple of three? Yes. Wonderful to work with seven as well. If one was to be a 140. Multiple of seven. Yeah. Cool. And is it a multiple? Is it to my time? Yes. Okay. 147. Cool. How big is the what's the next number after a 147? That honors all four of these. I'll just start taking notes for 41. Sure. So 6, five, thirty, two hundred ten. So 357. I'll say, I know the answer mod 210. The answer is one of those. Pick a K, It's one of those. All right, you get the game. Let's finish it off real quick. Now, we know the answer up to 210. We need to know it up to 25 hundredths. We might have to do this two more times or something. What's the next number I should ask for? Eight. Sounds good. That's going to take me up from to ten. I predict up to 840. So this should take me up to 840. Here we go. Seven mod 8. All right, soap is one. What is 147 mod 8? I'm going to quickly move past what I can do in my head. Okay. Good. All right. That was my guess is holding it up. Let the record show. And what is 210 mod 8? So that is to say, you know, mod 8, this is 3 plus k times what? So to 10 mod 8, 2. Okay. Oh yeah, I wasn't making my guess anymore. Yeah, yeah, that sounds good. Okay. And our job is to jump up to seven. So how many steps should we take from three till we get to 72 steps. So we're going to add 420 to 147. So for 20 plus 147567, can't do that while high. So we now have 567 plus k times what? What if the next number after 567 that satisfies all those constraints? Well, we just guessed it before 840. And that is sort of the least common multiple of all of these. Okay. Not bad. Not bad. Okay? Yeah. 567 and thought this is the product of the modulus. So lastly, where you will be the next one where they all think they're satisfied. We double-check everyone. I'm going to double-check all the things. So in essence, this is the smallest number that is 0 mod all of the modulating. So adding it doesn't affect our answer in any of the equations. So kind of a different way to look at this. It's almost like old-fashioned planetary motions, you know, back leg. Before Kepler they've got like all the planets are in cycles and the planet cycling like this and then the cycles are going like this. And so the cycles and cycles are doing these things or whatever. That is to say every time I add something in all of these equations, you know, if I'm going to add the number one to a number x that satisfies all of these. The value of x mod each of them all goes up by one. Yeah. Well, so, yes, you'd get 1680 if you multiply that modulus by eight. But why can't I multiply it by eight? Because the mod two is encoded already into the mod 8. Said they didn't know the answer. Mod 8 is to know the answer mod two. So we started with just a bad clue, Sorry Daniel. But starting with two was the wrong move. Now. And that's why you don't get to all the way to 16, Whatever. All right. Yeah. It would absolutely useless do mod 4. Useless to do mod 6 and use those to do mod 1. What will be the answer mod one? By the way, 0, it's always, you're never clicked. Mod 1 adds no value. I've only done one research result where numbers mod 1 mattered. That's when you're doing like rounding. You're talking about floating point numbers mod 1. Okay? So the only button depressed is mod time, right? We just eliminated none of these at any value. Now that we know what we're talking about. Okay? 0 mod 9. All right, so 567 mod 9, 54 tons of both stat. Oh cool. It says 567. All right. So now 840 times 3 is what? 25, 20, which means that 567 is the unique answer inside of my interval. So now I can go from knowing it mod whatever to knowing it, knowing it. So we'll call that 5, 6, 7. You went. Okay, cool. Alright. This game that we just played and all to elaborate fashion, It's a very beautiful and powerful mathematical result called the Chinese remainder theorem. That is to say, if I know a number mod five and I know a number mod 7, then I know that number mod 35. Now, here are, I first encountered the Chinese remainder theorem when I was a young person getting into computer algebra, work in a maple soft, building algorithms for doing high-speed linear algebra and high-speed polynomial math. And here's what you want to do. If you want to do high-speed matrix math, right? There was this CTF problem this week and it was a high performance computing CTF from a perfectly normal thing to do is say, I don't want to mess with all your big numbers, dude, I'm going to take your problem, that is a massive problem, mod 5 and solve it, or mod 7 and solve it. I'm just going to pick out a bunch of primes and we solve the problem mod of prime because that's fast. All the numbers stay small and they're small forever. And then once I've done enough primes and I have some guess of how big the numbers should be. Then I'm going to reconstruct the actual answer with the Chinese remainder theorem. At each coefficient of the polynomial, each thing in the matrix or whatever. I don't know if you've ever done like row reduction in linear algebra. And they've got a big matrix and you're starting to like make it into one zeros and things or whatever. And you're subtracting and dividing and subtracting and dividing those mother, those fractions get giant. Before the collapse back to just a few integers. If I just made it all mod seven the whole time. And then mod 11, they would've stayed small the whole time always as integers. And then the answer would also be small as integers. That's called intermediate expression swell. And this beauty right here allows you to make ship fast things without, with it while avoiding intermediate expressions. Well, really cool, really cool. Alright, why did I show you that and Web App Security class. I told you that so I can tell you this. It might lag for the day. I thought about not doing this. I o, I started to compose a message to the Discord group yesterday saying, Hey, I think I might do a different topic tomorrow or I was thinking about different things. But then I thought, No, no, no, this is too good. Here's what I want to do. If you take a look at yesterday's flag and compare it to today's flag. Everything from here to the bottom is identical. So I just took all the code from yesterday and I just changed this part. I made a new flag, of course. And then I added these three things. So replaced get strong prime. And I wrote my own function called get weak prime. And that's it. Everything else is the same. This is your Internet. This is your Internet. If that prime isn't chosen carefully, then it's completely readable. Oh, I made one other change. Instead of showing a private key. I pretended like I was the NSA listening in on the starting TLS handshake. I only took the public stuff. I now took the role of an observer of the conversation, not a participant in the conversation. That makes all the difference. This is I don't know you I don't know your private secrets. I don't know jack about you, but I'm interested in listening. And said, yes, you're switching to encryption, but I'd like to read everything that you're encrypting. Okay, cool. How do I do that? I just listen to the starting handshake, which is captured on Wireshark. You've captured this handshake a 100 times. You ever turn on Wireshark, you've captured this handshake. I'm going to listen to the ansi and now I'm going to read your ciphertext. Okay? That should scare you. That should scare you because that's your bank information, that's your credit card, that's your passwords, that's your everything. Anytime you've got that green lock, anybody can listen to the opening dialogue of that green lock interaction, which I need to talk about, right? So today's all about TLS to some extent. But step 1 of TLS and backdoors and TLS, and there are back doors in TLS. So step 1 of understanding those back doors is this weird number theory, fact. Ok. Now Gian Daniel and red skull and I have been hanging out talk in number theory every Wednesday afternoon. It's been really fun. I've not been talking with received about number theory. So to do a number theory thing here is a little bit scary to me. That's why we played the game. Alright, so here's the goal. Everything is protected by this problem. We take a G, we take power of G to the a mod P. And trust that if you know that you cannot figure out a, right, it's called the discrete logarithm problem. That's the hard problem at the core of the sprint. So here's the idea. I have this scenario. I know h, I know g, I know the modulus. I don't know x. I need to figure out x. Okay? So pretend like my prime is 31. All right, for time like my prime is 3 one. Here's the concept. One. If I have a prime, any number to the prime minus 1 is actually 1 mod prime. And Daniel and g, I know that intuitively. Everybody else, I'm just going to do a thing here. Ipython from Crypto, get prime. And now I'll say import random for blog and range. I don't know, let's just do ten of them. X equals random.randint from two to p minus 1. And I'll print x. And how of x to the p minus one mod p. Okay? All the x's are giant. And I took a huge exponentiation mod a huge number. And I like threw a dart from eight miles away and cut right through that tiny little window to get a one right? Like that's totally improbable. Right? So, so this is only possible with number theory. Say okay, I can tell you an exact number where I can raise any number you want to p minus 1 and I'll get one. Amazing. Amazing. Okay? That's Fermat's little theorem. Great. Okay, so here's the idea. What that really means is that I don't have to check every value of x. I only have to check the value is one to 30 if my prime is 31, or one to p minus 1. Okay? Because I'm going to cycle through 0. P to the 0 gives me 1. P to the p minus one gives me one, everything else. You can do some sort of weird cycle through all these weird powers of numbers might be.
cpeg472-010-20211103-090500.mp4
From Pasquale Zingo November 03, 2021
16 plays
16
0 comments
0
You unliked the media.
Video Created by UD Capture Classroom Recording in Brown 101 on 2021-11-03 09:05:00.
…Read more
Less…
- Tags
- Appears In
Link to Media Page
Loading
Add a comment