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

后端 未结 5 2007
谎友^
谎友^ 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:18

    Not necessarily. The pigeonhole principle states that once one more hash beyond the size of A has been generated that there is a probability of collision of 1, but it does not state that every single element of A has been generated.

提交回复
热议问题