r/ProgrammerHumor • • Oct 23 '26 • Bravo 2 Popcorn 1

Meme privateKey

Post image
26k Upvotes

240 comments sorted by

View all comments

Show parent comment

461

u/cauchy37 Oct 23 '26 edited Oct 24 '26 • Diamonds are Forever This Bravo Heartwarming Popcorn

Elliptic Curves over a finite field are fun.

To simplify it, imagine that someone draws you some finite squiggly line. You then put a point on it, and then another, and another. Until it's so dense, that these points look like that line in the first place.

You now choose a random point, call it P. Imagine that "adding P to P" points to another, different point, 2P. And as you keep on adding, you jump from a point to another point, never hitting the same starting point again. Until you do, and from there on you jump to exactly the same points you previously jumped to.

It's a cycle. The number of points on that curve, and the number of times you have to add P to itself are equal.

Adding P to P is simple. But imagine I'm choosing another point, Q. And I'm asking, how many times do I have to add P together so that it returns Q?

This is the basis for the security behind elliptic curve cryptography. It's extremely difficult to find such k, that k*P=Q. But it's super easy to calculate Q once you know k and P. Iterating over all possible values of k will take longer till the heat death of the Sun, so that's out.

UNLESS YOUR K IS FUCKING 4

71

u/andrewsmd87 Oct 24 '26

Yes but what about 1234?

This was a great explanation, thanks

36

u/sticky_neutrino Oct 24 '26

that's the kind of k that an idiot uses on his luggage

17

u/Clueguy Oct 24 '26

12345, amazing! That’s the same combination on my luggage

8

u/Silent-Suspect1062 Oct 24 '26

I always use 54321..

6

u/Mysterious_Way8941 Oct 24 '26

Samsonite! I was way off.

0

u/[deleted] Oct 23 '26

[deleted] — view deleted comment

31

u/CreationBlues Oct 23 '26

Ah, so you’re saying that instead of taking more than 10106 years to complete, it’ll only take about more than 10105 years to complete?

3

u/FugitivePlatypus Oct 23 '26

There is no way to speed it up enough

6

u/ThellraAK Oct 24 '26

Didn't they break secp256k1 with 256 video cards in 13 days 6 years ago?

10

u/BazzaJH Oct 24 '26

No, that was a puzzle with a very limited range. To "break secp256k1" in any real sense, what they did in 13 days, you would have to run for over a quintillion years instead.