r/programming • • 9d ago

A collision has been found for 38-step (a reduced round variant of) SHA-256

https://eprint.iacr.org/2026/2913
1.0k Upvotes

109 comments sorted by

641

u/segv 9d ago edited 9d ago

tl;dr because this is reddit and folks barely click the links:

We give a collision for 38-step SHA-256 from the standard initial value, to our knowledge the first. The attack is a two-block differential attack whose message differences are in the same words as in the 38-step semi-free-start collision [...] The tables take 7.4 GB, and finding the fixed state words took 52,300 vCPU-hours. A search of 53 GPU-hours found the collision after about 10% of the expected work.

AI-use designation: Predominantly AI-generated work. This work was developed through iterative research and writing by Anthropic Claude agents, mainly Claude Opus 5.5, under the author’s direction. The author takes responsibility for the results and presentation.

--

The search for the core took 52,300 vCPU-hours on Arm machines, and the table 42 vCPU- hours. [...]

--

The search ran on NVIDIA RTX PRO 6000 Blackwell Server Edition GPUs (128 MB of L2 cache), rented in the cloud. [...]

--

[...] The expected time is 254.8 calls of the compression function, with 257.5 table accesses; on the GPU used, an expected collision takes about 440 GPU-hours of kernel time. The characteristic does not extend beyond 38 steps (Section 3.1), so a collision for more steps needs a different characteristic.

--

 

My take is - cool, but the sky is not falling just yet. This doesn't sound like something that could be used for, for example, forging a TLS certificate.

Also a reminder to state the obvious - hash function maps from infinite space (any input of any length) to a very finite space. It's not a question if there will be collisions, but how much work is needed to create one.

153

u/bwainfweeze 9d ago

How much there is to create a useful one.

Changing a contract to add or remove a “not” in an obligation, useful. Turning it into line noise, or a musical, not useful. Maybe for a DOS attack.

81

u/Omer-Goldzweig 6d ago

Hey :) author here. Thanks for the accurate summary!

One important detail worth clarifying is that the 52,300 vCPU-hours were a one-time precomputation cost. The results of that computation can be reused to find arbitrarily many additional collisions.

For context, the entire 38-step research project cost around $5,900, including the precomputation. Finding an additional collision would cost roughly $770 in expectation, and take 440 GPU-hours. The actual collision we found cost around $95 (we got lucky).

-1

u/davvblack 5d ago

how much would finding a second collision cost?

9

u/Omer-Goldzweig 5d ago

The expected cost would be 770$

1

u/rincewind007 4d ago

Would that 770 for any target 38, or only to find one more to that specific target?

1

u/Omer-Goldzweig 4d ago

If by “target” you mean a chosen digest, then neither. About $770 is the expected cost of finding another pair of distinct messages with the same digest under 38-step SHA-256. We don’t control that digest. Hitting a chosen digest would be a preimage attack, and finding a third message with our published digest would be a second-preimage attack.

43

u/barmic1212 9d ago

I'm not sure to understand they are reproduce a given hash or they are produce 2 payloads with same hash ?

42

u/gwillen 9d ago

The second one is always easier, so that is always what people are attempting first. The threat is that you make one good and one bad payload with the same hash, and show them to different people / at different times. For example, you get a legitimate https certificate (for your own website) signed, then you transfer the signature to a malicious certificate (for someone else's website) with the same hash.

4

u/These-Maintenance250 9d ago

the easy one is practically useless though

8

u/ablativeyoyo 8d ago

A collision can have a serious impact. Back in 2008, an MD5 collision was used to create a rogue CA certificate.

-9

u/sockpuppetzero 9d ago

Tell me you know nothing about cybersecurity without telling me you know nothing about cybersecurity.

The comment you responded even sketched a scenario of how this "easy" one can be deployed (and has been deployed!) in practical attacks.

Now you'd be forgiven for not knowing much about how certs work, but your comment really suggests to me that you aren't accustomed to dealing with adversarial liars, or understanding what kinds of things can be effected with what kinds of lies, which is a general requirement for any kind of competent security analysis.

10

u/These-Maintenance250 9d ago

you sound like an enthusiastic highschooler. the sketched out scenario is not the "easy" one, it's the hard one.

the easy one is finding some pair of messages that produce the same hash. it's just a collision. it's a theoretical weakness and it's practically useless.

crafting a malicious message that produces the same hash as the real message is the hard one. that's the preimage resistance and that's what you need to be able to forge a fake certificate.

now kindly fuck off.

-11

u/sockpuppetzero 9d ago

Think again, the sketched out scenario is a collision, not a preimage.

5

u/Behrooz0 8d ago

The dozen downvotes on your comments just tells me about the state of education. We're fucked as a species if programmers can't tell how hashing works. This is a sad day to have a brain.

3

u/sockpuppetzero 8d ago edited 7d ago

Oh, I am very well aware. Cybersecurity is the worst this way. Absolutely filled to the brim with posers and idle opinions, and most people (even those with tech skills) can't (or won't) tell the difference. The number of times I've had this exact kind of conversation on reddit where I get heavily downvoted for obvious, objectively correct takes (on cybersecurity mostly, but also sometimes when trying to spread a little math among techies), well it's a lot. It is consistent.

