r/ProgrammerHumor • • Oct 23 '26

Meme privateKey

Post image
26k Upvotes

241 comments sorted by

2.7k

u/Paul_Robert_ Oct 23 '26 • Bravo

ssh-keygen -lv -f ./ultra_secret_key

+--[ECDSA 384]----+
|                 |
|                 |
|                 |
|                 |
|        4        |
|                 |
|                 |
|                 |
|                 |
+-----------------+

163

u/Alhoshka Oct 24 '26 • Heartwarming Bravo

I was about to stick my foot in my mouth by saying 4 is not a prime number. But I did a double-take and, yes, 4 is a perfectly valid EC key. It's only the modulus and the generator's order that need to be prime. Not only that, but restricting the possible values to primes would greatly reduce the field and thus lessen security.

I've had that false notion lingering in my head for years, and you fixed it with a single shitpost.

405

u/GRex2595 Oct 23 '26

How can you even make a cert with this key? And what does that cert look like?

373

u/Paul_Robert_ Oct 23 '26

So you generate a public key using said private key. In this case, it used elliptic curve cryptography. Here, you take a base point that lies on a elliptic curve, multiply it by your private key, which will generate a new point on the curve. The base point and specific curve are defined by the standard used, in this case NIST P-384.

Because of this, the certificate looked like any other certificate. The certificate itself is just a base64 encoding of a bunch of stuff like what type of encryption is used, who issued it, time period it is valid for, etc. And of course the public key.

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

→ More replies (1)

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.

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

30

u/GRex2595 Oct 23 '26

So are the public keys fixed-length? Because if this was RSA, I believe you would have to have a pretty short public key to get that as your private key.

111

u/SweatyPlayerOne Oct 23 '26

Yes, in this case (P-384) we’re talking about a 384-bit private key and a 384-bit public key. The 384-bit private key is supposed to be randomly generated by the client and then the 384-bit public key is generated based on the private key. The incident in question was literally the number 4 being used as the 384-bit private key:

000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000100

85

u/fury420 Oct 23 '26

and not just the number 4, there were a bunch of keys that were just 1 to 3 digit numbers.

Almost like someone misunderstood what 384-bit meant and just used numbers from 1-384

45

u/Saedeas Oct 23 '26

They're all below 255. I think they just truncated everything but one byte.

15

u/Mechakoopa Oct 23 '26

They only randomised the first byte of their byte array.

8

u/bloodfist Oct 23 '26

I might have misunderstood but I believe that after a series of 4s, there came 5, 6, 7, etc. Some bug caused it to overflow, get stuck on 4, and then start iterating from there. Something like that.

8

u/flojoho Oct 23 '26

must've been unlucky RNG

24

u/immortal_lurker Oct 23 '26

Nope. This was incompetence, they generated the key wrong. I don't know how. But it was.

Think of it this way.

Suppose the key was a proper key, and someone was guessing 100 digit numbers in no particular pattern. On the 4th try, they get it right. In that scenario, is there anything at all that would convince you they didn't know the key beforehand?

11

u/beatlemaniac007 Oct 23 '26

The entire boiled down version is that someone used testing artifacts in production by mistake. The real keys and the test keys were similarly named and someone didn't pay attention and fucked up. The string of events that led to it was a comedy of errors, but it wasn't some weird math...it was just using test stuff in production by mistake.

→ More replies (1)

16

u/dedservice Oct 23 '26

They generated a key between 1 and 384 instead of 1 and 2384

→ More replies (2)

7

u/visor841 Oct 23 '26

IIRC these were test keys (still generated wrong) that were unknowingly pushed to prod.

→ More replies (1)

4

u/GRex2595 Oct 23 '26

That's a funny-looking key.

4

u/Paul_Robert_ Oct 23 '26

Well the public key is represented as its x-y coordinates modulo p, where p is prime number that's 384 bits long. The generator point coordinates are also 384 bits long each, so even when you multiply by a small number like 4, the result looks like a proper public key.

edit: oops forgot to mention that they are fixed length 😅

