r/ProgrammerHumor • • Oct 22 '26 • Bravo 2

Meme notInsecureJustUnlucky

/img/dd9mi2hpa2xh1.jpeg
13k Upvotes

369 comments sorted by

4.5k

u/beisenhauer Oct 22 '26

Some numbers are more random than others.

1.0k

u/Banana_Twinkie Oct 22 '26 • Bravo Heartwarming

Settle down, pig

148

u/Radish_Li Oct 23 '26

Do not resist. We drink the milk and eat the apples for your good.

102

u/mmcmonster Oct 23 '26

In their defense, it was a twenty digit number. It’s not their fault the first 19 digits were all ‘0’.

Random numbers. 🤷‍♂️

106

u/WICKER-shadow Oct 22 '26

At this point, I’m convinced the universe has a personal grudge against anyone who tries to generate a random number

121

u/yousirnaime Oct 22 '26

and thus, a collection of lava lamps is critical to global security

12

u/Mushroom38294 Oct 23 '26

and so are a few hundred fish

7

u/DonkeyInACityCrowd Oct 23 '26

I prefer cosmic background radiation personally. 

21

u/jon_eod Oct 23 '26

The invention of PHP was the original sin

91

u/Phytor Oct 22 '26

Not if their determined by fair dice roll!

29

u/SpareFact448 Oct 22 '26

I just read the xkcd prrficting this same line

21

u/kerbese Oct 22 '26

George Euler

2

u/Agreeable-Yogurt-487 Oct 23 '26

Is that a new Smiths song?

2

u/who_you_are Oct 22 '26

The lotteries numbers are for sure more random!

→ More replies (1)

3.1k

u/AphroditesViolet Oct 22 '26 edited Oct 22 '26 • Bravo Mindblown Heartwarming

Full context for anyone wondering how the hell this happened:
8 formerly globally trusted keys from eMudhra, a former Certificate Authority were brute forced. The keys have a maximum size of 384 bits, one of the keys was the number 4.
According to a company representative the 8 keys (which were all 1 byte or less) were created for a test, and therefore not subject to security tests. Due to a scripting error, they were significantly less secure than intended as they were supposed to be full strength keys, and then not disposed of after the test. Then, due to the set of test keys sharing a similar name with the real proven to be secure keys, the test keys were then sent to production.
The private keys in base ten are:
4, 56, 66, 115, 155, 156, 230, 237
And now the company announced they’re “voluntarily” leaving the CA industry after Google and Mozilla announced their root certificates were being removed from their stores, with IoT and other non updatable devices trusting their certificates until 2039

961

u/McSaunchez Oct 22 '26

Bloody hell thank you I’ve been looking for an explanation for this 4 thing

185

u/ItchyPercentage3095 Oct 23 '26

I thought it was an xkcd reference

364

u/Ma8e Oct 23 '26 • Bravo

259

u/MightyKin Oct 23 '26 edited Oct 23 '26

The fact this is 4 too is hilarious

→ More replies (1)

19

u/KnightWhoSays--ni Oct 23 '26

this is blowing my fucking mind

13

u/takeyouraxeandhack Oct 23 '26

It is, but not intentionally.

→ More replies (1)
→ More replies (4)

260

u/heavy-minium Oct 22 '26

 with IoT and other non updatable devices trusting their certificates until 2039

Private consumer stuff too? Should I be worried? I got a bit of older smarthome stuff at home.

352

u/latkde Oct 22 '26

Yes, anything that can make outgoing HTTPS/TLS connections is vulnerable to MitM attacks until the trust store gets updated. This effectively means that many IoT devices will remain vulnerable for >10 years.

The good news is that an attack requires an in-the-middle position in the network where the traffic can be intercepted and re-encrypted. As long as you trust your WiFi router, ISP, VPN, internet backbone, and destination data centre, there's nothing to worry about. This isn't a huge problem at home. But you really shouldn't, say, connect a smart toothbrush to hotel WiFi.

156

u/TorumShardal Oct 22 '26

Hmm... That means we can try to do MITM ourselves to look what our toothbrushes send to manufacturers... I wonder how much interesting stuff will be discovered in the next news cycle.

109

u/MattieShoes Oct 22 '26