Whatever, it might sting for a fraction of a second, but at this point I expect it, and I do not care about my internet points.

In less dysfunctional situations, the number of times I've explained the basics of what a public key signature actually does, namely ties the integrity of a message back to the integrity of a public key, I've repeatedly had all kinds of techies act as if this is a major revelation. (At least they are finally starting to see the real issues? But this is so basic, oof.)

I also think cybersecurity is kind of a worst-case study in all the standard failures of tech culture, especially the adversarial "fake it till you make it, everybody else is wrong" posturing that seems to be nearly universal. For whatever reasons, some of which I sorta understand, those failures render the state of cybersecurity to be completely and utterly dysfunctional.

As for why people don't get it, I dunno. I grew up with a brother who is a malignant narcissist and pathological liar, and our non-diagnosed autistic parents were his biggest enablers of his abuse of me, via their resolute blindness to his worst behaviors. My father in particular consistently and aggressively shut down any kind of measured response to my brother's aggressions, and often shuts down even the slightest acknowledgement that it even happened. My brother and Donald Trump remind me a lot of each other, and my brother and I are permanently estranged unless he serves multiple years in prison. The fact that I get it probably does have a lot to do with that.

Also, I was lucky enough to take an intro to number theory class as an undergraduate in which I did absolutely learn the basics of how RSA works and where I first became interested in PKI, which was immensely helpful. I've been peripherally interested in cryptographic hashing and password storage, since before I even took number theory. I've been interested in Merkle trees ever since git was first released.

The most charitable interpretation is that the poster of the comment I originally responsed to might be vaguely familiar with cryptographic hash functions in the realm of password hashing, where collisions are typically no big deal. That might be true of most key derivation applications as well. But of course any time integrity is in play, whether that's git, pki, blockchain, or whatever, collisions give dishonest actors the technical means to tell more convincing lies.

1

u/Behrooz0 8d ago

Yeah. I stopped explaining things a while back after a few dozen times this happened. I also think this will get worse because the AIs out there are also spreading misinformation like crazy and giving these guys confirmation bias.

-4

u/These-Maintenance250 7d ago

lmao so funny to see you two jerk each other off

1

u/sockpuppetzero 7d ago edited 7d ago

Sure, all the cryptographers are very interested in collision resistance, but it's a completely unimportant bullshit property. Also, I'm an idiot who doesn't know anything about cybersecurity. And, you ain't five years outta high school, whereas I'm old enough to have sex with your parents without it being icky if not outright illegal. That's what you've told me so far. Got it.

-1

u/barmic1212 8d ago

I'm pretty sure that a large proportion of the downvotes has more to do with the judgmental tone of the comment than with education. When someone starts a comment with "Tell me you know nothing about...", it's probably not to share knowledge. That kind of tone tends to provoke resistance rather than encourage learning.

I could draw equally pessimistic conclusions about the state of communication, but that would probably be missing the point too.

3

u/sockpuppetzero 7d ago edited 7d ago

Trust me, these kinds of responses occur no matter what tone you take. It is the act of pointing out the mistake or suggesting an improvement that, with rare exceptions, draws the most ire and even downvotes (if relevant). And sometimes when somebody says something exceptionally stupid which is honestly rather rude towards the experts, it deserves a rude response.