5

u/GRex2595 Oct 23 '26

The private key should have been super obvious, though. I'm trying to figure out how bad tou have to mess up to get 4 and not notice.

3

u/platinummyr Oct 23 '26

You have to not be paying attention. But once the public key is made, it will look random so you won't be able to tell easily

→ More replies (2)
→ More replies (2)

39

u/taybul Oct 23 '26

Input

my super secret message

Cert Key

4

Encrypted secure text

my super secret messaga

11

u/ExpertConsideration8 Oct 23 '26

Honestly.. this could have been quite effective.. who would ever think to try a single digit integer as the key?

43

u/Fantastic-Bloop Oct 23 '26

Every brute-force algorithm ever lol

9

u/ExpertConsideration8 Oct 23 '26

You'd think they'd focus on full length combinations and skip anything below that... But yeah, probably not

20

u/hrlft Oct 23 '26

Considering that checking full length ones is a literal waste of time, that will never ever work out. Focusing on small ones, or other outliers is the only productive approach.

24

u/YeOldeMemeShoppe Oct 23 '26

When the elliptic curve is a line…

14

u/UnkarsThug Oct 23 '26 • Heartwarming

I prefer:

00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000004

14

u/Waiting4Reccession Oct 23 '26

Why do you have to shh🤫 the keygen?

11

u/CYB3R_GAMER_125 Oct 23 '26

ssh-keygen -lv -f ./ultra_secret_key

+--[ECDSA 384]----+
|                 |
|                 |
|                 |
|                 |
|ㅤㅤ4ㅤㅤ  |
|                 |
|                 |
|                 |
|                 |
+-----------------+

I'm sorry my OCD forced me to align that misaligned character

66

u/Paul_Robert_ Oct 23 '26

On my phone, this renders the | in the middle of the box xD

26

u/undermark5 Oct 23 '26

Ya, for me the original is aligned (not sure if edited) and this one is misaligned.

4

u/CYB3R_GAMER_125 Oct 23 '26

That's weird, it's aligned on mine lol

4

u/Paul_Robert_ Oct 23 '26

