# Hash collisions

The hash of a Condensation object is calculated by applying the SHA-256 hash function on the object's content. SHA-256 is a cryptographic one-way function, compressing a byte sequence of arbitrary length to a 256-bit sequence.

Quite obviously, this is not a one-to-one function: different byte sequences may yield the same hash, and thus produce a collision.

For all we know, SHA-256 has excellent collision resistance. The probability that two arbitrary byte sequences yield the same hash is only 1 in 2^{256} (≈ 1.2 × 10^{77}), and no efficient algorithm is known to construct sequences with the same hash value.

If everyone on earth (7 billion people) generated 1 million objects per second over a period of 1 million years, it would still be very unlikely (≈ 10^{-18}) to observe even a single collision. For collisions to become likely, one would need to generate approximately 2^{128} objects.

Hence, we can ignore collisions for all practical purposes.