I wish things were another way. I often unilaterally disarm and am rarely rewarded for doing so. In fact, I have been tangibly raked over the coals for doing so. This is why I hate tech culture in general, but especially when it comes to tech culture's attitudes towards cybersecurity, cryptography, mathematics, ethics, and the humanities.

Also, you assert this isn't your fight, but I'd point out that though sometimes reluctant to do so, people are capable of observing the world around them and understanding it for themselves. I'd point out that the original paper is about cryptographic collision resistance in a journal with an expert editorial board. The commenter I originally responded to is asserting that the entire concept of cryptographic collision resistance is unimportant. Which do you think is more likely true, and why?

1

u/barmic1212 7d ago

OK, I’ve just realised he was quite forceful in his comment and that set you off. My approach when that happens to me is to remain polite, because even if I’m replying to him, it’s the other readers I’m trying to convince; and if I start getting aggressive, it’s because I’ve stopped caring about the upvotes and downvotes. Whatever happens, I hope you have a lovely day.

1

u/sockpuppetzero 7d ago edited 6d ago

I'm saying, the downvotes happen (either literally on reddit or metaphorically in other contexts) even if you are trying to be very polite.

0

u/sockpuppetzero 5d ago edited 5d ago

Also, though I really like some of the comments I wrote, I really don't care about this specific incident. While mildly amusing, I've been here many times before. Not even once throughout this entire endeavor were my emotions even slightly raised. It's like trying to embarrass a doctor by talking about sex: it's almost certainly not gonna work.

Now, do realize I am no doubt deeply frustrated at the larger cultural context of which this is a prime example. And how our "abstinence only" approach to cryptographic education makes these problems commonplace and unsolvable. And how all of this would start getting better if people were to slow down, and take the time to observe and think and try to understand before sharing an idle opinion, be honest about the limits of your own knowledge, and acknowledge and have empathy for the experiences and expertise of others.

0

u/Behrooz0 7d ago

So being judgemental towards people who spread misinformation is worse than the act itself.

0

u/barmic1212 7d ago

This isn't my fight, and I haven't upvoted or downvoted anything. But if you post a comment to pick a fight, don't be surprised when the fight happens. Your comment clearly reads as looking for a confrontation more than sharing information, and it's harsher than the comment you replied to called for.

0

u/Behrooz0 7d ago edited 7d ago

Why the fuck do I even care what you think. Actually, thinking about it I rather less people understand security. I do ransomware recovery for a living. the more noobs out there the better it is for business. good luck out there.

15

u/oneeyedziggy 9d ago

Those sound the same, unless you mean reproduce the hash of a specific payload vs find any two payloads whose hashes match... 

14

u/birdbrainswagtrain 9d ago

This is the difference between a collision and a preimage.

10

u/Piisthree 9d ago

I believe they are asking if the collision that was found was generic, so could be any two arbitrary payloads, or if they just found one specific case where two different payloads produced the same hash. My understanding is the latter, which is basically a nothing burger, is the case here. The former would be a BIG problem if the compute needed was any reachable size.

11

u/cauchy37 9d ago

They're asking which preimage resistance has been broken.

https://en.wikipedia.org/wiki/Preimage_attack

3

u/barmic1212 9d ago

What is the security threat to create a collision between 2 payloads in your own? It's a real question. I see lot of case to produce a payload with a given hash, to replace a payload by your own

18

u/philh 9d ago

It's definitely a smaller threat. But you could e.g. silently replace a benign git commit with a malicious one after it's been checked.

9

u/ArtOfWarfare 9d ago

I give you a document agreeing that I’ll give you some bitcoin. You sign that hash in agreement. I had another document where you agreed to give me bitcoin instead, and it’s got the same hash and your signature is just as valid on it.

I can imagine some electronic contracts work something like that.

1

u/oneeyedziggy 9d ago

I was just asking for clarification b/c the two cases you stated could reasonably be stated as identical...

But given your new questions: IF you knew someone were using the reduced security 38 step hash for something like generating keys for a hashmap or anywhere else conflicts could corrupt data, you might be able to break their system in an advantageous way...

7

u/prehensilemullet 9d ago

A very finite, but also very large space, which is why it’s been hard to usefully break