It do be like that sometimes :(

4

u/stilldebugging Oct 23 '26

Haha, omg you made it worse. Did you use tab?

848

u/breesyroux Oct 23 '26

I'm clearly out of the loop. Why do I keep seeing variations of this joke everywhere?

1.4k

u/SpaceCore0352 Oct 23 '26

TLS certificates are special files that servers use to prove they really exist at the IP address they say they do (otherwise you get coffee shop hackers intercepting messages and pretending to be the server).

For the user's browser to verify a TLS certificate, it has a stored list of "top-level" TLS certificates that your everyday website can register their certificate with. So when you get the website's certificate, you can algorithmically prove it was verified at the top level, and therefore is legit.

Some of the top-level certificates had trivially breakable encryption key numbers that were recently discovered and removed. One of them was the number 4.

621

u/pdromeinthedome Oct 23 '26

But there is room for improvement. They could upgrade to 5.

215

u/kaurismus Oct 23 '26

I mean it's 25% better.

72

u/GRex2595 Oct 23 '26

I don't know this algorithm, but I think 5 is probably 100% worse actually.

107

u/SilasTalbot Oct 23 '26

No dude 5 is prime and 4 is not. Don't you know about encryption primes are better.

74

u/HeavyCaffeinate Oct 23 '26

That's why you gotta use a non-prime, they'll never expect it

38

u/DeusExMachina24 Oct 23 '26

Or don't encrypt the data at all. Hackers always expect encryption. Check mate.

→ More replies (3)
→ More replies (1)
→ More replies (1)

13

u/ancalime9 Oct 23 '26

Works off TV volume rules

3

u/GRex2595 Oct 23 '26

Well then it's only 50% worse.

2

u/FSNovask Oct 23 '26

100 vs. 101 is 25% more? C'mon reddit, you can do better than this

/s

32

u/fghjconner Oct 23 '26

Relavent XKCD (alt text)

31

u/easyEggplant Oct 23 '26

More relevant XKCD: https://xkcd.com/221/

20

u/Mozeliak Oct 23 '26

This is one of the weirder ones where it has been relevant in conversation since the posting, but suddenly has become headline news basically.

13 years after the original post??

5

u/SuperFLEB Oct 24 '26

"Did you just change your password?"

"Yes. With all the bad security news about our company, I figured it would be best to be safe. Make sure everything's locked down."

"Let me guess. Was your old password 'Correct Horse Battery Staple'?"

"... Yes."

4

u/easyEggplant Oct 23 '26

I think that it's just coincidence. 4 is a pretty common number.

9

u/croon Oct 23 '26

Even more so if you're using the xkcd rand method.

9

u/Elkku26 Oct 23 '26

There always exists a relevant XKCD, and there always exists a more relevant XKCD. One day we'll discover the most relevant XKCD, which holds all the answers to the universe.

4

u/thirdegree Violet security clearance Oct 24 '26

6

u/antiduckdude24 Oct 23 '26

To give them credit, they did figure this out. That's why their other keys were 56 66 115 155 156 230 and 237

14

u/madcow_bg Oct 23 '26

Well actually the number needs to be decomposable to 2 prime numbers, and 4 is literally the smallest possible private key... next is 6...

23

u/evil0sheep Oct 23 '26

It’s an elliptic curve key not an RSA key so it doesn’t need to do anything with primes

8

u/setibeings Oct 23 '26

According to ars technica, there were 7 other keys.

The private key sizes of the compromised keys ranged from 3 to 8 bits. Astonishingly, the private keys were 4, 56, 66, 115, 155, 156, 230, 237.

https://arstechnica.com/security/2026/10/the-internet-goes-on-high-alert-after-discovery-of-8-compromised-tls-certs/

And obviously yeah, these aren't all bi-prime. 

5

u/SpaceCore0352 Oct 23 '26

While prime numbers and semiprimes are the backbone of modern encryption, it isn't literally just a 384-bit semiprime that's used for these keys (besides, a semiprime would be the public key, while the hard-to-crack prime factors would together form the corresponding private key). I don't know the exact algorithm it does use, but another one of the bad keys was 66 = 2x3x11.

4

u/Officer412-L Oct 23 '26

Four shalt thou not count, neither count thou two, excepting that thou then proceed to three.

5 is right out.

60

u/100percent_right_now Oct 23 '26 edited Oct 24 '26

for ECC everyone else uses mostly numbers between around 115 quatturovigintillion and 3.94 quinquatrigintillion

115,792,089,237,316,195,423,570,985,008,687,907,853,269,984,665,640,564,039,457,584,007,913,129,639,936

and

3,940,200,619,639,447,921,227,904,010,014,361,380,507,973,927,046,544,666,794,829,340,424,572,177,149,721,061,141,426,625,488,491,564,080,662,799,030,681,500

for some comparison.

Of course they can use smaller numbers, but big number more better. Make brain happy.

11

u/Isoldael Oct 24 '26

Getting cookie clicker flashbacks here...

24

u/TheeAntelope Oct 23 '26

Why not have an RNG generate 100 numbers, and then that string of 100 numbers is they key? Why would you not put something in to prevent the key number from being 1 or 2 or even under 10 digits? Why not precede them with 99 zeros first and have it always be a 100-digit number?

So many things.

66

u/SpaceCore0352 Oct 23 '26

4 preceded by 99 zeroes is still 4. These aren't text passwords, the number value is literally directly used in the encryption algorithm.

But yes, in a sane world it's not possible to confuse your test byte with a full-length 384 bit key.

64

u/MTGandP Oct 23 '26

To be clear, nobody decided to make the key be 4. That would be a terrible idea. What happened is they set it to 4 for testing purposes, and then they forgot to change it. The key was supposed to be a random 115-digit number.

15

u/Verpous Oct 23 '26

Technically, all those things reduce entropy

8

u/Epse Oct 23 '26

You're supposed to pick a 4096 bit random number (huge, many digits). Random of course means that 4 has just as much of a chance of being picked, but the rules say that the number also can't be less than 256 . Someone made a big oops and overrode those rules, setting it to 4. A bored person just trying the first few numbers stumbled across 4 being valid

11

u/Tetha Oct 23 '26

And this will require weeks to months of patching everything, because certbundle management across many applications and languages is a clusterfuck. Especially once containers are involved.

Sorry for sounding bitter, but the PHP 9.2 vulns now go straight into this shite. At least it was just 1% of revenue for eMudhra. It could have hurt the company otherwise! Who cares about the thousands of hours we now have to spend cleaning up their crap.

7

u/Electronic_Age_3671 Oct 24 '26

Wait that's really what happened?? That's insane

1

u/happypandaface Oct 24 '26

lol so random

1

u/Otherwise-Cup-6030 Oct 24 '26

I'm getting traumatized. We have been using a wildcard certificate for ages. Last year they stopped allowing server authentication and client authentication on the same certificate. Now I have to create my own self signed client certificate to allow communication between our applications and API webservices. And now the certificate expiration has been reduced to 6 months. And by the next certificate change to 3 months.

Worst part. All the things I mentioned, I have absolutely zero knowledge about. It's just a whole bunch of failing services and chat gpt telling me how our infrastructure is slowly collapsing with each certificate change.

I have tried and tried to understand how these demon spawn systems work, but every time I seem to get a bit of understanding, it just opens up another door of even more complex and convoluted certificates.

Then Apple wants the root certificate and intermediate CA need to be signed by different trusts, and now I'm crying on the floor

131

u/RandomlyMethodical Oct 23 '26

https://arstechnica.com/security/2026/10/the-internet-goes-on-high-alert-after-discovery-of-8-compromised-tls-certs/

The compromised eMudhra keys were defective at a level that’s challenging the imagination of many of the engineers studying the incident. A normal size for a NIST P-384 elliptic curve cryptography private key contains roughly 384 bits of entropy, a size allowing almost 2384, or a number with 116 digits, different possibilities. The private key sizes of the compromised keys ranged from 3 to 8 bits. Astonishingly, the private keys were 4, 56, 66, 115, 155, 156, 230, 237.

45

u/TomWithTime Oct 23 '26

I heard about the first one but what the hell, they were all like that?? The person brute forcing them would have seen that finish before standing up to go grab a coffee

60

u/RandomlyMethodical Oct 23 '26 edited Oct 23 '26

I read somewhere that the internal tool or script they used to generate their keys was flawed so it only used the first byte of a byte array as the key. Pure r/programminghorror

19

u/ProxyMuncher Oct 23 '26

When I heard that it was just such an astoundingly stupid fuckup that began right at the beginning that was simply signed for and approved all the way down the line, my soul evaporated from my body. No wonder they immediately dropped the entire business like a hot potato.

10

u/No-Criticism-2587 Oct 24 '26

When subway made their own subshop program instead of using a generic one, the final version they pushed to all stores couldn't handle empty fields and would crash and you'd lose all inventory info.

So you'd start inventory it would be all zeroes, and if hit backspace on one it would crash. They fixed it fast, but clearly stuff is untested before being pushed out sometimes.

2

u/One-Phase9064 Oct 25 '26

I suspect they'd be broken before the Enter key finishes popping up

232

u/UndocumentedMartian Oct 23 '26

An Indian digital service had a secret key that was just 4.

81

u/dmigowski Oct 23 '26

And it threw the towel and exits the whole certificate business now.

52

u/ElegantDeletion Oct 23 '26

That's how certificate authorities work. Their one job is to be secure and trustworthy. As soon as a breach happens, it's just over

5

u/Hobofan94 Oct 24 '26

Comodo survived a compromise but had to rebrand to Sectigo.

28

u/basicKitsch Oct 23 '26

ah like my contractor? only to spin up another llc next week to dodge liability?

17

u/DeHub94 Oct 23 '26

Understandably so if you fuck up that hard.

6

u/Epse Oct 23 '26

They're still doing code signing though! Only existing TLS certs

Absolute incompetent idiots judging by the incident reports and their past oopsies

7

u/Antarioo Oct 23 '26

don't forget to mention that they had the audacity to blame the media storm instead of their own colossal incompetence

6

u/16807 Oct 23 '26

Genius! It's so simple a private key that nobody would guess it!

40

u/ceapaire Oct 23 '26

23

u/EmbeddedSwDev Oct 23 '26

"[...] the strongest of the defective keys had a maximum of just 256. The private keys were 4, 56, 66, 115, 155, 156, 230, 237."

This is hilarious...

14

u/ggtsu_00 Oct 23 '26

XKCD is Nostradamus AGAIN: https://xkcd.com/221/

100

u/CeeMX Oct 23 '26

-----BEGIN EC PRIVATE KEY-----
4
-----END EC PRIVATE KEY-----

23

u/gsweats Oct 23 '26

Storage is expensive. This saves on hundreds of bytes. Genius!

126

u/Ayushispro11 Oct 23 '26

Hey genuine question, why in the hell would someone go out of their way to use a one digit number for a private key when most utilities that generate them with proper syntx and formats normally always generate very long hashes/ random patterns. Isnt this like counter intuitive? if anyone even wanted a random numher, the good ol keyboard mashing would've done better than this

104

u/CatWeekends Oct 23 '26

The simplest explanation is that they did everything right and we just happen to exist in the universe where they were randomly assigned single digit numbers from of a range of 0 to far more particles than there are in the observable universe.

50

u/Ayushispro11 Oct 23 '26

Imagine how funny it would be if it genuinely IS by chance just a single digit and some poor software engineer just had like astronomically bad luck

10

u/FugitivePlatypus Oct 23 '26

The thing is, generating any one number smaller than 256 in that range is so unlikely it's actually impossible

14

u/DontBuyMeGoldGiveBTC Oct 24 '26

Depends on the randomization algo. Maybe it's just function genNum(0,infinity) {return 4}

→ More replies (1)

9

u/quisido Oct 24 '26

It's just as likely as generating any other number.

12

u/CheesePuffTheHamster Oct 24 '26

It's 50/50. Either you generate the number 4 or you don't.

→ More replies (4)

2

u/teddy5 Oct 24 '26

This is just a dev who was unlucky on an Agrajagian scale.

75

u/dr_deadman Oct 23 '26

There were 8 keys which were less than 256. Not 256 digits - the number 256.

7

u/G3nghisKang Oct 24 '26 edited Oct 24 '26

That's like being struck by 196.4 lightings in a row, not likely, not impossible

16

u/mambotomato Oct 23 '26

I believe you missed the sarcasm in the comment you replied to.

2

u/SuperFLEB Oct 24 '26

"Great. I've got to spend quantum immortality with these assholes."

55

u/Monpulse179 Oct 23 '26

I think it was a test key that became a normal key for whatever reason

44

u/PmMeUrTinyAsianTits Oct 23 '26

you don't need simple test key though. they're going out of your way to make your "test" less representative of the real thing.

There's no reason it should've existed in test either. It almost would've been better to be fucked up directly into prod, because that's just one miss. This "generated god awful key" AND "mixed test and prod".

10

u/Ayushispro11 Oct 23 '26

Yess exactly. Nowhere since the dawn of computer cryptography have single digit keys ever been a thing. The whole point of cryptography is that it's hard to guess, you don't make it the 4 trial in child's first brute force attempt

7

u/arbyyyyh Oct 23 '26

Like, I get how it's a "valid" key, but I also don't. I would think somewhere within someone of the utilities that do the signing, something would identify that there isn't sufficient entropy or something.

3

u/visor841 Oct 23 '26 edited Oct 23 '26

you don't need simple test key though. they're going out of your way to make your "test" less representative of the real thing.

IIRC it was a failed test, it wasn't supposed to be simple.

Edit: This does not in any way justify anything, they screwed up really bad, and it's a good thing they're leaving the industry.

2

u/PmMeUrTinyAsianTits Oct 23 '26

That doesn't make sense as an explanation, at least not as one that makes it better instead of even worse.

Were they testing their keygen? 1) Why are they rewriting keygen 2) why are they using tested keygens in their software setting? If you're fucking with how you generate the certs themselves, that seems like something that should be tested in its own independent workflow, not just slammed into integration tests of the full suite or something.

