0

Getting curious about SHA-256 cycles (what happens if you hash a value repeatedly), I came across this question:

Cycles in SHA256

The first answer suggests that using a 7-bit hash, it's possible to find a value that hashes to itself. See the red dot which isn't part of a loop but on its own:

7 bit SHA256 hashing

I assume from the diagram, this means if I apply the 7-bit hashing function to this value, the output matches the input. So my question is if such values are possible in SHA-256, and if anyone knows what value(s) hash to themselves or has ever found one of those values.

Maarten Bodewes
  • 96,351
  • 14
  • 169
  • 323
azoundria
  • 173
  • 1
  • 7

1 Answers1

1

This question here gives the probability of such a value, called a "fixed point" existing as 63% (based on assuming a "random" property of SHA256):

Cryptographic hash where the hashing function input is similar to the result

There is at least one such "fixed point" of the compression function that the SHA256 algorithm uses. An example is here:

Fixed point of the SHA-256 compression function

As explained in that answer, "[e]asy to find fixed-points are a known property of this construction", therefore this isn't a problem.

azoundria
  • 173
  • 1
  • 7