-13

u/_TheDust_ 9d ago

Bit sad that this was all done with AI. Not long from now, we will just have AI generated research citing other AI generated research as sources and humans have no clue what’s going on anymore

12

u/EnragedMikey 9d ago

People already don't have a clue, "AI" hasn't changed much in that regard.

8

u/amakai 9d ago

There is truth in OP comment though. Before AI you at least were able to collect a group of people that were able to explain anything we built (different people for different pieces). With AI producing 10 000 page long proofs, and us relying on those proofs in the future, we enter an era where humans will become useless without AI.

1

u/pidgeottOP 5d ago

We're currently in an era where the majority of humans would be useless without [insert technology]

Of you sent human being back 50k years 99.999% of us would die within 3 days because we currently rely on technology to feed, house, and warm us that we would be useless without.

You're literally just describing the progression of society through technology.

1

u/amakai 5d ago edited 5d ago

You are missing my point. Before AI you were able to find an expert that would explain you any specific thing. There would be an expert to explain a physics law, or a math theorem, or why this specific bridge design is chosen in this situation. Sure, most people would be clueless - but you were able to find/hire someone who would know that.

With AI, you would end up having a, for example, bridge design that literally not a single human in the world would be able to explain. And even if they could - the design would be based on formulas that have 100k page proofs, that, again, not a single human in the world would understand.

There's fundamental limit to human brain. To invent a "new thing", you need to fully comprehend relevant "old things", as f(old things) = new thing. But what if to discover a specific new thing, you need such an amount of knowledge that is physically impossible to fit into human head? And what if we continue making more and more such discoveries, until everything around us is impossible to be invented or explained by any human?

We will basically be living in a world of "alien technology".

0

u/Own_Back_2038 9d ago

I don’t see how AI citing other AI generated research makes anything more difficult to understand for humans. Research is meant to be read

-2

u/OMGItsCheezWTF 9d ago

Why do you think companies like Anthropic and OpenAI are doing so much work in fingerprinting LLM output? It is not some magnanimous gift to faculty staff worrying about people cheating. It's to prevent model collapses where models are trained predominantly on existing model's output. Non LLM input can then be given far more weighting in training data.

34

u/bwainfweeze 9d ago

I am still after all of these years trying to wrap my head around how flaws in SHA-512 make it less secure than SHA-384.

22

u/odnish 9d ago

Because SHA-512 uses the full state directly in the output, it's vulnerable to length extension attacks but SHA-384 isn't because you can't reconstruct the state from the hash output.

235

u/idimetrix 9d ago

31 steps was the best anyone had in 2024. 38 now, full SHA-256 is 64. Not panicking yet but that's a big jump.

65

u/bwainfweeze 9d ago

The state space of rounds is exponential, so you need to combine flaws to reduce the branching factor. The returns get smaller for more rounds which is why we choose so many rounds in the first place.

You still can’t reliably fuck with SHA-1 but nobody wants to rely on it in case someone knows something we don’t. Because it’s a near enough thing.

15

u/FishDawgX 9d ago

Being exponential, the gap between 2^31 and 2^38 (or between 0 and 2^38, for that matter) is tiny compared to the jump need to go from 2^38 to 2^64.

9

u/amaurea 9d ago

That's why he said "so you need to combine flaws to reduce the branching factor", isn't it?

3

u/Omer-Goldzweig 6d ago

Yep! And the 31-step record stood since 2013! Earlier this year, Zhang et al. published a theoretical collision attack reaching 37 steps, and my research produced actual collisions for both 37 and 38 steps. IIRC, there are now theoretical attack on 39 and 40 steps (though both far from feasible). That being said, progress in cryptanalysis is rarely linear, and I wouldn't extrapolate this to a break of full SHA-256 just yet :)

1

u/JonathanTheZero 7d ago

The same guy published a 37 step collision a few months (I think?) back, so it's not one big jump but rather accelerating pace

-12

u/havok_ 9d ago

Cracks are appearing

62

u/Techrocket9 9d ago

They called me mad for wanting to start the migration to SHA3 in 2019.

39

u/bwainfweeze 9d ago