There's no reason to generate that key. If the key was generated in error because they were making changes to how they do it, there's no reasons to have been using "keys that might have been generated in error" in the actual software yet. You shouldn't be integrating unstable and untested keygen (or its results) into your actual software.

→ More replies (3)

3

u/a_shootin_star Oct 24 '26

ahh the old tale of "temporary" that enters prod

1

u/Ayushispro11 Oct 25 '26

Except the prod is the entire fucking internet 

13

u/Altruistic-Tap-1510 Oct 23 '26

2^384 combinations = pick a number between 1 and 384

14

u/FugitivePlatypus Oct 23 '26

It was an error in the script they used to generate the keys. Negligence, not intentional

7

u/immortal_lurker Oct 23 '26

They didn't do this on purpose. You wouldn't even do this on purpose out of malice. Its their key; if they wanted to misuse it they would just misuse it.

3

u/Worried_Onion4208 Oct 25 '26

If you RNG is truly random, it needs to allow 4 to be a possibility, if you start at 10 000 for exemple, 10 004 is as quick to find as 4 if you start at 0.

2

u/wildwildwaste Oct 24 '26

Just throwing the number 4 into a hash generator would give you a better key that's just as easy to remember how to get to.

0

u/[deleted] Oct 24 '26

[deleted] — view deleted comment