A friend noticed china-bound traffic from his sous vide... turns out it was a Chinese chip configured to access an NTP server. Ie. It was just keeping time accurately, but still freaked him out.

→ More replies (5)

46

u/toxic_acro Oct 23 '26

I've seen a few people already doing that

Luckily, mitmproxy released a new version today that includes a --emudhra CLI option, so it's now super trivial to set up

https://www.mitmproxy.org/posts/releases/mitmproxy-12.3/

→ More replies (1)

16

u/izuannazrin Oct 22 '26

Blessing in these guys

35

u/Salanmander Oct 22 '26

But you really shouldn't, say, connect a smart toothbrush to hotel WiFi.

Serious question: what is the worst that could happen if you connect a smart toothbrush to hotel WiFi? Are we looking at "they can know I sometimes forget to brush my teeth in the morning", or "they can brick my toothbrush", or "they can gain access to every other device that's connected to the same network", or some other level in between?

I'm assuming they would just be able to control the data that gets sent back and forth, which wouldn't be catastrophic for a toothbrush, but I recognize that my cybersecurity knowledge is not perfect.

71

u/Celestial_User Oct 23 '26

Depends on the design of the device itself. Potentially, it could ping a server to receive firmware updates, so if you send it a malicious firmware, you now have a compromised device that can potentially run arbitrary code. Inside your home and that's a vector of attack.

Now realistically how much compute can a toothbrush have? Probably not that much. But it could potentially do a scan of your network, and if you have other vulnerable devices that you typically trust because it's inside your trusted network, it can perform lateral movements to it.

→ More replies (3)

16

u/frogjg2003 Oct 23 '26

Smart toothbrushes are usually paired with an app. That app is virtually guaranteed to require a username and password. That intimation may be accessible to the toothbrush. It would be very stupid to do it that way, but no one is designing a smart toothbrush with security as a top priority. A hacker could steal whatever credentials.

Now, you asked what the worst case scenario was, so I'm going to say that your username and password got the toothbrush are the same as your bank. Now your hackers have access to your bank account.

If the toothbrush and app are designed with security as the first priority, the hackers would have access to the token your toothbrush gives the app to connect to your account. It's unique to the toothbrush and the app keeps track of it instead of the toothbrush keeping track of your app. With this setup, the hacker might be able disconnect your toothbrush from your account. If the toothbrush can be controlled through the app, they might be able to turn it on or off or brick it. They may send fake brushing data to your app.

More realistically, it's going to be closer to the latter than former, but the code behind the toothbrush and app is going to be propriety and done cheap. You can't know if the programmers we educated on best security practices.

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

7

u/cheese_is_available Oct 23 '26

As long as you trust your WiFi router, ISP, VPN, internet backbone, and destination data center, there's nothing to worry about.

We're totally fucked then.

→ More replies (1)

4

u/toasterinBflat Oct 23 '26

IoT devices don't typically keep full certificate authority stores and aren't likely to carry an eMudhra-backed certificate in the first place, so they aren't likely to be any more vulnerable than they already were prior to this discovery.

→ More replies (2)

4

u/WazWaz Oct 23 '26

Trusted connections are used for firmware updates. A fake update to your smart vacuum cleaner can do anything that a hacker with a laptop on your local network can do (basically anything).

96

u/agathver Oct 23 '26

The company is a lying bitch. They are shady AF (I have to deal with them due to regulatory capture they have here).

No HSM will generate keys with such low entropy. So they didn’t use HSMs and are lying on our face. Also multiple code reviews and external audits could not catch the flaws, and I’m surprised none of their audits had a basic entropy checking step.

You need a colossal fuckup and gross negligence and apathy from external auditors to reach this stage .

Also to issue certificates they don’t follow the standard practice of sending a CSR, they mail you the private key and the pin. Their security practices are a joke and their so-called auditor is a fraud, like the Delve and Atom.

8

u/Smooth-Zucchini4923 Oct 23 '26

The company is a lying bitch. They are shady AF (I have to deal with them due to regulatory capture they have here).

No HSM will generate keys with such low entropy. So they didn’t use HSMs and are lying on our face.

That detail can be explained by a close reading of their statement to Mozilla:

