-2
$\begingroup$

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?

$\endgroup$
5
  • 1
    $\begingroup$ What you're questioning is the value of what can be considered one of the foundational component of modern cryptography. $\endgroup$
    – DannyNiu
    Jun 14 at 5:56
  • $\begingroup$ @DannyNiu So without hash functions we will not have modern crypto even if LWE was secure? $\endgroup$
    – Turbo
    Jun 14 at 17:16
  • $\begingroup$ 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. $\endgroup$
    – DannyNiu
    Jun 15 at 0:52
  • $\begingroup$ 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. $\endgroup$
    – DannyNiu
    Jun 15 at 0:55
  • $\begingroup$ @DannyNiu " why you believe hash functions are redundant".. that's exactly the question here. $\endgroup$
    – Turbo
    Jun 15 at 15:47

1 Answer 1

1
$\begingroup$
  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)

$\endgroup$
7
  • $\begingroup$ so if we don't have hash functions, we cannot verify signatures and therefore we can break the internet? $\endgroup$
    – Turbo
    Jun 13 at 21:13
  • $\begingroup$ ".. 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? $\endgroup$
    – Turbo
    Jun 15 at 15:52
  • 1
    $\begingroup$ @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... $\endgroup$
    – poncho
    Jun 15 at 15:57
  • $\begingroup$ I see. Assume factoring or LWE is a OWF. How would one create a hash function from this? $\endgroup$
    – Turbo
    Jun 15 at 23:46
  • 1
    $\begingroup$ @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" $\endgroup$
    – poncho
    Jun 19 at 14:18

Not the answer you're looking for? Browse other questions tagged or ask your own question.