1

u/Ayushispro11 Oct 25 '26

But like this is an astounding amount of stupidity to fuck up something that guards basically the entire internet

79

u/6T_K9 Oct 23 '26

It’s even worse than that. The 8 super secret ultra important private keys were:
4, 56, 66, 115, 155, 156, 230, 237….

What the fuck?

19

u/Dikenz Oct 23 '26

They thought they need numbers for the lottery draw.

12

u/StealthRabbi Oct 24 '26

0 - 255. Takes virtually no time to brute force and find them all

7

u/a_shootin_star Oct 24 '26

8 and 9 were too far on the numpad

4

u/mmhawk576 Oct 24 '26

Had one go at 7, realised the whole row was unusable.

116

u/Stummi Oct 23 '26

Technically, it was eMudhra who set the bar too low.

64

u/botle Oct 23 '26

The standard does accept single digit keys though.

60

u/Fantastic-Fee-1999 Oct 23 '26

Perfection! 

24

u/AsideLogical Oct 23 '26

Chosen by a fair dice roll. Guaranteed to be random

20

u/RoboJediNate Oct 23 '26

Well now its public, so checkmate

35

u/picuber Oct 23 '26

As always, there is a fitting XKCD

https://xkcd.com/221/

14

u/AlMasaDuun Oct 23 '26