We have done some preliminary assessment, there appears to be a flaw in the KGC script that was used on that specific day to create these ECC issuers. As for these ECC keys, our review of the KGC, assessment of the code and view of HSM keys so far indicate that a) a set of original ECC keys were created onboard as expected b) an approved deviation to our usual KGC to test a wrap/unwrap was introduced as these keys were meant for export for this instance c) a flaw in the code resulted in the second pair of keys being created onboard which were weaker

Wrapping/unwrapping is the process of serializing and encrypting a key, or decrypting and importing a key.

The statement is a little vague, but I believe this means that either

  1. the script generated the key on a non HSM device, and was then imported into the HSM, and the non HSM device's key generation was flawed,
  2. or the serialization process was flawed, and kept just the first byte when serializing the key.

I do believe them that an HSM was involved, and I do believe that they are complicated enough that they can be misused.

→ More replies (1)

3

u/OuchLOLcom Oct 24 '26

Lots of auditors do fuck all and give it passes for cash. I’ve met a few, my boss loved them. 

→ More replies (1)

34

u/turtleship_2006 Oct 23 '26

In their announcement of leaving the industry, they tried to blame social media.

86

u/Honeybadger2198 Oct 22 '26

I am truly shocked that they forgot to set a minimum length for their keys. That's like password security 101.

37

u/Death_God_Ryuk Oct 23 '26

If you count zero-padding, it's the right length

55

u/AphroditesViolet Oct 22 '26

They tried, the short keys were due to a scripting error
These keys weren’t tested for security because they weren’t meant for production

24

u/Named_after_color Oct 23 '26

Software engineering 101 is to test prod and nonprod in the same way.

→ More replies (1)

15

u/jrobbio Oct 23 '26

It was only 8 certs though. How did nobody cross reference the thumbprints?

5

u/HoneyBastard Oct 23 '26

Saddest excuse ever

How did these test keys even end up anywhere near the production keys?

2

u/HAL9001-96 Oct 23 '26

well if you are going to use randomized keys for security as long as they are truly random yo udon#t want to restrict htem that leads to enigma style vulnerabilities

but they actually have to be randomized

now checking their lenght could be a failsafe for catching mistakes where not truly randomized keys enter but then that would also be another place where information on the keys can leak out

→ More replies (7)

27

u/BellacosePlayer Oct 23 '26

with IoT and other non updatable devices trusting their certificates until 2039

man, i'm glad my "IoT devices are really cool and I want them" phase was like a decade before IoT devices actually hit the market

try hacking my 10$ mr coffee, fuckers

10

u/Masark Oct 23 '26

try hacking my 10$ mr coffee, fuckers

Anything can be hacked with the right tools.

In your case, the right tool is an axe.

10

u/UltimateFlyingSheep Oct 23 '26

woah, this has "RSA by hand"-uni-vibes

5

u/DPSOnly Oct 23 '26

How does one brute force those keys? Do you need to have all 8 correct to get the "lock" or is it like those safe crackers in movies that can hear the tumbler fall for a correct one?

5

u/pi_is_sqrt10 Oct 23 '26

