I came across this Answer stating (just a line from the answer):-
The input space is "infinite" and thus it has an infinite amount of values that will collide into a single hash
And in the comments of this answer, there exists a comment of @poncho stating:-
Technically, the input space for the SHA-1 and SHA-2 hash functions is not "infinite"; SHA-1 and SHA-256 inputs are limited to $2^{64}−1$ bits; SHA-512 is limited to $2^{128}−1$ bits
In reply to the above comment, the answer'er does accept the above fact. But, I can't seem to understand why?
As there exists a large number of answers, like this who loosely use the term infinite with the input space of hash functions. I tried to resolve the ambiguity via Wikipedia page of MD5 and SHA1, this is the definition of both:-
In cryptography, SHA-1 is a cryptographic hash function which takes an input and produces a 160-bit hash
The MD5 message-digest algorithm is a widely used hash function producing a 128-bit hash value
In both the definition, there exists no mention of input size (in bits) of the algorithms.
QUESTION:- Does hashing algorithms have an upper bound in the input space?
P.S.:- If the upper bound does exists, then can anyone tell me why isn't the hashing algorithm able to work on input size above the upper bound?