Do cryptographic hash functions reach each possible values, i.e., are they surjective?

后端 未结 5 2107
谎友^
谎友^ 2021-01-31 03:48

Take a commonly used binary hash function - for example, SHA-256. As the name implies, it outputs a 256 bit value.

Let A be the set of all possible 256 bit bina

5条回答
  •  感动是毒
    2021-01-31 04:12

    Not necessarily. That would depend on the hash function.

    It would probably be ideal if the hash function was surjective, but there are things that're usually more important, such as a low likelihood of collisions.

提交回复
热议问题