I mean to be fair... was anyone dumb enough to try 4?

7

u/Triscuitador Oct 23 '26

did you aee that they posted the algorithm?

7

u/ofthefuckingrivia Oct 23 '26

Fair Dice Roll

1

u/Worried_Onion4208 Oct 25 '26

When you roll a 0 and the DM doesn't like you

14

u/Upstairs-Ad-7962 Oct 23 '26

I feel left out, why are There so many memes about encryption key 4 now?

53

u/ColumnK Oct 23 '26

eMudhra, an Indian certificate authority, used 4 as an encryption key.

Unsurprisingly, they are no longer in business

10

u/PmMeUrTinyAsianTits Oct 23 '26

I'm curious what the knock ons of this are. I've been annoyed how many CAs I accept by default and wondering if I should pare it down, and that was my idle paranoia. Now this shit happens and it doesn't seem like paranoia anymore. just good safety. The fuck site do I need that "eMudhra" was going to sign for?

13

u/PixelatedGiant Oct 23 '26

Many Indian government websites and esigning services used eMudhra for certificates. So mostly people living in India, not really North America.

3

u/PmMeUrTinyAsianTits Oct 23 '26

Exactly my point. I do not need a bunch of "trusted" authorities that are only "trusted" because they need it to do things I don't care about. That's just adding vulnerabilities.

