Elliptic Curve Cryptography: Discrete Log Problem & Quadratic Residues
1 hr 22 minAudio
The Study guide: https://ecc-study-guide.magicinternetmath.com/guide.pdf In this episode of Magic Internet Math, Rob and Brady discuss the discrete log problem and its importance to Bitcoin's security. Key Topics: Discrete Log Problem Modular Arithmetic Elliptic Curve Cryptography Quantum Computing Bitcoin Transactions Summary: Rob and Brady revisit the math study guide, now nearing its end. They reflect on their journey through modular arithmetic, inverses, and groups, emphasizing their importance in understanding elliptic curve cryptography. They highlight that a deep understanding of group structures is essential to ensure the validity of point manipulations on the curve, which cannot be brute-forced. They stress the need to understand the underlying math to defend against potential attacks that exploit a lack of knowledge in this area. The pair dive into the discrete log problem (DLP), calling it the "big boss" of arithmetic and a crucial element in Bitcoin's security. They note its relevance in the context of quantum computing threats. They explain that the DLP relies on the asymmetry between easily calculating a public key from a private key and the computational infeasibility of reversing the process. It's also described as a form of digital physics, requiring immense computational force to "open the door" and reverse engineer the private key from the public key. The computational cost of solving the DLP is measured using Big O notation, with algorithms like Shanks and Pollard's row reducing the complexity to O(√N), still a significant hurdle. The hosts use a small modular arithmetic example to illustrate the DLP, emphasizing the difficulty of guessing the power needed to reach a specific point on the elliptic curve. They stress the importance of understanding logarithms, describing them as simply powers. They use the mnemonic PEMDAS to explain the order of operations, highlighting the inverse relationship between exponentiation and logarithms. The discussion transitions to the "discrete" aspect of the discrete log problem, explaining that it implies a lack of continuity, making it impossible to infer proximity to the solution. This contrasts with Bitcoin mining, where there are multiple valid solutions. The discrete nature of the DLP forces trial-and-error approaches, making it computationally hard and ugly on purpose. They mention that the best algorithms currently can only reduce the search space to the square root of N.
Audio and video play straight from the show's own hosting. PodSubs stores and serves no media.
Transcript
From the show. Tap a time to play from there.
All right. All right. We are here. Back. Back with the duo. What's up, Rob? Hello, hello. Welcome back. Magic Internet Math. We are going to, I think this is in episode six. Yes. We're counting my solo episode, I guess. We can count the solo. I think the solo episode is part of the official production. Yeah, dude, this isn't like, this isn't pickleball where like if one person can't come, like no one can play. You know, the show must go on. We got to keep this going.
Well, you know, it's really great to be back here with you because now you, you know, right now where we are in the moment, the moment of the show is we have been slogging through the study guide that. And, you know, I love, dude, I love going through a math book for me is like every single one I've ever done has a story to it. And it's like it's almost like smoking a cigar where like you have the first third, the second third and the last third.
And each one of them is almost like a different cigar. Yes. Yes, very much so. If you get through the first third of the math book, the second third is the journey of itself. and then if you get really get through that at some point in time in that second third you start to say shit i'm actually going to get to the end of this book i'm pretty sure regardless of how hard or how much i don't know what i'm even doing i'm just going to get to the end just to just to do it right or there's no other way out of this maze you know you hit the point of no return and you
have to just keep going and that's we're almost at the end of this we're at the end of this pretty much i think of the like the arithmetic journey towards starting to kind of now talk about the elliptic curve like we've been setting things up i feel like we really did a good job with modular arithmetic and inverses it that opened up a lot for me in terms of even just explaining my conviction and just so okay this is how we know we know we have this glob thing
out there called an elliptic curve and i know my private key sits on there and i know i share another point out there and i know i need to you know play around with those things publicly to be able to sign transactions so but we're like super super zooming in um like that's that's all going on on the moon but we're doing things on this earth to try to just to explain why why are we looking up there right and so you know modular arithmetic inverse in groups we you know we did
a good job we can't over repeat groups because that's where you get identities and inverses and closure and those things really all base unit that all this stuff built on top of that's right and the answer to every question of how do i know like when i manipulate my point on the on the curve How do I know I'm still good? Right. It all comes down to understanding the structure. Absolutely. You can't calculate it. You can't do it on a pen and paper. You can't do it with every calculator, every computer on earth.
Right. You need it. That's why you need to keep it in an abstract form because you're just talking about the general principle of numbers along this elliptic curve. And you can't, to your point, brute force every permutation and give a conclusive proof of all answers. Right. It's like it's impossible. but um and i think it's also important to know the stuff because i do think there are people who will manipulate our our lack of willingness to go here it's an easy attack um this is really why we do this right now right um so we got through those primitives and i think that we're
at the we're at this sort of key point here i think it's the big boss of arithmetic it's the reason we do all the arithmetic, which is now the discrete log problem, if you think we're ready to do that. Discrete log? We'll go right into that? Yeah, I think we're ready to hit discrete. I don't think we need to do more on groups. I think anything that happens with groups will just continue to come up in repeatable fashion. I think we're ready to talk about, really, this is the coup de grace right here.
This is the reason it all works. This is the big idea. The big idea and this is the thing that people also – it's the topic du jour of the quantums. If like, oh, well, if it's discrete logarithm problem, then we're all cooked and all that stuff. So we should know what this is. This is the key to everything. It's more like, OK, if this ever fails, we have to figure out a new one. It's one of those – this is the thing that binds – this is the force. finds everything together.
I would say the discrete log problem plus proof of work are the two things that hold Bitcoin together. Yeah. And the proof of work one is pretty straightforward, but I'm going to start there because it's an easy principle to understand what we're getting at here. When a Bitcoin miner, when they mine for a block and they find a block, they present the full block saying I have solved the puzzle and it is very trivial
for you as a node who did not mine the block to verify it's correct but the amount of work to get that answer has so much asymmetry on the other side where you have to actually just blindly guess and that's kind of the same idea of the discrete log problem where with this public-private-keep relationship. It's very trivial if you have the private key to find the public key, but from a public key, you cannot trivially reverse engineer and find the private key. That's like the idea.
Yes. It's this, you know, what you're describing is this two-way pathway where it's very easy to walk one, you know, it's very easy to walk one way and it's like impossible to go backwards and traverse back to the point you were at it's not possible with it's not that it's not possible it's that you know this our civilization hasn't figured out how to create enough power to do it that's real and that's so in this regard right what one thing i don't think we've discussed yet here
is um it's really important in the this whole side of cryptography really works because in a sense it's digital physics in a sense it's it's asking this question how much force is required to open a door and is it possible with all of the resources that to create force on this earth is it actually possible to open a door in order you know how much force is required to do that
And so that it's the other side of this. You know, if you really open to me, it's the very tedious part, but it's also the most important part of these cryptography textbooks. Have you like big O notation where we say, OK, this can be solved in the level of N or this can be solved at the level of the square root of N. What does that mean? That just means that like, okay, there's like a linear, you know, there's a linear cost or there's a less, like there's a less than linear cost or like there's a more than linear cost.
I think the simplest way to put it is the computational cost is important to measure. And the discrete log problem, in order to solve it, there are ways to solve it that are actually – so the brute force way to solve it takes a certain amount of energy. Like 2 to the 128. Well, the brute force would be 2 to the 256. But because – then there's a couple of – there's been a couple of algorithms like Shanks and the one that – Pollard.
Pollard's row. And by the way, if anybody is looking for a – if anybody is really engaged here and wants a reference, one little book to reference this. Neil Koblitz's book called – I think it's called There's Number Theory and Cryptography. And that's the Koblitz that's the SEC P256K1. It is. The K in SECP 256K1 is cobblets. Well, yes, but I need to – I've been corrected on this. So I'm not ready to publish an errata because I don't know that it's wrong.
I'm just saying that people have – some people have pointed out that that's not why it's K or that's – No, I'm kidding. It's a very fun – it's a very actually distinction, but I'm not putting it down because I appreciate the feedback. Got it. You know, but it is that Koblitz. Yes, it's that Neil Koblitz. And, you know, as an aside, as an aside, I've talked about this on Motivate the Math because when I started Motivate the Math, I was using his book. That was like the book that I decided is his number theory book.
And it's so good. I really recommend it. It's small. It goes through everything we've been talking about at a pretty good level. um but i i had i was sort of so disappointed to hear i saw him on a podcast and you know he does work for the ethereum foundation now and he was like this is a guy that invented all this stuff and he's going he's on this podcast talking about how privileged he is to be solving like the energy problem of the world by supporting a proof of stake um token you know what i mean and it was
How the mighty fall. You see this with mathematicians. My like my most kind of the person, the mathematician that's most important to me, my my professor from who opened up everything for me. His name is John Alan Paulos, author of the book Enumeracy. You know, I follow him on Twitter and I kind of, you know, I know him. He used to live. He used to literally live in my neighborhood when I grew up. It's like I see him on Twitter and he's basically very Kablitzian in his ability to disappoint me and to make me just wonder what – it's a side quest I have, which is – obviously I am of the view of studying math hard is a pathway to personal power.
But where is the cautionary tale – where does that cautionary tale detour happen also? So obviously it's necessary but not sufficient I would say. But this is something that I'm thinking – we're talking to people who sort of are already strong people but need this one discipline and would benefit from this one. But understand this isn't the answer because you can lose your mind all the time at some point, especially if you're being paid. I think you can lose your mind. You can lose your way. And we see it all the time, the Bitcoin space.
We're seeing it especially right now in Maxi Madness, not to get too into it. Just, you know, seeing the crash outs. Anyway, that is all to say Koblitz is alive on this planet and his work, his textbook is excellent. Highly recommend it. There is a course version on my site based on that book and that's a nice way to access the book too. But the book is perfectly accessible and I actually recommend it.
I like using books if I can. Yeah. But it really – I feel like it taps me into the thinking. It taps me into where they were when they were writing it and I like books. So anyway, back to the discrete logarithm problem. So we brought up Koblitz because actually he does a really good job of pointing out these costs, the costs of solving these problems. Yeah. And so it's O to the square root of N is really what the – it's called – there's a giant step. There's a baby step, giant step algorithm and then there's Pollard-Rowe.
And they basically – these are – they elegantly reduce the solving of the discrete log to the square root of N. And that's where now it's 2 to the 128 bits. But that's still very, very, very, very, very large, right? So I think we covered – so we covered the cost. The cost is really important even though like – right? It's like that is really – because it answers the question, is this safe? Can I trust my savings behind this, right? right okay uh would you agree we covered that okay i think we covered that as a good
at a high level um just to maybe uh as a brain exercise for everyone right let's just take a small group of like uh mod sets right and let's say three is the generator just to keep it in a small space world here um three to the one is three mod seven is just three 3 squared is 9 mod 7 is 2 right 9 remainder is 2
mod 2 then you do 3 cubed which is 27 mod 7 is 6 3 to the 4th is 81 mod 7 is 4 you can just take my word for this or you can do the arithmetic yourself if you want to verify 3 2 6 4 it's also in the study 3 2 6 4 and then 3 to the 5th equals 5 which is 243 them on seven and then three to the six goes back to one it wraps back to the start right so we have a nice little closed group now if i told you the number was the answer to the question was five
how many times did i go through the generator you could look at it pretty easily and say you know what it's actually five the fifth element of the group is what going through the generators which get 2.5. That's a lazy trick. Now, this is a scaled down example. We don't use that as our base, but what if the list of the group entries is 2 to the 256? It was the entire elliptic curve. You now have this asymmetry where
it's way too large to trivially compute all of the answers and you can have a number you start with, which is your private key and put it through the generator. And that output gives you the public key. But if I just give you that public key, you're not going to be able to do the reverse math enough times to be able to find out where that actually belongs. So that's like the discrete log problem at a very high level in the application of how we use it for public private keys. Yes. And if you really doubt what Rob's, by the way, everyone listening to this podcast, everyone,
I know there's a wide range of people listening, but everybody should really go and sit with a pen and paper and do that math and do it also with mod 11, 13 and 17. It's not like that hard to do, but you'll start to see how hairy this gets very fast at low numbers. And I have a game on the website, magicinternetmath.com. I have a game called Mod. It's called Mod Racing. and it's like you're just trying it's like actually just fast doing module arithmetic in
your head but this you start to see how hairy this gets pretty quickly and what so what i'm going to grab onto with what rob just said the the name of the game here is guessing the power right you're given a base we know so we know a base to a power and we know the answer right the discrete law we know that we we we know the answer the answer is um the public key which
is your you know your private key times a generator which means it's a generate you you've taken the generator point that everybody knows and we've added it to itself a number of times right so it's that number of times is we call it scalar k times g sorry um your public you're sorry your private key times the generator is the amount of times we've added it to each other and we tell the world this number and we're so confident and brazen that we're saying guess what we can tell you this total
number you'll never know you'll never be able to know how many times i i added my public key together Sorry, I added – you'll never know how many times I added the generator together to exponentiate into the – And that number of times, that scalar is your private key. Yep, and that's right. So come and get it. You're basically – the discrete logarithm problem says come and fucking take it, right? Yeah. I'm giving you all of the pieces and I'm so confident in this math. I'm confident in the number of computing,
the amount of computing resources that exists today and reasonably into the future that I'm telling you to come and take it. Now, I'm going to repeat myself a few times because I'm trying to zero in on the factors because I think it's important first to explain what a logarithm is to a lot of people. I don't know about you, Rob, But when I was in high school, which I barely I really barely went to my second and third year, I kind of stopped going.
But I was still into math and I was studying it by myself. But when I hit this thing called logarithm, my brain broke. And I actually gave up. I said, you know what? I guess I'm never going to understand what a logarithm is. And then in college, I learned calculus and it all made sense. And I was like, oh, my God. That was like one of the first moments I got angry. I'm like, why don't they teach calculus first? Why are they doing this? Why do they do it like this? You know, this is absurd because I remembered all of the pain I went through in high school
trying to because I'm like, I've never had this problem before. I've never had anything. I just like had to accept. I wasn't going to get. But why did this word is weird? Logarithm, it's a weird word. And it didn't for some reason, my brain, it just could not it just could not work. and no matter how many times I sat there and did problems about it. So let me – I just got done explaining this to my daughter and I feel – I'm feeling like I'm on a heat check. Go for it. I'm going to talk about what a logarithm is, OK?
Because I don't want people to get tripped up by this and you can't know what a discrete logarithm is if you don't know what a logarithm is, OK? So all the logarithm is is a power, OK? I mean, that's the first thing that I know this seems this is going to seem stupid to a few people here, but like all logarithm is is a power. So in other words, if I want to find a logarithm of we talk in shorthand, this is part of the problem because there's sort of an infinite amount of ways to express a logarithm. But, you know, one of the shorthand ways we like is base 10 because that's how we think.
Right. So if the base 10 logarithm is the 10 to the X equals some number. Right. We want to know what X is. Now, a lot of these we can do in our head. Like the base 10 logarithm of 10 is one. The base 10 logarithm of 100 is two. Right. 10 times 10 is 100. You just count. That's right. You just count the zeros. You count the zeros, buddy, and you are done. right base 10 logarithm of 10 to the x 10 to the c or 10 to any number right is that number
right um i don't think i've gotten into toilet seat math yet on this podcast not yet that's like one of my big secrets of how i taught my oldest daughter yes toilet seat math i was good and it really out it was out of like absolute frustration of trying to explain like how do you not know that Like I was trying to explain like terms to my oldest daughter who's now like a math major and has exceeded me. You'll hear her on this podcast eventually.
But I was like OK if I have 2x plus 9x how much do I have And she like I don know I don know what that means I like well if you have two I got so frustrated I like all right if you have two toilet seats and you add nine toilet seats to that what do you have And she like oh well I got 11 toilet seats I like okay well, you know, what if toilet seat was just an avatar for anything, right? Is your variable. And so I was able to use, I like my standard notation for variables for teaching things like that is toilet seats, doodos, and like things that are clearly no one would ever use that
are absurd enough that a child actually kind of knows now. Oh, it could be anything. It could be anything, right? Yes, right. And so I was teaching the thing that resonated with my younger daughter who kind of really she struggles to get like she struggles to get good grades in math, even though she kind of gets it. So she's a lot like me that way. I was so we got to the point where we said the base is the toilet the base toilet seat
log right of I should say the base 10 log of 10 to the toilet seat is the toilet seat I can't believe I'm doing this on this podcast right now but like you know and if you don't like x this is I guess because, you know, that wasn't for me, it wasn't enough. X wasn't enough to, you know, for some people are mature enough that they can use X, Y and Z and do learn algebra.
For me, that was never the case. I needed to go further. I need a more absurd example. So but this is all to say that this notion of a logarithm is nothing more than a power. And so I think maybe it's useful really quick to take one more step down and to say, do we know what PEMDAS is? Do we understand PEMDAS? Please excuse my dear Aunt Sally. Please, yes. For our generation, and you're 50 years younger than me, but still for our generation.
There's a generation. I think if you study, there's a generation that got, please excuse my dear Aunt Sally. but that became way too long for the gen alphas. So now they have PEMDAS. It's the same acronym, P-E-M-D-A-S, and it's just an order. This gives you the order of operations of what you do first in algebra. Starts with parentheses, then exponents, right? Your brain should be going off right now for saying, oh yeah, he's talking about something about exponents
because that's what we're talking about with logarithms. So we've got parentheses, exponents, and we've got multiplication and division, which sit on their own, like those sit on their own level, right? Multiplication and division, it doesn't matter which one you do first. It just matters that... Effectively the same thing. Effectively the same thing. And then you have addition and subtraction, the A and the S, that's also effectively the same thing. As long as you know that multiplication and division is before addition and subtraction, you're good. As long as you know that exponentiation is before multiplication slash division, you're good.
But unfortunately, the acronym and the fun saying doesn't pair exponentiation with its partner called the logarithm. That's right. And so if we just kind of go back and help help that, it's just not it's not great. please excuse, you know, lovely, there's no good, there was, I'm pretty sure people tried to do this
and it never worked out. So we just have to fill this gap in right now and say, if you go and think of PEMDAS and if you think of associate, if you think of addition and subtraction as similar, right, as buddies, twins, little twinsies, right. And then you think of multiplication division as older twins, right? Imagine the horrors of this parent just continuing to have twins, but like, and then you go back and then you go up the level, the big brother, the big sister, you have exponentiation and logarithms. Okay. So they're, they're twins, you know, and you know
what's great about twins? They undo each other. They love to undermine each other, right? So So subtraction undermines addition. Division undermines multiplication. And logarithms undermine exponentiation. They undo it. I'm hoping this enriches this discussion. So what is a logarithm? So every next step, by the way, multiplication is nothing more than repeated addition, right?
Yeah. So multiplication is – let's repeat that. Multiplication is repeated addition. You take addition, you multiply it by a scalar, and that's just how you repeat addition, just like we just said happens on an elliptic curve. You take your generator point, and you – we haven't gotten here yet, but spoiler alert, you're going to do an operation called addition repeatedly, right? How many times? Well, I know, but you don't, right?
Certain amount of times. And I'm actually, you know, I'm so confident that you can't even guess how many times because it's hard to do. It's just hard. Okay. So multiplication is repeated addition. Exponentiation is repeated multiplication. Okay, right? So I'm really just drawing this line. And so there's no special magic or sorcery here. This is just another logical step in how we do arithmetic, right?
Now, what's repeated exponentiation? I don't want to introduce that because it's not relevant and we need to just stick to what – we need to just try to rock this here, right? So we have, once again, very, very base substrate addition that gets undermined by subtraction, okay? Then we have repeated addition called multiplication, which can get undone by division. I think we all get this, right? And so it's one little extra step to say, well, repeated multiplication is exponentiation.
And that gets undone. And when I say undone, remember the conversation about groups where we said every group has an identity element? By undone, it means we do the operation. it's the thing we do to get the identity as the answer. Right? So, and addition has the identity of zero. Multiplication has an identity of one. The question now is what's the identity,
and boy, this is now tightrope walk because I have not thought through this at all. But is there an identity element for exponentiation? I think there is. I think there is too. And I think it's the base that you're raising to a power. Right? So in other words, if I said, what's the, what's the, that, that, and that's why the base matters, right? If I said, what's the base 10 log of a thousand, right?
Then it's the question is what – the logarithm is the thing that would get me back to 10, right? So if I take 1,000 and it's the somethingth root, right? It's the opposite of exponentiation. The opposite of exponentiation is the root, right? We know square roots. Those are nice, right? If you want to take a perfect square and undo it into its root, say, oh, it's 49. Well, there's two answers.
It's plus or minus seven, right? Any one of those two things. But if I'm really trying to get to the base, so base 10, the answer's of 1,000, the answer's three. If I want to get the base two logarithm of the number eight, the answer's three. I'm hoping that was pretty, I'm hoping that caught, right? Because two to the third is eight, right? So I'm asking the question, what's the power? right what's the power that does this that does it and that and the reason we asked that question
right is because that is a very hard thing to do hard enough to protect as much wealth as i'm willing to protect underneath it for we'll just say for a reasonable time on earth. That's right. I'll stop there. No, I think it's a good pause point.
Maybe to even tie back now, we're talking about logs, kind of the asymmetry of them, specifically the discrete log problem and what would be the... Did I actually meet myself? You did.
You said back to the discrete log problem and then we lost you. All that wisdom. all that wisdom is gone forever now yeah that's correct so going through logarithms going through kind of like the asymmetry this really large search space of two to the 256 like what makes it the word discrete log problem we're talking about logarithms in general and how that's the opposite almost the inverse of expense expansion expensation you got it and so this is one of my favorite
topics ever, by the way, is the fact that it's called a discrete log problem because it has double meaning. Yes. And so for a discrete log, I guess what you have to do, you're not able to reasonably ascertain at any point if you're closer or not to the final answer. It's like a continuous function. So it's kind of like a total random space where you're – and this is actually just as a very brief aside and interesting.
I mentioned earlier Bitcoin mining and like proof of work and this asymmetry that's trivial to verify. The difference between proof of work, though, and a public-private key pair is that there's only one real answer for the private key lookup. Whereas in Bitcoin mining, there's a difficulty target where there's actually many possible solutions to the next valid Bitcoin block. For public-private key, there's only an answer.
And so with Bitcoin mining, when you're randomly hashing, you're kind of going along, you are just pulling lotto tickets to find the one with the most leading zeros. But it's not like the search spaces, there's only one number that satisfies that. And that's also part of the unpredictable nature of how often in frequency blocks come in. They come in at a Poisson distribution. Maybe we should talk about that another time. But the idea here, though, is that from each incremental step of trying to undo the public-private key pair, since the function is continuous, there isn't really marginal more information that you're gathering along the way.
Yeah, I mean this is a rich topic in and of itself. But like I think I've talked to you a little bit about this just on the side, trying to really grok it. But something that I think is important that needs to just – we need to just kind of sit with in our journey here. One of the big distinctions in math is whether something is continuous or whether it's discrete. Right. When I say something, I should probably be specific, whether like a sequence of events or whether a set, right, a set of, you know, a set of possible numbers.
Whether a set of possible numbers is continuous or discrete and to try to really kind of drive it home. Just imagine like a circle, right? A circle is clearly a continuous, you know, it's a continuous object, meaning you can draw it without lifting your pencil, right? But it's more than a, it's actually more than a continuous object. It's a very specific type of continuous object. like a square is a continuous object except we have we know how many sides are on a square right
we know we can see the four sides of a square right right we can see the five sides of a pentagon we can see the 10 sides of a decagon right a circle is when the number of sides tends to infinity and you can't and then the number of then the number you the zero it's like There are no sides, right? So it's like a special type of continuous where it's actually convergent, sort of converging on infinite, right?
And that's when, you know, if we think about time and how we observe trials in time, right? We observe them discreetly, right? Then we can see the points. Market data is like that, right? You can see every tick. Or you can say, hey, every millisecond, show me the price of something every millisecond. But you can't say, show me the price of something continuously, even though we all know that time is continuous.
We all know that it's all happening. It happens continuously, but it can only be observed discreetly. Okay, so this is like the just want to kind of like, this is a dichotomy that's really important. and it happens to be important when we talk about the elliptic curve of bitcoin this is so this is why we're spending time on it because it happens to be an important thing um directionality is an important thing as well and when you know i was trained in probability that the object of the game
was to take these discrete trials and to be able to view them continuously and so everyone knows what the law of large numbers is. That's the thing that says, you know, your discrete distribution, if you do it long enough, you can just assume it's continuous. And then you can, then what you can do is the math gets more elegant. That's, I guess it gets more elegant and easy. And when you are a human being doing math, that's what you want. But when you're trying to protect, when you're trying to protect mathematical objects, right,
behind that work, you want the opposite. So you want to take something that's continuous and if you can, express it discreetly because then you're going to make it very ugly and certainly a human being can't do it and it turns out you want to make it so hard that computers can't do it. This goes to the entire field of cryptography is trying to at every point basically shake the Etch-A-Sketch board, make it a discrete problem not a continuous one if it were a continuous problem you'd be able to reasonably discern oh am i closer not to guessing the private key right i'd be like oh maybe i just
need to increase the number by one or two right like you would know you would have like a general like algorithm that you could recursively run to quickly get to the answer and this goes back to It's just the, while we have this curve of the elliptic curve, you don't just go, it's not like the private key is going to be next to the public key for every single point. It's randomly somewhere across that entire curve. And because like each number is like a dot, as opposed, instead of viewing it as the continuous graph view, each number is a point along that curve.
and each incremental step through the generator point throws you out somewhere entirely random. And that happens again and again and again for the amount of times you pick a point. It'll be constantly randomly shuffling around until you get to the final number of points in your generator, which is your private key. Yeah, and it's meant to be hard and ugly and um on purpose and it and every like trial that you try doesn't give you any additional
information about where you are in this process right yeah yeah so um it turns out and so here's the other thing if you guys if you ever really sat and spent time doing arithmetic right um and you worked with powers, you would, even with calculators, you kind of like, oh my God, why is my cat? Well, I have, I have a lot of function to my calculator and they work instantly except for one, which is like solve the power. And it's not like a lot, like, you know, your power,
your calculator probably is a base 10 log and a natural log that does that very fast. But my calculator, my HP 12 C is a financial calculator. And a lot of times you want to know, like you have the, you have a compound interest rate, like one plus I to a certain power. And You want to solve for the power that gives you like you have an annuity. You have a stream of payments for the next 50 years. And you say, well, find me the N that is actually, you know, that solves the problem. And you notice the calculator takes a long time.
So this is something that happened at a fairly young age for me, right? It's like, oh, it takes quite a long time to calculate a power, even a calculator that does everything else at just absolute rocket speeds, right? so we start to ask these questions like what is it that makes this problem hard right solving finding an exponent and discreteness right discreteness is actually part of what makes it hard um i want to try to like really nail like land this point i don't feel like i have but like
what we call analytical functions you know so like if you had a circle x squared plus y squared equals one and you were given like um some you were given something some some answer that tells you something about the points on that curve like it probably wouldn't be hard to just solve for you can solve the equation literally solve the equation for what x and y are without having to brute force and you know what discreetness does is it makes you have it make it turns it into a
trial and error problem. It's a problem you can't solve algebraically and you have to do trial and error. And so removing the continuity and reducing it to discreteness is really one of the things that actually does make it hard. You're still on mute again. Sorry, I'm trying to be a good audio engineer. I need a hand signal. I need a hand signal. This is an interesting thing too in that the battle-testedness of Bitcoin's discrete log problem
is something that is inferred. No one's written a mathematical proof of being able to show that it's P equal NP hard. And it's just something that very publicly in the open for decades people have tried to break this and no one's been able to. Proof by come and take it. Yeah. it's pure applied pragmatic we now have a multi dollar asset running this let alone decades before that people were using this cryptography So the ultimate what been able to see at this point is that the best people have been able to do is the square root of N as we talked about earlier which is not cutting it in half
It's taking the square root, right? So it's, you know, if you're talking about expensiation and, you know, taking the square root as a form of an exponent, in a way, to the one-half power, it still is nowhere near good enough to be able to make something that's practically insolvable or reversible in our lifetimes. This as a – we don't have to go deep into it, but just a little sprinkle. This is where the quantum stuff starts breaking assumptions is the idea that you could actually begin to infer information rather than having no information at each incremental stuff.
Let me give a quick example of why the square root thing actually halves the solution space. you know um just if you wanted to know what the square root of 100 is and you you know you're five years old you haven't been taught the square root of 100 is 10 so you start plugging numbers in on your calculator what's the square root of 100 you might you know you might to yourself think man i have to take i have to try every number right i'm going to do one squared two squared three squared
four squared it's just that the thing is after you hit 10 and you start going above 100 you start knowing, okay, well, okay, clearly, okay, I have to go up to 10. Then you might, there's a property where you might, where you realize, okay, I might've stepped in shit here because I'm not ready to land this plane. Just go for it. At some point, I actually, I'm kind of stuck.
I really screwed up. I didn't think this through. I'm thinking of the sieve of Aristocanese, if you're familiar with that in terms of how to, like, say, find all the prime numbers. Say you want to find all the prime numbers between 0 and 100, right? You really, you know, I think I'm just making it worse. i really want i'm going to pull the ripcord here and tap out i'm sorry this is going to happen
episode six this is like the first time it happens you're on you're on mute god damn it i need you here man i'm listening i'm listening um the steve arisosthenes is you know way of being able to find prime numbers by going through all the competent metrics uh up to a given limit it's like a process of elimination way of being able to do primes and what i would say is essentially what the idea of what a quantum computer could do is that because it's basically further able to the idea at the highest level i'm
not a quantum expert but it's the idea that it actually can parallelize and actually further recursively undo the expense dentiation you do by using the generator point in a way that it's not going to linearly, internally in binary space, like, check all the guesses and be able to further get to the final answer. It's something that in the quantum space at a high level,
I mean, when it comes up in Bitcoin, I actually sit in a space where I think that there should be time and effort put into this stuff and thinking about what this looks like. If this is an intergenerational project and in the next 10 years, there's meaningful breakthroughs, I think it's important for Bitcoin to be well ahead of that. But you have to figure out a new way of doing a signing algorithm because you basically have to throw out all of the elliptic curve cryptography into the garbage. And this goes into something we mentioned previously that quantum computers are inherently better at attacking public private key cryptography than they are,
say, dealing with a hash function. it's a totally different algorithm which I'll just call it Shor's algorithm is the ability to kind of like accelerate the computation for public private key pairs hypothetically on computer and Grover's algorithm is being able to reverse engineer a hash and a pre-image and because they have different fundamental properties the idea is that one way is by going to a hash based algorithm you'd be able to stay quantum proof this is also why in bitcoin today if you deposit bitcoin to an address and it's not taproot and
it's not the original paid a public key any of the other ones that have hashed addresses the actual data that sits on the blockchain is a hash of a public key or a hash of a script and because it's just a hash it's not something that a quantum computer would be able to reverse engineer and this goes into one last point about this which between a long range and a short range quantum attack. A long range quantum attack is I have years or I have lots of heads up time to be able to look at a public key and grind away and find the private key. A short range attack is I have a very small window to be able to reverse engineer the public private key. And the way this
intersects with Bitcoin is that if you have an address that you haven't spent from before, you've never exposed the public key to the blockchain, broadcast and send, there's roughly like a 10-ish minute window where someone could in theory take a quantum computer, attack your public key, find your private key and try and double spend you. That's a way harder problem because it takes something that's in the domain of five years to try and guess it because it's sitting there. And while I think that it's an important thing that Bitcoin development should be able to do, a quantum computer hasn't been able to factor
the number 21 on its own yet without a lot of accelerated help embedded learnings in the programs themselves that are kind of baking in the answer. So I kind of duly caution that I think this is important existential for Bitcoin to be resolved in a timely manner over the next five years to have a plan. But it's not something that I think tomorrow is going to bring Bitcoin. And I totally agree. I totally agree with that. I am personally going to – I'm going to unfortunately for myself, but I am going to ramp up my ability to understand and explain this.
I, I, it's very hard to explain why you're not worried about it without really, really being, um, strong in the details. So if you, it's the, the price of being able to explain it is the time spent understanding it, even though you kind of think it's a waste of time because it's not a real threat, but it's just more of, um, I have created a textbook where, um, and this came at, I feel like I had the idea for this after our first episode, but I finally just did it.
And it basically said, take me from the basic arithmetic to understanding Shor's algorithm and Grover's algorithm. And what it ended up doing was it didn't just create, you know, it didn't just take me through the math. It actually sort of understood the various, everything you just said and what that means for Bitcoin. And so it's not a yes or no. It's quantum dangerous. It's like there's a stack of low-hanging fruit that goes up to high-hanging fruit.
And it's probably worthwhile to understand that stack, right? It's probably worthwhile to understand what makes Satoshi's coins vulnerable in a way that what makes, you know, if you're behind Taproot and you've never exposed your public key. Like it's good to understand these things. and um so i plan to go on this journey with this textbook i created and um be able to hopefully explain at least you know some in some fashion try to get us through the way i was um the way i
explained this to somebody they were asking me like i was asked to be on a panel about quantum and then they were like can you actually do that and i said to be honest i'm a three out of ten on this. Okay. But the people who are talking about quantum are like a five out of 10 and the ones think they're tens. And I can take the ones, I can tell, I can show the ones what a five is. And then the guy was like, you can't explain anything, can you? You're really bad at this.
But I mean, I thought that was a pretty solid explanation for what the, for, you know, what the space is here right no for sure and so but all this i i'm it's fine talking about this here because it you know at some point we're doing you know we're hurting our brains to try to understand something it's good to be able to say well why the hell am i doing this it's good to you know as much as i will generally shit on that notion i mean i think in general we should be willing to learn without always having to be like well why am i learning this why am i learning this is the
reason why math is censored it's censored in our own minds in our own sense of time but to the extent you can motivate it we should and that's why i think it's it's okay when we talk about discrete logarithm problem and you know there's people that are just going to be like well why would i bother learning this if it's going to be essentially by the time i'm done learning it by the time my brain understands it it's going to be destroyed by a quantum computer right and i would just say and then oh so what i'm gonna and then once i get to that point i'm gonna have to now
learn what a quantum computer does and doesn't do um and i'd say you know yeah it's all this is if if you're all in like uh rob and i are yeah you better kind of better do it you know if you're a tourist you're fully in it if you're fully in it man there's really no other way i threw it i mean the one thing i'll say about coblets he's all in and his thing he's all in with whatever he's doing and he's going to pursue that rob and i are all in here on bitcoin and we're gonna
we're gonna tell you guys we're gonna hopefully pave the path for those who really feel like they have to understand this at a basic level and um you know do you have to no but you probably we probably should and i think it's again gonna continue we're gonna continue to do this so now my, my, what's the second meaning? I love the discrete log name because discrete, we talked about discrete meaning like fixed in time, not continuous. And then I love that discrete also
means secret, you know, like that to me, the, that's, that's, that's of the God world right there of giving us this thing that means both of those things, you know, and it's the discreteness that makes it a secret. Right. Right. The, I'm looking, I'm looking through this. We're at a dangerous time of the episode. Yeah. I don't want to overshoot into a clearing and then leave everyone to go figure it out.
For, I'm flipping through the study guide right now. I might cut five minutes out of where I stepped in shit. What was that? I might cut the five minutes out where I stepped in shit. It wasn't that bad. Looking through the study guide here, the curve over the reels, the signature. I know you did a little bit of work, too, on Bitcoin transactions in general. Is there something you want to take a little detour on as it relates to Bitcoin transactions themselves?
We could always go back to our buddy, the nonces, the generating of a signature. We've gone over and creating a private key. We've done the public key multiple previously. We can do that again for emphasis. I think let's save those. So I feel like when – what we've been doing in arithmetic, we mention these things that are at the end because – to motivate us to say this is the line we're – this is the point we're walking to on this line. I don't know if I want to get too deep into the protocol stuff.
I think we call it out so that we say this is why we're learning what a logarithm is. Right. Right. So maybe if we're getting gun shy about sort of what we think is the last arithmetic. I don't know. I think we could do it. I think we could do it. I think we should do it. Okay. So there's the last – I feel like the last piece of arithmetic that we need here is – unfortunately it's a little it's a little you know it's a little it's a little hairy but it's
not that hairy but it's something so in mod you know we talked let's go back to modular modular arithmetic okay something i don't think we really discussed that deeply is that um the properties of modular arithmetic meaning so like if i have nine mod seven then that equals two right and if i have um 10 mod 7 and that equals 3 that 9 plus 10 is always going to equal
2 plus 3 i hate that i had to say this so i'm going to try to really draw this line 9 plus 10 9 being 2 right in mod 7 10 being 3 mod 7 that sum is always going to be 5 so in other words 9 plus 10 is always going to be interchangeable with 2 plus 3 always, always, always, always. Right. And I can say, I know 19 mod seven, God, please God tell me it's five. Right. It is so like under addition,
it's like what we're trying to say here is this is back to like the abstractness and the groups and the structure, but like the operation is always preserved. No matter what, no matter which version I'm doing. Right. If I'm doing the regular arithmetic or if I'm doing, you know, But no matter what order I'm doing it in, if I take the mod first or if I wait till the end to take the modulus, it's always going to get to the same answer. And that's true of addition. It's true of subtraction. It's true of multiplication.
So this is something that I've spent probably months in abstract algebra textbooks and number theory textbooks proving. But it's all very – it's just good to – you want to know that these things are all true in modular arithmetic. might seem like an unnecessary thing to say, but you can always count on the properties. This operation, this idea of using a modulus is going to work. It's going to work no matter what we're doing. Okay. And so things get a little more advanced when we're talking about
squares. So the first question is why do we care if something is a square or not? And I should say this statement, we now also care that a number is a square. Why? And that is because of what the Bitcoin elliptic curve equation is. It says y squared equals something. Right? It equals x cubed plus 7 but it really is just a matter of this. y squared equals something. So that thing, that point on your curve is a square. Okay.
That's just really, by definition, it is a square. Okay. Now, why does that matter? Okay. Now it's not a, it's not a geometric square. It's a number that can be, that can be gotten by taking a number multiplied by itself in the in the modulus in the modular space modulo um in bitcoin's case modulo two to the 256 minus two to the 32 minus 977 right so the point the answer is is a square
that that so that's a little this is why we were a little gun shy of jumping right into this because it's like that you know i don't feel great about how this is coming we're about to do an ensemble of combining a bunch of concepts we've gone up to up to this point from modular arithmetic world from groups from the equation of y squared equals x cubed plus seven which is the elliptic curve function we're about to smash all of those together and i think the first thing to start with with your point about y squares are important is that very specifically by definition of the way
the elliptic curve algorithm is is y squared equals x cubed plus seven so that means that it will must necessarily always be a square for it to satisfy the elliptic curve function. Now, this is where we're dancing around the last leap here of a concept. Is it important, by the way, is it helpful for us to just know it's a square versus having to know how to... I don't think we're ever really asked to take the square root of anything.
We just have to know how to know a number is a perfect square and on our curve. That distinction. So that's part of why it's helpful and it's part of why – that's part of the power of elliptic curve ECDSA. Yes. Right? Or sorry, ECDLP I should say. Yes. DLP meaning discrete log problem. So what we're solving is the elliptic curve discrete log problem for Bitcoin. Right. And what we need to know, the ultimate point of this is if the point is on the curve or not.
If the number is a square on the curve, if not, then it's not on the curve. So like what I want to just illustrate real quick is definitely got to make a video for this. What I want to illustrate is just how, okay, on our number system that we love using, like the reels or the, you know, really we'll call it the integers, right? We have a pretty good idea for, we know that not all numbers are perfect squares, right? I'm going to say a bunch of obvious things. We know what they are, 1, 4, 9, 16, 25, 36, 49, et cetera, right?
We know that not all numbers are perfect squares. Only a certain subset of our numbers are perfect squares, right? And so now I'm going to go back and bring to bear something we talked about in the past, which is the fact that a finite field modulo P is a different number system, okay? remember that two numbers can multiply to each other to equal one we don't do division to to get one or to do inverses we do multiplications to get inverses right so
and remember like if if um if the mod is five right two is the inverse of three because two times three is equals six i e one mod five right so like in the so now we're in this number system that's akin to the integers, but it's called the finite field modulo p. Okay, right? And in this number system, it's finding a square is, you would say, is probably similar, right?
Not all your numbers are perfect squares. And just so by way of an example, mod 7, right? This I did do this morning, so I'm ready to hit you with it. it, but you may want to like, you may want to pause at this point, get a pen and paper and do this with me. It's not hard. One squared equals one, two squared equals four. So those so far are the easy ones because mod seven, you don't have to, we haven't exceeded the modulus yet, right? Three squared equals nine, which mod seven is two. Okay. So now I have, I have one,
4 and 2 is perfect squares in mod 7 space So now I going to move on I have three more to do Four squared which is 16 That two also So now I just okay so two is a perfect that no new information I already knew I already knew two was a perfect square, but you know what? I actually, you know, in the, in the reels, perfect square has two solutions, right? Well, this finite field also has two solutions,
right so to the square root of two in the finite field modulo seven it's going to be three and four both of those numbers when squared give you the answer to okay um moving on to five five squared equals four so which was two squared also so now two and five are the numbers in the finite field that give you four when you square them and finally six squared equals one and so one and six are now the two answers say what what two numbers so instead we're not doing plus or
minus anymore like we did in the real space right we're doing the two numbers that multiply to each you know there are two distinct numbers that do this there's still two answers right which is cool right it's like oh algebra still says the same stuff right there's still two answers to a square root. So just again, one, two, and four are now the perfect squares in this system, which sorry as an aside, if this can confuse anybody, but it's too cool not to mention that they
add up to seven. You won't see this again. You won't see it with another modulus. It's just, okay, so one, two, but it's a good way to remember one, two, and four are your perfect squares in modulo 7. So if the Bitcoin elliptic curve was modulo 7, right, you would want to make sure that 1, 2, and 4 were the numbers on your, were the points on your curve and not 2, 5, and 6.
Right? Because you got fake, you got something fake. Yeah, not on the curve. And it's roughly half when you go across the full actual Bitcoin. curve, roughly half the points along the curve have perfect squares, no other half. Well, actually, it's not that I'm going to correct you. I'm going to enhance your answer. It's whatever your prime is. So if you remember, a finite field modulo P has P minus, well, has P minus one elements, right? So modulo seven has six elements. So it is half of six.
So it's P minus 1 over – it is half of P minus 1. It's exactly – it's always the answer. And P in this case is the 2 to the 256 minus 2 to the 232 minus 2 to the 16 minus 977. So basically a massive number. And by the way, it has to be half because of what I just said. Because two numbers always map into one square. Right, right. So it's got to be half. And you can just even look at the curve and just think about that too. that every x point along the curve has a lower half and an upper half above and below the number one.
We call that subjective. We call it, you know, the one also called subjective in algebra, which some people listening may appreciate that I said that. Most people didn't. And so if you think about this too, right, a point on a curve, you have an x and a y coordinate, right? Just as one thing, just to kind of call out. Rob is drawing that with his hands, by the way. Yes, I am. I'm drawing the axi, right? So you have a grid of, you know, just think about if you've ever been in like a math class with like an xy axis in the grid this curve along any given x point will be two y points which actually you're actually able to
infer basically a you're able to compress the actual public key at any point if i just give you x and then i give you one extra byte for whether it's the positive or the negative side of the top or the bottom part of the graph of the electric curve. With the exception of Taproot, Taproot, this is called remove the parity bit. You're able to, in pre-Taproot, it's a 33-byte key, 32 bytes for your X-coordinate,
and then one byte for positive or negative. The way it works in Taproot is you just have the 32 bytes, and then there's an assumption that's made. and it always chooses an even value for one. Interesting. Yes. Taproot really screwed some things up. That's why everybody hates it, right? Well, it's funny because as an aside for Bitcoin protocol development, this was like a version of byte pinching where we said, oh, we can save one byte across all Taproot transactions for better scaling
because we can just infer that. And it turns out for designing more advanced covenant-like applications, sometimes you want the other point of the key to do stuff for like unordered exits. And we should have reared it on at some point. You can go deeper into this. One of the things where we wanted to save a byte because that would help with scaling. It's less data. But it ended up having way worse trade-offs. I went into a very immature space when you said byte-pinching.
I'm sorry. I thought about Marv Albert. Anyhow, you know, this is like my defense mechanism because this is how I feel like to anesthetize you guys a little bit this very difficult conversation. But the ability to know if something is a square is actually, if you do enough math, if you tackle it hard enough, okay,
And it's very tackleable. But if you do it, there's a very then there becomes Euler basically, like as Euler and Gauss gave very elegant ways to, you know, for computers that didn't exist yet to determine whether or not something is a is a perfect square or not. And, you know, Koblis' book is pretty good, but I think you want to go to elementary number theory textbooks. This is like the final boss of the easy parts of a number theory textbook.
And it's also the final boss of the easy parts of our explanation. But if you really want to grok this, you're going to have to do some problems. You're going to have to sit there. And the nice thing is you can sit and do what I just did, mod 7, do it mod 11. It ends up that, like, I just found out this fun fact today, but it ends up in determining a quadratic residue. The algorithm needs to know if your prime is either 1 mod 4 or 3 mod 4.
So what does that mean? 5 is 1 mod 4. Every prime number is either 1 mod 4 or 3 mod 4. Every odd number is 1 mod 4, right? Every odd number when divided by 4 is going to be either 1 or 3, okay? Right? So just slow that down. So, you know, 5, 13, 17, those are 1 mod 4. 3, obviously, 7, 11, these are 3 mod 4s.
And they behave differently in this algorithm. And it just, it turns out that the numbers used in Bitcoin are all three mod four. I found this out today. That is, and that blew my mind. And I think it's another property that makes, yeah, just probably either makes the computation work faster in the way we want. That you're on mute. God, how long, how long have you been talking, dude? No, no, I just, I literally just started. I mean, dude, God exists to give me a podcast partners that just talk on mute so that I can just talk forever.
That's right. That's right. No, we need you, man. No, no. This is what I was going to say. Like to this point specifically, like it's – the shortcut that's allowed here is that you're able to do a square root in just one single exponentiation, right? You're just able to quickly – and you can think about it that way. like the square root of something is taking it to the one half power. This makes it really short and straightforward to be able to do this like
arithmetic. Right. The, as a, as a recap, like, like, cause you, you said the term, but we didn't talk about it more, but like a quadratic residue, which is kind of like the last thing that we're putting forward in this episode to kind of close out this section is that, you know, This inversion we're talking about that I mentioned earlier, like if it's on the point or not, requires it being a quadratic radius. It requires it being a perfect square.
And being able to reduce that into a quick one-step calculation is really important for being able to... You just square and multiply the number, and we can do that pretty quickly from the math that we've already done. I'm now starting to crash and burn a little bit here from where I was going to go. So in number theory, there's something called the Legendre symbol. And it's just you got to give it to Gauss again. This guy is just all over everything we're able to do here.
But he's able to abstract all of essentially what we just talked about and all of that pain and trying to figure out what number multiplies itself to get us another number into a symbol with a bunch of rules. that and an algorithm so i'm not sure where you were going there but like this notion of a quad we called it a sorry we called it a quadratic residue and i don't want jargon to get confusing quadratic is always like a square quadratic equation is something that x squared plus ax squared plus bx
plus c that's quadratic equation so when we talk about quadratics we're talking about square roots The word residue is always from modular arithmetic, the remainder. So when we talk about quadratic residues, we're talking about square roots specifically in modular arithmetic that turn out to always be whole numbers, which is awesome. And that is, it's not like super necessary. It's not super necessary.
But I think in order to have a rich conversation here, it's important not to leave out that the point on the elliptic curve is a square by definition. And we do need to – there's richness here in studying it. So if you've gotten this far, good on you. Yeah. um i'm thinking through the on where to take it from here but this whole quadratic residue concept
um quick heuristic of making sure your point's on the curve like i mentioned earlier when you're putting your compressed public key being able to quickly just get the exact point because you need the exact point if you're going to verify the public key against a signature so this is just another like mathematical shortcut and computational shortcut that allows the whole engine to run smoothly. Yeah. And I think, I think what we're trying to do is create a little list in our heads of which I've mentioned this before, but I love this construct. What should we have asked the
manager about when we were at the Bitcoin store buying our Bitcoin? You know, we definitely should have asked about inverses and we definitely should have asked is about is it a square does it exist on my curve yeah oh this is this is really important too because everyone is using this if you've ever spent to receive bitcoin you're running software that's doing this stuff that we're talking about and if you've ever if you have bitcoin on the network and you just see an address how do you know that address belongs to you right what you can do is you could take your secret you could take your secret key you could
map that to a public key you could then look at that public key and then you could look and say okay is this tapper is this seglet whatever and you could say okay well here's my key let me compress it and then let me hash it and then do the base 58 encoding and that matchy matches my address right and if you've held bitcoin for a long time you've never thought through like those steps that's something that like you said when when you say go to the bitcoin store anytime you go to the bitcoin blockchain and you receive money or send money you're going to the
bitcoin store you're doing this stuff so like you want to find out before you deposit money that my point is actually on the curve you don't want to find out after the fact because there's no do-overs no reviews right well that's the whole thing and so this is i've been locked in on this very subject. This may be what we close on, but I've been locked in on... Maybe it's a little provocative and maybe I'm being a little overbearing about it, but I don't know if there's a person who's ever gone to an exchange
and knew they were getting real Bitcoin until after the fact it hit their address. Would I be wrong about that? I don't think people do now because it's not real until it's in your address. And with that, I started thinking, you know what, if there was an exchange that did this proof and charged me, I would pay. I would pay a little more clearly if exchange did this proof for me and put it on my basically essentially put it on my put it on my address before releasing it or some.
You know, I'm talking to the man probably who can actually figure this out. I actually had to do this easy. You mean one step beyond like proof of reserves. You're talking about the transaction in flight showing you that they have the Bitcoin and that they're going to send it to you. And it's real that it's actually like that. I don't have to Karen, the manager. It's right about all of the things we've been talking about in the math podcast. But what I'm trying to really point out and illustrate is that people have like these deep sovereignty stacks where they have their nodes and their AirGraph wallets and they have their practices and their OPSEC.
And all of these things are super important, yet to me it breaks down at the point of sale completely. And there's a big missing – there's just a big missing there. There's a lot of trust. Like all, it's almost like all of our trust is going to the exchange when we buy, when you buy the Bitcoin and there's almost no exceptions to this. You know, I think peer to peer probably lends itself a little bit more. Well, it makes more sense to trust a peer. We'll just put it that way because you, you have some accountability and you, you know,
it makes a little more sense to place trust in somebody, you know, but also a peer can, you know, there's the hodl hodl type stuff. There's the multi-sig escrow stuff you could do. So but when you – you know how many people go to an exchange and say like I want to – I'm ready to put $2 million into Bitcoin. Let's do this. And then just by the stroke of luck, it hits their address. They didn't think about that gap, right? They should have had a briefcase with a handcuff on it tied to their wrist before they handed money over, right?
Right, right. So like to me, this is like a massive thing. I'm actually going to be basing certain presentations around this concept. And I think I'm going to get a lot of hate for it. But I think it's super important to point this out. Yeah, I think the way I would think about it, the leader in this would be River with their proof of reserves. They publicly say we hold 10,000 Bitcoin in custody of customers. And they actually do this really cool Merkle tree proof that shows that for every liability on their books, there is Bitcoin in an address.
We need to do an episode on this. And I think it's important because it's, again, on general proof of reserves and also like what River does and where – again, so they close maybe a portion of the gap. So where does it end and where do we – where does the trust happen? Yeah, we can do that. River also fully open-sourced the code that does their proof of reserves. They forked another open-source code base. And that's kind of the point Alex always makes is that if you're in exchange, this isn't rocket science.
It's not super complicated. You just need to have a map of your liabilities and tie it to a Bitcoin address or addresses to show that it's all matched. So pre-images are a great solution to the problem. And like I said, as a buyer, I would easily pay a little bit more to know, right? Especially if the standard is good luck, buddy. Right. Very much. Very, very much. Yeah. I think we easily could do that. on uh we also do a little bit of merkle trees just sneak sit in there although it's not super
math heavy more just comp side but no i love i i have a i have at least one full discussion on merkle trees in me excellent i think we can do that at least one all right cool anything else you want to close it out i think we've closed it out for the day we we got through the residuals and proving that something's a perfect square. I think we've done a really good job on squeezing this lemon through this section.
I'm not sure what more we have, but you and I can take it offline and figure out where to go next from here. Yeah, it's a good analogy, squeezing a lemon. Yeah, you got any cuts on your hands, it's going to hurt. But then you're going to take a little ice, a little sugar, make some lemonade. It's all going to be better. So the next phase of I think what we'll be doing is it looks like we get three types of podcast episodes. We got the ones that I just kind of do myself. Yeah. And we got the ones then the two types that you and I will be doing is one will be just be continuing on here.
But more now in the more focused on Bitcoin. Right. More focused on now. what do we, we're going to, we're going to assume now you guys have beefed up on all this arithmetic and you know why we did it. Now we're going to talk kind of about signatures, elliptical transactions, stuff like that. And then the other one is, you know, we do intend to have some friends join us. Yes. As soon as maybe even end of next week,
we'll see if we can get some people. And then also through April, I think we're going to get ourselves busy. I think in April, I have three straight scheduled weeks where I'm going to be in the same room with you. Interesting. You're right. First week, second week, and then the third week, oh, Vegas? Yeah. Man, it could be wild. It could be wild. So I got my roadcaster ready to hit the road, ready to do rips. Let's do it.
And then, you know, we're going to be in the same room. Now, you know, we're going to be in the vicinity of, I think, some people that could really be good now. I think Opinx is going to be a great one for us to do some breakout sessions. Yep. And I already put the application in with Charlie. So, look, we'll be good to go there. You know, the fact that we do audio only makes it very easy. Very straightforward. Yeah. Yep. All right. Awesome. Awesome. Sounds good. Guys, take your pencils out.
I'm looking for catchphrases until close to subject. Like Tom Malongo, keep your stick on the ice. Take your pencils out. Beef up because we're about to level up here. Okay, guys? That's right. All right. Awesome. See you. See you.
In this episode, we picked back up on our red-team tour of Bitcoin cryptography and tried to make sense of the last few weeks of fast-moving math news. We unpacked why the recent excitement around the exponential time...
OpenAI just dropped roughly 300 math papers with Lean proofs, mathematicians are crashing out, and the vague-posting has started: "math is breaking, so cryptography is next." Brian and Rob Hamilton refuse to hand-wave....
Magic Internet Math: https://www.magicinternetmath.com/ Shout out to https://x.com/uncleJim21 for the Alice in Wonderland story and the following rebuke of Lewis Carroll: https://www.youtube.com/shorts/33FYXpEWgyA This...
We’re back because math keeps refusing to stay in the classroom. In this episode, I unpack two very different kinds of “math pop culture.” First, we revisit entropy, seed generation, and wallet security through a...
Magic Internet Math is back. After the summer that set the Bitcoin world on fire - the Cold Card entropy disaster - Brian and Rob Hamilton (AnchorWatch) reunite for a two-hour deep dive on the event Rob spent three...