Computational requirements for breaking SHA-256? Let's define "breaking" a hash function $H$ as being threefold (corresponding to the main properties of a cryptographic hash function):


preimage attacks to get $m$ knowing $H(m)$
second-preimage attacks to find some $m'\neq m$ knowing $m$ so that $H(m)=H(m')$
collision attacks to find $m_1,m_2\neq m_1$ for $H(m_1)=H(m_2)$


I wonder how much computational resources would in theory be required for performing each attack on SHA-256. I have little experience with complexity theory, but could not find much literature on this.

My approach was this: in general, there are $2^{256}$ possible hashes. Since there is no known structural weakness in SHA-2, brute-forcing a preimage is the only option and should take $2^{255}$ trials (half of the hash space). However most refer to $2^{256}$, is that because that means certain success rather than expected time needed?

A collision takes $2^{128}$ steps with a Birthday attack. I could not find figures for the second-preimage attack.

First of all, are my assumptions above correct? What would the complexity of the three attacks be?

I am also curious what "unit" a number like $2^{256}$ implies - is it something like floating-point operations that would be needed to run?

I am aware that SHA-256 is deemed secure given today's computational power. is it likely that increasing computer capacities (classical, not quantum computing) will become a threat to this over the next years?
First of all, are my assumptions above correct? What would the
complexity of the three attacks be? I am also curious what &quot;unit&quot; a
number like $2^{256}$ implies - is it something like floating-point
operations that would be needed to run?

Almost, this number is the number of times the primitive (in this case SHA-256) must be called to break the algorithm (e.g. find a preimage or collision).

I am aware that SHA-256 is deemed secure given today's computational
power. Is it likely that increasing computer capacities (classical,
not quantum computing) will become a threat to this over the next
years?

No, SHA-256 will not be broken because of computational power. When you attack a hash function using brute force, the computation will take millions of years. $2^{128}$ operations is just too large a number.
However, most people expect that SHA-2 will be broken in the next 100 years. That is how the first preimage/collision will be found. What this means (in the case of collisions) is that somebody devises a smart algorithm which can find a collision without needing to execute this large amount of operations. Recently, Marc Stevens et al published an attack on SHA-1 which only needs
$9\,223\,372\,036\,854\,775\,808 \approx 2^{63}$ operations. This number is small enough to be searched through by Google's awesome computing cluster (and consequently the first known SHA-1 collision has been found).