If/when I visit india, I can update my certs to include it again, but that will literally never happen.

6

u/PixelatedGiant Oct 23 '26

Either you're completely unaffected since you don't visit any Indian websites or you do visit Indian websites and therefore need Indian CAs and can't remove them.

So what is the benefit of removing those CAs from your global list? It doesn't change your situation.

→ More replies (7)
→ More replies (1)

1

u/SuperFLEB Oct 24 '26 edited Oct 24 '26

I have heard that people are looking for opportunities to jailbreak devices that might have that CA baked into their firmware. It's not terribly likely, but it's not impossible.

3

u/CarkRoastDoffee Oct 23 '26

They're still in business, as the Certificate Authority gig was a small part of their operations. It's worth noting that this has resulted in a significant blow to their stock value, however

4

u/100percent_right_now Oct 23 '26

eMudhra is a MASSIVE company bro. They shunted their SSL/TLS certs department, less than 1% of their revenue. Didn't even fire anyone yet, at least publicly.

2

u/k8s-problem-solved Oct 24 '26

"Noone will ever guess it! They all think we're using 256 length"

15

u/PixelatedGiant Oct 23 '26 edited Oct 23 '26

Using public-private key encryption you create a private key. That private key can be used to create certificates that can be signed and then verified using the public key.

Basically someone figured out that their private keys that were literally just the numbers 4, 56, 66, 115, 155, 156, 230 and 237. Those numbers are supposed to be 116 digits long making them impossible to guess. Meanwhile their keys were 1-3 digits in length.

If you know the private key you can create a certificate and pretend to sign things on their behalf. In this case all 8 of those keys were figured out by counting from 1-237 and trying them all. It's beyond dumb and likely just test keys that accidentally got used.

4

u/1nd3x Oct 23 '26

It's beyond dumb and likely just test keys that accidentally got used.

"Everybody knows everyone uses keys that are 116 digits long...nobody would bother to try and brute force check our keys starting from the number 1...they'd obviously start at the number 1x10¹¹⁵, so it's extra safe to use low numbers that everyone is just going to skip over"

1

u/Worried_Onion4208 Oct 25 '26

Well, it doesn't matter when the keys start in a brute force attack, and reducing the range by starting higher actually reduces the effort, it doesn't increase it.

→ More replies (1)

1

u/G3nghisKang Oct 24 '26

said it's getting out of business [...] cited increasing costs and complexities of compliance requirements

Lmao what

1

u/Worried_Onion4208 Oct 25 '26

Oh ok all of them were bad, I thought it was just them being extremely unlucky with their RNG, but that's beyond unlikely to happen

2

u/PixelatedGiant Oct 25 '26

eMudhra’s statement about the incident says it generated keys during “a Key Generation Ceremony (KGC) held on April 30, 2025, using FIPS 140-2 Level 3 Hardware Security Modules (HSMs).”

Such hardware is the standard kit for the job and should in theory produce nicely complex keys and store them securely.

But something went wrong.

“A flaw in the KGC caused a wrap/unwrap step to produce a second set of weak keys alongside the original strong keys,” the statement claims. “The weak keys were the ones published to the browser root stores. eMudhra is working to establish the root cause.”

So I looked into it more and they are claiming that they generated 2 sets of keys, one of them purposefully weak for some reason and published the wrong set.

→ More replies (2)

5

u/jorizzz Oct 23 '26

CISSP Exam be like

3

u/ApatheistHeretic Oct 23 '26

I'm certain it would be a prime number. I would've gone with 7.

3

u/Ozymandias_1303 Oct 23 '26

Surely the correct answer is "you wouldn't be able to check it if I did, because it's private."

3

u/Landkey Oct 24 '26