I made a whole industry pick SHA2 right after the first results came in for SHA-1. And 2K RSA keys. They were mad about that because some idiot bought a lot of smart cards with 1K key capabilities that nobody ever used and they thought we could use it. Three years too late sorry.

18

u/floodyberry 9d ago

sha2 is still quite secure (and default sha3 with 24 rounds is fairly inefficient), so great call by them

2

u/funny_falcon 5d ago

SHA3 is efficient implemented in hardware. But in software it is really slow because uses unusual constructions specifically targeted for hardware implementations.

Same for AES: it is much slower than ChaCha being implemented in software because ChaCha relies on convenient arithmetic and is able to use SIMD. But being builtin into processors AES has unbeatable performance.

I believe, SHA3 round function will be builtin in future processors and will be incredibly fast.

5

u/svick 9d ago

Git still uses SHA1.

33

u/_verel_ 9d ago

Which in practice doesn't matter. Git supports sha 2 but no one cares

11

u/Booty_Bumping 9d ago

It matters mainly for performance. Git's SHA-1 collision detection algorithm works, but it's slow, which affects git forges that accept pushes from the public.

I'm not super convinced this is a good enough reason to break everything and switch to SHA256, but the git devs seem committed to the transition.

18

u/backfire10z 9d ago

Hashes in git are not really a security risk

6

u/sockpuppetzero 9d ago edited 9d ago

It's also not not a security risk: sure it might not matter to certain specific threat models, but SHA-1 collisions would allow a dishonest actor to tell lies about the codebase and its history. Which, is definitely relevant to some kind of threat models in some kinds of situations, so hash collisions are anything but desirable.

5

u/FyreWulff 9d ago

I think that one is fine, Git is not a forensic tool or tracker (even though people tend to treat it like one)

2

u/Booty_Bumping 9d ago

Not quite. They use SHA1DC. It detects whether an input looks like a chosen-prefix attack, and switches to another algorithm if so.

1

u/creeper6530 9d ago

How does it detect tho? Heuristics can be cheated 

6

u/Booty_Bumping 9d ago

It's black magic to me, but apparently they guarantee a false negative rate of 0% and a false positive rate of 0.0000000000000000000000000808%. The way I've heard it explained, the internal state fuckery required for a chosen prefix attack is very obvious to recognize.

2

u/svick 9d ago

As I understand it, they can reliably detect the known attacks.

15

u/Omer-Goldzweig 6d ago

Hey! I’m the author of the paper. Really cool to see this being discussed here! 😄
As several people have already pointed out, this result has no immediate security implications for full SHA-256.
In my opinion, a particularly interesting aspect of this research is how much of it was carried out by AI agents. I wrote a more accessible blog post about the research, how the collision was found, and the role AI played in the process: https://medium.com/@omer_72679/finding-the-first-38-step-sha-256-collision-with-ai-agents-5abff3b360d9

Happy to answer any questions!

9

u/Takeoded 9d ago

Best anyone has on BLAKE3 is 2 rounds.

15

u/Motor-Concentrate788 9d ago

Its newer and has a much smaller target on its back

4

u/Motor-Concentrate788 9d ago

Nothing to be worried about, still a long way off from the full 64 rounds. And even if at some point it gets close, we still have time to transition to SHA3 before SHA2 breaks.

6

u/reddah 9d ago

Quick question: Why do we even use hashes for certificates?

I mean a certificate is pretty small (a few ks), so not sure why it would need to be reduced further.

Hashes were invented for other uses:

  • file checksums (hw integrity, not deliberate attacks)
  • network transmission checksums (same, data integrity)
  • quick storage/search where the data is still verified afterwards (i.e. collisions are expected)

When using them for signing small stuff, collisions will always occur. If a bad party needs SOME signature, the birthday paradox all but guarantees they will find one. See Stuxnet.

46

u/neos300 9d ago

No, the birthday paradox does not imply that a collision will be found. Sha-256 was specifically designed so that naive birthday paradox collisions were extremely unlikely and there's no reason to believe one will be found anytime soon.

Signing a hash in a certificate rather than just signing the certificate itself avoids some of the RSA footguns like padding.

-16

u/reddah 9d ago

Salting could solve padding. Besides RSA is kinda old and not quantum-resistant AFAIK.

10

u/Thelmholtz 9d ago

