Score:-2

What is the critical importance of SHA and other hash families?

ru flag

Assume integer factoring, discrete log are classical safe and LWE, McEliece etc are quantum safe. This question is only about SHA and hash families in general on why we need them if we have pkc primitives.

  1. What role does SHA256 or other hash families play? Why are they needed when we have LWE, McEliece etc?

  2. What happens if only SHA2 family including SHA256 is broken? Will we still have online finance and the internet?

DannyNiu avatar
vu flag
What you're questioning is the value of what can be considered one of the foundational component of modern cryptography.
Turbo avatar
ru flag
@DannyNiu So without hash functions we will not have modern crypto even if LWE was secure?
DannyNiu avatar
vu flag
Well, it's not that absolute. I mean, if you have reality distortion field like great entrepreneurs such as Steve Jobs, then you can make modern cryptography radically different; if you don't, then JUST LEARN, before asking underthought questions like this one.
DannyNiu avatar
vu flag
I'm voting to close this question as needing details now, as you haven't explained why you believe hash functions are redundant, or proposed alternative constructions that can fill in on its role.
Turbo avatar
ru flag
@DannyNiu " why you believe hash functions are redundant".. that's exactly the question here.
Score:1
my flag
  1. What role does SHA256 or other hash families play?

A cryptographic hash function (such as SHA256) takes an arbitrary long input, and converts it into a fixed length string such that:

  • Given an output of a hash, it is hard to find an input that hashes to that ("preimage resistance")

  • Given a string, it is hard to find a different input where both inputs hash to the same value ("second preimage resistance")

  • It is hard to find two different inputs that hash to the same value ("collision resistance")

A hash function is a quite useful tool when creating larger cryptographical objects. The standard example is signing: public key signature algorithms typically can't take arbitrary length inputs, while we might want to sign quite large objects. What we do is apply the hash function to the object, and have the actual public key algorithm sign the hash - because it is hard to find a second object that hashes to the same value, then we know that if the signature verifies (and the hash is what it was originally), we know that it also must be the original large object.

Why are they needed when we have LWE, McEliece etc?

That we very much a "why do we need screwdrivers when we have hammers" - it's because they serve different functions

  1. What happens if only SHA2 family including SHA256 is broken? Will we still have online finance and the internet?

Well, that's actually happened before; with both MD5 and SHA-1, collision resistance has been broken - the industry migrated to other hash functions (chiefly SHA-2). What we'd do is migrate again, probably to SHA-3 (which is quite different internally - it is quite unlikely that the same cryptographic finding would apply to both SHA-2 and SHA-3)

Turbo avatar
ru flag
so if we don't have hash functions, we cannot verify signatures and therefore we can break the internet?
Turbo avatar
ru flag
".. that's actually happened before; with both MD5 and SHA-1,".. my question is what if we dont have hash functions at all or not use them at all? can we still have internet and digital finance?
poncho avatar
my flag
@Turbo: well, if we have one way functions, we are likely to be able to create a hash function (although possibly not ones as efficient as the hash functions we currently use) If we don't have a one way function, well, it turns out that we don't have any computation cryptography...
Turbo avatar
ru flag
I see. Assume factoring or LWE is a OWF. How would one create a hash function from this?
DannyNiu avatar
vu flag
@Turbo You can't take a random primitive, call it an OWF, and make a hash function out of it. It's like asking if we have areoplanes, what the need for road/water vehicles is - Sure, they both achieve transportation/cryptography, but their capability and usage premise are different. If you have further confusion, I'd propose we continue the discussion in [chat](https://chat.stackexchange.com/rooms/784/the-side-channel)
Turbo avatar
ru flag
@poncho Could you elaborate on "well, if we have one way functions, we are likely to be able to create a hash function" with an example (say through one of the standard available primitives assuming it is one way)?
poncho avatar
my flag
@Turbo: well, one way functions aren't all that far from things that act like random oracles (that is, if we have one, we're likely to have the other), and once we have something that acts like a random oracle, we have hash functions. This is not a proof - hence of my use of "likely"
I sit in a Tesla and translated this thread with Ai:

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.