The former. No digital algorithm gives you feedback if the first part of a pass phrase (key, password, hash, ...) is correct. If your password was "12345" (don't), guessing "1234" is just as wrong as any other password.

This makes long passwords super safe. A bike lock of four digits that gives you feedback makes a hacker test up to 9 × 4 combinations, but without feedback 94 , which scales, well exponentially.

2

u/Wessel_89 Oct 24 '26

They are for separate private keys, so you wouldn’t need all eight.

12

u/Uberzwerg Oct 23 '26

8 bit range instead of 384 bit - same same, but different.

To give people an idea of how unlikely it is that this was just coincidence:
To get to a number that small, the first 376 bits need to be zero - imagine flipping a coin for 384 times and the first 376 are tails.
And that then happened with all 8 numbers they had.

4

u/TeaInASkullMug Oct 23 '26

how long has this been a risk?

5

u/AphroditesViolet Oct 23 '26

April 30th, 2025

6

u/crmsncbr Oct 22 '26

Thanks for the context 🖤

2

u/MakeitHOT Oct 23 '26 edited Oct 23 '26

Damn I was studying DNSSEC today. It was really cool to read this. Thank you.

Edit: actually this wasnt about dnssec, but about cryptography. Still pretty cool <3

→ More replies (9)

1.1k

u/Pim_Wagemans Oct 22 '26 • Heartwarming Bravo

Relevant xkcd: https://xkcd.com/221/

673

u/samanime Oct 22 '26

The fact xkcd "predicted" this so precisely is pretty hilarious.

157

u/jamesianm Oct 22 '26

I hadn't heard about this and thought it was a reference to the XKCD

19

u/LegitimatePants Oct 22 '26

What happened 

76

u/mxzf Oct 22 '26

Basically a company was making passwords for some super sensitive and important stuff and eight of their passwords were 1-3 digit numbers for something that can support 115 digits, just stupidly insecure. One of the passwords is 4.

→ More replies (6)

8

u/SuperFLEB Oct 23 '26

I'm still kind of wondering if it was. Not so much "4 instead of a proper number", but "4 instead of another small number"-- akin to making your intentionally-throwaway test password hunter2.

→ More replies (1)

33

u/evanldixon Oct 23 '26

It gets better: this comic predates the hacking of the PS3 which did the same thing with the "random" numbers in its cryptography. It wasn't nearly as egregious than this latest cert thing but this comic still got cited then.

→ More replies (4)

98

u/Scottz0rz Oct 22 '26

And there was the follow-up one today lol

https://xkcd.com/3314

8

u/SSjjlex Oct 23 '26

Half life half six confirmed

3

u/mattsl Oct 23 '26

Awesome but a missed opportunity to make it also be a holy hand grenade joke. 

156

u/J33pe Oct 22 '26

How long will it take people to realize that Randall Munroe is a prophet

62

u/samtresler Oct 22 '26

Or was the person setting the key just a really stupid xkcd fan?

27

u/setibeings Oct 22 '26

Reminds me of correct-horse-battery-staple appearing on common password lists.

→ More replies (1)

18

u/Apprehensive_Lake698 Oct 22 '26

This feels like the obvious answer 

11

u/laplongejr Oct 22 '26

I thought so but the real boring explanation is that a bad script made 8-bit (1 byte!) private keys, and due to a name confusion an error used that as the keys to create intermediate certificates  

→ More replies (1)

22

u/iampierremonteux Oct 22 '26

Even a broken clock is right twice a day.

He used a fair die roll. Someone else had to get that random number too. Right?

In all seriousness, the odds of these two events lining up is hilarious.

The longevity of the stupidity of this egregious security incident however is not funny at all. Randall wasn’t prophet in that regard either. Keys have been poorly chosen before with insufficient or nonexistent random. And I am almost certain that this won’t be the last time.

4

u/duck1123 Oct 22 '26

Roughly 10,000 per day.

4

u/ralgrado Oct 22 '26

I disagree: randall munroe is the infinite amount of monkeys typing on a type write until they produce the bible.

→ More replies (6)

10

u/justinf210 Oct 22 '26

What I'd give to see his analytics for that page. Normal, normal, normal, vertical line

3

u/aculleon Oct 22 '26

Non zero chance that this was inspiration

5

u/laplongejr Oct 22 '26

Actually no, it's one key among a few others 1-byte keys

→ More replies (2)

915

u/EndMaster0 Oct 22 '26

There were multiple keys. The longest was 3 characters. It looks like they had selected random numbers between 0 and 384 instead of 2384

452

u/The-Arx Oct 22 '26

Its more likely they did one random byte (0-255). They generated two sets of keys and accidentally used the less secure ones somehow

98

u/Dotcaprachiappa Oct 22 '26

Imagine they genuinely just generated 8 completely random keys that by some alignment of the stars simply all turned out to be so low

83

u/toxic_acro Oct 23 '26 • Mindblown

For reference, the chances of that happening are about 0.0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000003%

74

u/Sabard Oct 23 '26

So you're telling me there's a chance

→ More replies (1)
→ More replies (4)

14

u/slugfive Oct 23 '26

At that point take it as a sign the universe want you out of the security business and close up shop anyway

47

u/neroe5 Oct 22 '26

i seem to recall one value being just above 255 but still below 300

142

u/The-Arx Oct 22 '26

According to Wikipedia they are 4, 56, 66, 115, 155, 156, 230, and 237.

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

4

u/urielsalis Oct 22 '26

they are all increasing digits. An engineer might just have moved their finger across the top row and pressed enter with whatever number resulted

28

u/sanketower Oct 22 '26

That's bullshit, but I believe it

52

u/Mechakoopa Oct 22 '26

All the numbers were under 256. They only populated the first byte of their byte array

→ More replies (1)
→ More replies (4)

237

u/bilvy Oct 22 '26

There were 8 keys each with a value under 256. It was not just bad luck

106

u/Sillyguri Oct 22 '26

Nah that obviously happened by chance with probability 2^(-3008)

→ More replies (5)

78

u/GRex2595 Oct 22 '26

Complete incompetence by that CA. Hopefully they never issue certificates again.

125

u/latkde Oct 22 '26

eMudhra announced today that it "has decided to voluntarily withdraw from the global SSL/TLS certificate business": https://emudhra.com/en/press-release/emudhra-to-exit-global-ssl-tls-certificate-business

11

u/DiddiZ Oct 22 '26

"Trust Delivered"

10

u/laplongejr Oct 22 '26

"With over 17 years of expertise" and the guy in charge of the certificates was in the company for over 15+ years if I recall the bugzilla discussion. I wonder what discussions happened...  

10

u/GRex2595 Oct 22 '26

That's great news. Hopefully whoever comes next learned from this and will follow best practices.

→ More replies (7)

5

u/ManaSpike Oct 22 '26

Oh, it's worse. These keys were created a year ago. Around the same time they were trying to fix the last issue they created.

85

u/jhill515 Oct 22 '26

"A random number generator that always returns 1 is still a random number generator. At any point, a random bit flip could occur. So if there's a 1/2^384 probability of selecting any arbitrary unsigned number in the nominal case, there's likely still an equal probability with this Constant-1 Generator. Like a coin, just keep flipping until it lands on edge!"

- Paraphrased from xkcd What-if

69

u/Tammbiee Oct 23 '26

I just asked a RNG yesterday to generate a random number between 1 and ten million. I planned on using that number as the population of my fictional city. It gave me the number 17... I now have a small camp as a capital city.

35

u/pyrotechnicmonkey Oct 23 '26

if you're planning to use the number for your fictional city why would you include numbers in the range smaller than an actual city

31

u/Tammbiee Oct 23 '26

Simple answer - I am stupid and did not think of the possibility.

11

u/Holmat1 Oct 23 '26

is that why it’s called city 17?

6

u/Tammbiee Oct 23 '26

Amazing answer, did not realize the parallel.

11

u/timtucker_com Oct 23 '26

The entire population of the capital is age 17.

It's a right of passage that you go to the capital, learn how to live as an adult on your own, then return home when you turn 18.

The entire legislative body is 17 and spends equal amounts of time learning the law as making it.

There's a booming niche of people living on the outskirts of the city providing advice (not all of it good).

9

u/Zhayrgh Oct 23 '26

It could make for a cool/weird worldbuilding element, as a capital city that is basically a nomad camp, a point at which all the people go to discuss politics, vote and debate, but where nobody stays because [reasons] (like the site was chosen for its neutrality and people being there permanently would change that)

7

u/hottestpancake Oct 23 '26

It would be funnier if you played it straight though. There's only 17 people in the capital city and nobody questions it and treats it as completely normal.

→ More replies (4)

2

u/Tammbiee Oct 23 '26

In the HRE, the Emperor used to roam around his Empire all the time. So there is real examples of this. However, his entourage would probably feature a whole army. And the Capitol would still be considered a City, not wherever they happened to be situated at the time.

2

u/Informal_954 Oct 23 '26

Could be a regulatory thing. The town surrounding the capital has all the people, but only the actual official live in the Capital township which is like 10 buildings.

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

6

u/Mixer555 Oct 23 '26

You could make it regular city but everyone else died to some disease or war or whatever

4

u/Tammbiee Oct 23 '26

The funny thing is, that it actually is supposed to be fully eradicated down the line. That is way less impressive on 17 people tho.

4

u/Basilgarrad16 Oct 23 '26

17 real people and the rest have already transferred their consciousness into a robot.

4

u/tayler6000 Oct 23 '26

Did you have a story ready if it gave you 1?

6

u/Tammbiee Oct 23 '26

No but "City of 1" sounds like a banger album name.

3

u/IrredeemableRight Oct 23 '26

every number has a 50% chance of being the one, that's pretty random, right?

2

u/redokev Oct 23 '26

Basically a good city but legally nobody can live there, it's just that there's no regulation preventing people from staying at a "hotel/airbnb" or even purchased housing indefinetely

3

u/Shaeress Oct 23 '26

This does happen in real life. Like in the UK the capitol city is London, except the thing we call London is not legally considered a city. They're just the highly populated metro area of the real city. I.E. The City of London which is about one square mile with a population of 8500 or so. It'd be really easy to call that the real capitol city of England and therefore also the UK and therefore also the entire British empire because... it kind of is. For some reason Britain has not pursued this convoluted technicality despite it being one of their favourite pastimes and everyone agrees that the capitol city is Greater London despite not being a city.

And we've got the Vatican too and many other such examples where the true capitol could easily be a small, special zone within a bigger metropolitan area.

→ More replies (2)

20

u/kuros_overkill Oct 22 '26

"Chosen by fair dice roll" -

37

u/White_C4 Oct 23 '26

There was a tweet that "defended" that private key debacle saying that the probability of 4 is the same as any other number. While true, I reject that premise based on chance. This was intentional.

42

u/Valoneria Oct 23 '26

The one with a 4 could have been chance, the 7 other certificates having similar low entropy, does however speak against it

5

u/LawElectrical2434 Oct 23 '26

We are the pawns in a world created by one hacker with a quantum suicide machine.

→ More replies (9)

18

u/GreatArtificeAion Oct 22 '26

Did Guido Mista make this?

33

u/qqqrrrs_ Oct 22 '26

They also got 56, 66, 115, 155, 156, 230, 237

44

u/Havatchee Oct 22 '26

That's funny but like, if there's some arbitrary lime where the number is too small to be secure because a brute force attack will find it too soon, this becomes a recursive problem. It's like starting the week on Tuesday to avoid Mondays being shit, you just make Tuesday the new start of the week making Tuesdays shit. So at our arbitrary line we can just chop off the front of the list. But now the same range after our line is insecure because it's too easy to brute force.

35

u/Grouchy-Ad-8044 Oct 22 '26

If the number 4 was really picked at random that would be fine! But we all knows that it's astronomically unlikely and far more likely that some person tried to roll their own crypto and messed it up badly
```
“Not a number that starts with 4, or the number 4 followed by a few hundred random digits, just, 4... Another one is 56, and another is 115. I know, because I recovered all of them from their public certificates on my laptop just now, and it took less than a second,” Helme wrote.

Other researchers have found private keys including the numbers 66, 155, 156, 230 and 237.
```

https://www.theregister.com/security/2026/10/20/indian-certification-authority-emudhras-private-keys-compromised-one-of-them-was-the-number-4/5304312

it's essentially impossible that a bunch of keys generated by one CA just happen to have all used numbers that small by chance. Has to have been either deliberate, or horrifically bad programming

5

u/cheerycheshire Oct 22 '26

tried to roll their own crypto and messed it up badly

either deliberate, or horrifically bad programming

Afaik all those 8 broken keys are from around the same time, and if you look at them - the number was supposed to be 384-bit, but it seems someone just did <=384... Considering they're around a 1.5y old, I'd say shitty code, probably shitty spec given to LLM without giving full context (a model should catch 384 vs 384-bit when someone talks about cryptography, but if it didn't know the context of usage, it would just give whatever code user wanted).

13

u/imMute Oct 22 '26

They're all also <256, so it could also be some part of the system that truncated the key to a single byte instead of the 48 bytes it was supposed to be.

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

4

u/ramriot Oct 23 '26

In the realm of logic puzzles it's called the Unexpected Hanging Paradox.

→ More replies (18)

13

u/justforkinks0131 Oct 22 '26

context?

27

u/kratz9 Oct 22 '26

Someone cracked a root certificate key. A series of certs from a particular vendor we're found to be signed with keys that instead of being 384 bits, we're essentially only 8 bits. One of the keys was found to simply be the number 4.

→ More replies (15)

3

u/Frost-Freak Oct 22 '26

Something about weird certificates of an Indian office

23

u/E-Sandy Oct 23 '26

def random_number():
return 4 # Chosen by fair dice roll. Guaranteed to be random

11

u/UniversalAdaptor Oct 23 '26

This is why when I want a big random number I generate a random number between a really big number and that same number divided by ten.

34

u/seba07 Oct 22 '26

Security by stupidity. Would you include single digit numbers when bruteforcing a private key?

17

u/fghjconner Oct 22 '26

I mean yes, because somebody fucking up like this is far more likely than actually brute forcing a correctly generated key.

18

u/Controldo Oct 22 '26

They might already be including 0-66536 or whatever in bruteforcers. Not like it would meaningfully increase the time spent.

2

u/CadenVanV Oct 23 '26

May as well, yeah. It’s going to cost me nothing in the long run.

2

u/Ardentiat Oct 23 '26

Yes? It costs essentially nothing compared to brute forcing more secure keys and evidently some people are stupid enough for it to work sometimes

3

u/AviaKing Oct 22 '26

computers can reasonably brute-force anything up to a few thousand...

→ More replies (1)

9

u/SysGh_st Oct 23 '26

4 is as fair as any other random number though.

https://xkcd.com/221/

8

u/jump1945 Oct 23 '26

What are the chances all the *random* number would be number below 1000

13

u/fightfil96 Oct 23 '26

0.

Or 1/2374. Which is zero on anything that doesn't represent numbers with exponents

4

u/BertrandBolero Oct 23 '26

But in all fairness, the chance that the number falls between 158424000 and 158425000 is the same.

6

u/Extension_Option_122 Oct 22 '26

I am in dire need of context

→ More replies (2)

16

u/amatulic Oct 23 '26

Coincidentally, the number 4 is considered unlucky in Chinese culture, sort of like the number 13 in western culture.

7

u/psuedopseudo Oct 23 '26

For those wondering if there is a reason, it’s because the character for 4 is spoken similarly to the character for death.

3

u/Practical_Dot_3574 Oct 23 '26

Wife and I got married 10/13/2013 @ 1:00pm. Are we doomed?

4

u/Domy9 Oct 23 '26

1:00pm is also 13:00

5

u/Practical_Dot_3574 Oct 23 '26

I know, shh. Its part of the fun.

→ More replies (1)

2

u/k819799amvrhtcom Oct 23 '26

It feels to me that 4 is even worse.

13 only represents bad luck. 4 represents death.

I heard they will refuse to phone you if your phone number has too many 4s in it. I never heard that happen to the 13. Then again, 13 is less likely to appear equally often in a phone number…

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

4

u/UnpoliteGuy Oct 22 '26

No one would dare to guess anyway

4

u/nog642 Oct 23 '26

Turns out they would

2

u/id_NaN Oct 22 '26

letsencrypt doesn't let you use too weak keys at least in some contexts, so they do in fact :3

8

u/regseb Oct 22 '26 edited Oct 22 '26

2^384 == 386 (see Bitwise XOR (^))

And so, it is normal for all the numbers (4, 56, 66, 115, 155, 156, 230, and 237) to be between 0 and 386.

3

u/apt-maintenance Oct 22 '26

Git pull apikey.env

3

u/-Redstoneboi- Oct 23 '26 edited Oct 23 '26

sigh it's so ridiculously unlikely to get such a low number that it is within the same order of magnitude as the likelihood of ZWZmZWN0Y2FwdHVyZWRzaW1wbGVzdHBpbmV2aXNpdG9ycG90YXRvZXNib25ld2Vla3JvYWRz and a25vd25zdGFyZnJpZ2h0ZW50YXNrZGlzaHplcm9oZWF2eXJvcGVwYXJ0eXBvZW1hdG1vc3Bo to work as hash collision substitutes for your exact passwords for two different sites in a row, given that bcrypt uses 192 bits for its hash.

apparently the website i used generates the base64 by stringing random lowercase english words together. not that it would help or hurt your odds.

3

u/Da_Vindicator Oct 24 '26

Funny if true. Too bad it’s impossible for the audited key generation tooling and process they had to generate such a result. Literally the only way to have created “4” was to manually bypass the tools and process they alleged to have done. Then they did it 7 more times, generated values as single scalars between 0-255 ,and “whoops we didn’t catch that” yeeted them into the world for about a year.

Sometimes incompetence is just a cover for fraud.

8

u/realmauer01 Oct 22 '26

Choosing a number it if an infinite set of numbers will have an infinitely small chance of getting predicted, but it won't be 0.

10

u/sabotsalvageur Oct 22 '26 edited Oct 22 '26

“an event is said to happen almost surely (sometimes abbreviated as a.s.) if it happens with probability 1 (with respect to the probability measure).[1] In other words, the set of outcomes on which the event does not occur has probability 0, even though the set might not be empty “

The likelihood of selecting any particular integer out of the set of all integers is precisely 0, despite the fact that the set of outcomes where the condition is satisfied contains an element

6

u/StaticCoder Oct 22 '26

No the real result is that it's impossible to have a uniform probability distribution over all integers. The sum of probabilities still needs to equal 1.

→ More replies (1)

3

u/DanielHermosilla Oct 22 '26

This is partly true. Your definition would not apply in a infinite set of integers due to the identity that summing over the probability of each element must equal to one.

Since this is a discrete case, assuming each integer has a probability “p” of being chosen, then:

$$
\sum_{n \in \mathbb{Z}} P(X=n) = \sum_{n \in \mathbb{Z}} p = 1
$$

If p > 0, it diverges, if p = 0 it doesn’t sum up.

Hence, it is not possible to have a uniform distribution over an infinite set of integers.

However, going back into this problem, this is not the case. The set has a cardinality (not infinite), then it is possible to assign a discrete uniform distribution to each element.

→ More replies (3)

2

u/FacuA0 Oct 23 '26

Let me doubt on the fair 2384-sided dice roll.

2

u/speeddemon266 Oct 23 '26

I choose 66642069

2

u/Suppression_Gaming Oct 23 '26

It took less than an hour

2

u/Spare_Cupcake_8671 Oct 23 '26

Can someone tell me if something similar could happen while generating encryption keys where one of the prime numbers is 5?

1

u/duxie Oct 22 '26

37, just ask AI

1

u/botle Oct 22 '26

Likely story /s

1

u/ColdCalculus Oct 22 '26

The number is 17

1

u/Pure_Material_9235 Oct 22 '26

Mistah when he becomes a programmer.

1

u/Principle-Useful Oct 22 '26

11737769034171727117262602852672529800140303899283099876144481603279397390869192913946395492159038695470678472628285

1

u/misteryk Oct 22 '26

a number between 1-256*

1

u/GirthyPigeon Oct 22 '26

Maybe start with something in the billion range instead of 0?

1

u/JagneStormskull Oct 23 '26

The number is Pi.

1

u/GodlessAristocrat Oct 23 '26

4, 56, 66, 115? That's the combination to my luggage!

1

u/DirectConversation96 Oct 23 '26

but 4 is the first composite number

→ More replies (1)

1

u/fugogugo Oct 23 '26

why 0 not included?

also I swear I've never seen random number generator spew out 0

2

u/Total-Box-5169 Oct 23 '26

It doesn't work with Elliptic Curve, like in anybody who sees the public key knows immediately the private key is 0.

1

u/Ok_Gear8209 Oct 23 '26

Management said ship it

1

u/Roraxn Oct 23 '26

Thinkers: "So we make it more likely to be at the end of the possibilities. that way it will take a long time to brute force it."
Hackers: "We just go backwards."
Thinkers: "So we just make somewhere in the middle!"
Hackers: "We just start somewhere in the middle."
Thinkers: "We'll do all three!"
Hackers: "We've been running all three this whole time."

This is not something you can outsmart. These are very simple security methods we have in essence. The problem was always that we were too lazy to out last the heat death of the universe. We still are. But things aren't any less simple, and the tools are just getting better.

1

u/osiris_89 Oct 23 '26

Putting the P in PRNG

1

u/Misato-best-woman Oct 23 '26

I got 184,903,294,857,203,948,572,039,485,720,394,857,203,948,572,039,485,720,394,857,203,948,572,039,485,720,394,857,203,948,572,039,485,720.

1

u/DickChubbz Oct 24 '26

Unfortunately for me, my brute force strategy starts at the top and counts down