Certs don't need quantum resistance as you can't harvest now decrypt later. I mean you can but there's no attack vector from doing it.

Indeed old and quantum fragile though.

-2

u/bwainfweeze 9d ago

It troubles me how much stuff rests on the back of AES.

1

u/Equal-Wall9006 4d ago

Malleability is a problem with some crypto systems and padding is very much needed. Salting doesn’t solve the malleability of RSA, different types of padding like OAEP and PSS do

29

u/cym13 9d ago

IMHO the best advantage from using a hash is that it provides a virtually unlimited input size but a fixed output size. RSA is limited in the quantity of data it can sign: it cannot be more than the public key size (and even less than that due to padding etc), so a "few ks" is already a lot for RSA signatures, and most importantly how can you be sure in advance that the certificate you want to sign is small enough to be signed with your key? What if it's too big, do you change keys just for that? Using a hash avoids all these questions: the size of what you sign is fixed so there's no guesswork involved.

1

u/ScottContini 9d ago

This is the correct answer.

-14

u/reddah 9d ago

If the cert size is x kiB, then you just need a signing key that is a bit bigger.

Using a hash guarantees that there will be collisions.

Bigger things can be signed in chunks, I guess, each chunk signed. Not optimal, but still better than collisions on certificates.

12

u/Dragdu 9d ago

If the cert size is x kiB, then you just need a signing key that is a bit bigger.

And you also need a way to sign trust chain for the new signing key.

7

u/cym13 9d ago

If the cert size is x kiB, then you just need a signing key that is a bit bigger.

The problem isn't (just) that the key has to double in size each time (which is not free), it's also that you have to manage the case where your key isn't big enough. Say you have your private key, it's been included in the PKI etc, and you go to sign your certificate and it's too big… Cool, now you have to request a new key that nobody has seen before or has any reason to trust just because your certificate is too big. So you go to integrate it in a PKI, but that means it's got to be signed by another key, so that key has to be big enough to hold the chain, and what happens if it's too big? You create a new root key just for fun? Key management is hard enough as it is, we don't need this.

Using a hash guarantees that there will be collisions.

Not really no. Or rather the chance of collision on a SHA256 is so small that if you care about that you really shouldn't get anywhere near a computer. I'd say the chance of a collision is astronomically small, but astronomical scales are actually much much smaller than what this is. Consider that every website you use, such as your bank's, relies on a session secret to authenticate your activity (often in the form of a cookie, but the same principle applies with other systems). The chances of collision are similar to the chances of someone just guessing your session secret. If they did they'd have access to your bank account and everything that goes with it. Are you scared? No? You shouldn't be because the chances of guessing correctly are impossibly small, and for the same reason you shouldn't care about the risk of accidental collision from using a hash.

Chunks have their own problems, I'm not even going to start with it, chunking anything always comes at a huge cost and many difficulties, there's really no reason to do that, just use a proper hash.

-4

u/reddah 9d ago

That's what they said for MD5, then SHA.

Also, for some attacks, you don't need to guess a specific hash. Any signed hash will do for a collision (e.g. pretend some driver is signed)

5

u/valarauca14 9d ago

Using a hash guarantees that there will be collisions.

you're technically correct, the best kind of correct

You're wrong because communication requires structure which limits the complexity of the message below the maximum information carrying capacity of the # of bits. Which is to say we don't communicate in xKiB bursts of quantum random line noise.

9

u/Mr_ToDo 9d ago

Wasn't stuxnet a stolen private key thing?

0

u/reddah 9d ago

I remember reading about a birthday paradox having been used to find some collision to sign some certificate that would have been auto-accepted by windows.

There are way too many certs in windows, easier to find some collision in a bigger pile.

4

u/ScottContini 9d ago edited 9d ago

Not the birthday paradox. They used the differential paths found by Wang to create collisions. Publication. but yeah likely the Israeli government used this technique in Flame attack.

0

u/bwainfweeze 9d ago

There was a fun bug in windows once where if you made a cert chain long enough it would be treated as valid.

3

u/reddah 9d ago

That's an implementation bug. Typical for Windows as well...
A real implementation would have some guardrails.

0

u/eJaguar 7d ago

stuxnet was a shitpost for the normies.