“Oh yeah? Name a private key” is hilarious 

3

u/Cart1416 Oct 24 '26

So you like encryption? Name every private key

5

u/screw-britannia Oct 23 '26 edited Oct 24 '26

So that was the reason Firefox wouldn't load one of the indian govt. website. Oddly enough, Edge happily loaded the website.

4

u/JonathanSCE Oct 24 '26

I believe Edge is the last, or one of the last, browsers not to have revoked the certificates yet.

1

u/ADarwinAward Oct 24 '26

Typical Microsoft

2

u/unlinked3297 Oct 23 '26

Way too low...

2

u/fatrobin72 Oct 23 '26

id_rsa

3

u/entronid Oct 24 '26

ecdsa actually, not RSA

1

u/fatrobin72 Oct 24 '26

Was just naming a private key...

2

u/TheRealJayk0b Oct 23 '26

Hahah yes I saw a video about this today! I KNOW THE JOOKEEE! finally I can laugh about something from this sub.

0

u/uwagapiwo Oct 23 '26

What the hell is a jookee?

1

u/a_shootin_star Oct 24 '26

♦ 8 B s ¢ £ µ Ω

1

u/Hydra-dragon96 Oct 24 '26

Can anyone explain the context here

1

u/BlakeXHunt Oct 25 '26

What can I say? Us Indians can’t lose. 🗿

1

u/dawoodur 17d ago

Sweetheart, the only thing I can give you is 'Public key'

-2

u/Sw0rDz Oct 23 '26

Can a non prime number be a key? I guess, but not very good key.

7

u/yarntank Oct 23 '26

This is ECDSA, which does not need prime numbers for the private key. RSA uses primes to build the keys.

3

u/mifter123 Oct 23 '26

No, if I remember correctly, the key must be the product of two prime numbers, ideally two very large prime numbers, but technically speaking any two prime numbers will produce a valid key. (Determining which numbers is a p=np problem which is great for encryption) 

4 is the lowest possible value for the key being the product of the prime number 2 and the prime number 2. 

2

u/entronid Oct 24 '26

this is specifically for RSA, the emudhra leak was for ECDSA which does not have this restriction. factors were not necessary

1

u/willow-kitty Oct 23 '26

This is true for RSA- essentially, the private key is two prime numbers, and the public key is their semi-prime product. Getting to the public key from the private is easy, while going backward is not. Mostly.

Shor's Algorithm can theoretically factor a semi-prime correctly 50% of the time, and it's trivial to check if the answer is correct and if not, try again. That requires a quantum computer with enough storage to represent the key, which..may not exactly exist but is kinda what people are talking about when they say RSA isn't quantum-safe - a sufficiently powerful quantum computer can crack it pretty trivially.

There are quantum-resistant asymmetric ciphers that don't depend on the semi-prime problem, but tbh I don't really know how they work.

1

u/BruhMomentConfirmed Oct 23 '26

But 2 isn't prime since it's divisible by 0, 0.5, 1 and 2.

1

u/im-a-guy-like-me Oct 23 '26

Don't forget 0.25. 😉

2

u/MaleficentCow8513 Oct 24 '26 edited Oct 24 '26

I just checked with Claude and 2 is divisible by any decimal number making it the most secure key because the set of divisors is infinite

2

u/im-a-guy-like-me Oct 24 '26

I mean... You can't argue with facts. 🤷

→ More replies (1)

2

u/madcow_bg Oct 23 '26

The key is not a prime number, the private part is the prime number. So in this case 2 is the private key, 4 is the public key... literally the smallest possible.

4

u/entronid Oct 24 '26

no, that's RSA. they used ECDSA so any field element (number within the bounds) could be used

1

u/entronid Oct 24 '26

yes, depending on the algorithm. RSA requires it to be prime, not because of any security properties, but because if it wasnt you wouldnt be able to satisfy the property D_k(E_k(m)) = m (decrypting encrypted data gives back the original message). however, other algorithms, like ECDSA (which was used here) and EdDSA, doesnt have this requirement and thus you could use any number