the targetted parties involved, were almost universally compromised neurologically already. doing it through the computers, was not necessary, but some israeli somewhere got to be "cyberguy" for a bit so that's cool

6

u/Cienn017 9d ago

RSA has a limit on much data you can encrypt, RSA4096 for example is 512 bytes, it's also very slow.

that's why you should always use AES or SHA with RSA.

-4

u/reddah 9d ago

A cert is small, it can be signed piecemeal in few iterations.

In this case, you only depend upon the security of the signature, not the hash too.

2

u/Some_Koala 9d ago

Hashes mostly mean the certificate never transits over the network. Network packets can be caught, that's insecure.

They are not used to save space. If we thought SHA-256 would soon be broken, we would use SHA-512 or something like that.

Birthday paradox for 256bits of entropy is still a very very small chance.

3

u/bwainfweeze 9d ago

No you’re mashing up hashing and public key encryption. PKI is where the dynamic of proving you know something without revealing it comes in. The hash has to be public, because the sender and all observers have to be able to arrive at the same value otherwise there is no point at all. What you send is a signed hash, and enough information about your public key for the recipient to acquire a copy.

2

u/Some_Koala 9d ago

Signing works by basically encrypting with a private key while the public key makes decryption possible though no ?

2

u/bwainfweeze 9d ago

Encrypting a hash, specifically. Even PGP used the private key for encrypting a symmetric cypher key instead of the entire message.

Only including the encrypted hash is more of a matter of transport and storage efficiency. And some signing tools which deal with multiple files, sign a hash of a list of hashes, with the list sent in clear text.

2

u/reddah 9d ago

Certs do need to transit the net to do their job (signing/encrypting the web traffic etc)

The idea of the birthday paradox is that you need to find ANY collision with a real signature to have your stuff signed. You don't need to forge a specific signature, just any authorized signature.

3

u/Some_Koala 9d ago

I know what the birthday paradox is. It scales with the square root of entropy (kinda). So still huge.

Yeah actually you're right for the cert. I still don't really gt what you're suggesting in the earlier comment ?

From my (limited) understanding, the cert is made by hashing some information about the website (like the URL and a few other stuff), then encrypting that using the server's and the authority's private key.

Then when someone tries to connect, the server sends that. The client gets the info (like the URL), hashes them, decrypt the encrypted hash sent by the client using the authority's public key, and compares the two.

I guess you could encrypt the URL and information directly instead of the hash, but it would be kinda annoying the get a variable-length certificate in that case ?

1

u/Equal-Wall9006 5d ago edited 5d ago

One motivation - hardware elements on constrained devices cannot sign arbitrary length and typically will be limited to a very small input. Hell, even the generation of larger RSA keys can take minutes, these devices and elements are very limited.

Analytical attacks are the way to go anyways. A generic trait like the birthday paradox is always known and always considered

1

u/reddah 4d ago

What's a "constrained" device nowadays?
Landfills are full of very capable devices today.

2

u/Equal-Wall9006 4d ago

It’s in the eyes of the beholder. With that being said, security elements have very little resources available

1

u/reddah 4d ago

Check the device, don't ask the middle managers about quality or security. They only want those on the sales brochure, not actually tested or enforced.

2

u/Equal-Wall9006 4d ago

This wasn’t my point at all. Constrained devices exist, TPMs, limited TEEs exist and have a huge financial incentive to be made simple - very little memory, almost or no storage at all. Cryptographic researches are typically very aware of hardware limitations and design crypto systems with that in mind

1

u/Round_Ad_5832 9d ago

what about SHX?

1

u/funny_falcon 5d ago

Strange decision to use message text as a key and IV as plain text for Spec call in a round. What led to this construction? I'd rather expect IV will be used as part of key and message text as a message text.

Overall what SHX construction wins over convenient cipher-to-hash chaining modes? Convenient modes need only one cipher call per block, and SHX calls Speck twice.

Really strange thing.

1

u/bascule 7d ago

FWIW: we’ve broken 7 rounds of ChaCha but that doesn’t mean ChaCha8 is broken

1

u/liquidorangutan00 5d ago

i thought universal hashing was guaranteed to only have 2 collisions?

1

u/Alexakitsuneme2 2d ago

I need help with cyber criminals on my accounts