Does a hash function have a Upper bound on input length?Why does the padding in Merkle–Damgård hash functions like MD5 contain the message length?Is it theoretically possible to construct a string that contains its own hash value?Hash function in PBKDF2Does this guarantee a unique 32 bit Hash?How to choose the reduction function in rainbow tables?Combining secure hashes with insecure hashes?Advantages/disadvantages of using symmetric encryption function as hash function?Why does a Hashing Function produce good Random Numbers if Input is random?Hash length vs Data lengthWhat does “bits” mean in the context of hash functions?Security of a given hash functionHow many bits in the resultant hash will change, if the x bits are changed in its the original input?
Legendre Polynomial Integral over half space
How to get a type of "screech" on guitar
Draw parts of a split rectangle in a dashed/dotted style
Could a US citizen born through "birth tourism" become President?
Why isn't a binary file shown as 0s and 1s?
How can I help our ranger feel special about her beast companion?
Three Subway Escalators
Why did my "seldom" get corrected?
Why don't humans perceive sound waves as twice the frequency they are?
Is encryption still applied if you ignore the SSL certificate warning for self-signed certs?
The most secure way to handle someone forgetting to verify their account?
Will copper pour help on my single-layer PCB?
Align the contents of a numerical matrix when you have minus signs
What image should I install on VirtualBox for practising DevOps?
How important are the Author's mood and feelings for writing a story?
Is it possible to target 2 allies with the Warding Bond spell using the Sorcerer's Twinned Spell metamagic option?
Demographic consequences of closed loop reincarnation
Locked-up DOS computer beeped on keypress. What mechanism caused that?
I have found a mistake on someone's code published online: what is the protocol?
When will the last unambiguous evidence of mankind disappear?
Why do space operations use "nominal" to mean "working correctly"?
How to belay quickly ascending top-rope climbers?
Did Hitler say this quote about homeschooling?
How do you send money when you're not sure it's not a scam?
Does a hash function have a Upper bound on input length?
Why does the padding in Merkle–Damgård hash functions like MD5 contain the message length?Is it theoretically possible to construct a string that contains its own hash value?Hash function in PBKDF2Does this guarantee a unique 32 bit Hash?How to choose the reduction function in rainbow tables?Combining secure hashes with insecure hashes?Advantages/disadvantages of using symmetric encryption function as hash function?Why does a Hashing Function produce good Random Numbers if Input is random?Hash length vs Data lengthWhat does “bits” mean in the context of hash functions?Security of a given hash functionHow many bits in the resultant hash will change, if the x bits are changed in its the original input?
.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty margin-bottom:0;
$begingroup$
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?
hash sha-1 md5
$endgroup$
add a comment |
$begingroup$
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?
hash sha-1 md5
$endgroup$
$begingroup$
Not all hash functions but the universe have a limit on the data to store.
$endgroup$
– kelalaka
6 hours ago
add a comment |
$begingroup$
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?
hash sha-1 md5
$endgroup$
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?
hash sha-1 md5
hash sha-1 md5
asked 8 hours ago
Vasu Deo.SVasu Deo.S
2189 bronze badges
2189 bronze badges
$begingroup$
Not all hash functions but the universe have a limit on the data to store.
$endgroup$
– kelalaka
6 hours ago
add a comment |
$begingroup$
Not all hash functions but the universe have a limit on the data to store.
$endgroup$
– kelalaka
6 hours ago
$begingroup$
Not all hash functions but the universe have a limit on the data to store.
$endgroup$
– kelalaka
6 hours ago
$begingroup$
Not all hash functions but the universe have a limit on the data to store.
$endgroup$
– kelalaka
6 hours ago
add a comment |
1 Answer
1
active
oldest
votes
$begingroup$
Does hashing algorithms have an upper bound in the input space?
They can, but they don't have to and it depends on their specification.
- All Merkle-Damgård based hash functions do have an upper limit, because appending the message length simplifies the security proof and the backdoor-resistance of the function and they usually use a fixed-length encoding of the length.
- SHA-3 (Spec PDF) does not have such a limit as it's based on the sponge-construction.
- Skein (Spec PDF) does have a limit of $2^96$ bytes.
- Blake2 (Spec PDF) has a limit of $2^128$ bytes.
$endgroup$
$begingroup$
Oh, Thanks (+1). I totally forgot the fact that during the process of computing message digest of a message (in MD5 and SHA1), it's original length in bits is appended to the padded bits. Therefore, if we use message length > that length, we won't be able to append the actual length of the original message (as it would either result in overflow or would get truncated using a modulo operation which would lead to incorrect length).
$endgroup$
– Vasu Deo.S
7 hours ago
$begingroup$
BTW could you please tell me why answers like this still refer to the input space be infinite in length?
$endgroup$
– Vasu Deo.S
6 hours ago
$begingroup$
@VasuDeo.S probably because for most purposes "infinite" is a good approximation of "messages shorter than 2^64 bit" (which is > 1 million terabyte).
$endgroup$
– SEJPM♦
6 hours ago
$begingroup$
Thanks for taking time to answer my question!!
$endgroup$
– Vasu Deo.S
6 hours ago
add a comment |
Your Answer
StackExchange.ready(function()
var channelOptions =
tags: "".split(" "),
id: "281"
;
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function()
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled)
StackExchange.using("snippets", function()
createEditor();
);
else
createEditor();
);
function createEditor()
StackExchange.prepareEditor(
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: false,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: null,
bindNavPrevention: true,
postfix: "",
imageUploader:
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
,
noCode: true, onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
);
);
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fcrypto.stackexchange.com%2fquestions%2f72069%2fdoes-a-hash-function-have-a-upper-bound-on-input-length%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
$begingroup$
Does hashing algorithms have an upper bound in the input space?
They can, but they don't have to and it depends on their specification.
- All Merkle-Damgård based hash functions do have an upper limit, because appending the message length simplifies the security proof and the backdoor-resistance of the function and they usually use a fixed-length encoding of the length.
- SHA-3 (Spec PDF) does not have such a limit as it's based on the sponge-construction.
- Skein (Spec PDF) does have a limit of $2^96$ bytes.
- Blake2 (Spec PDF) has a limit of $2^128$ bytes.
$endgroup$
$begingroup$
Oh, Thanks (+1). I totally forgot the fact that during the process of computing message digest of a message (in MD5 and SHA1), it's original length in bits is appended to the padded bits. Therefore, if we use message length > that length, we won't be able to append the actual length of the original message (as it would either result in overflow or would get truncated using a modulo operation which would lead to incorrect length).
$endgroup$
– Vasu Deo.S
7 hours ago
$begingroup$
BTW could you please tell me why answers like this still refer to the input space be infinite in length?
$endgroup$
– Vasu Deo.S
6 hours ago
$begingroup$
@VasuDeo.S probably because for most purposes "infinite" is a good approximation of "messages shorter than 2^64 bit" (which is > 1 million terabyte).
$endgroup$
– SEJPM♦
6 hours ago
$begingroup$
Thanks for taking time to answer my question!!
$endgroup$
– Vasu Deo.S
6 hours ago
add a comment |
$begingroup$
Does hashing algorithms have an upper bound in the input space?
They can, but they don't have to and it depends on their specification.
- All Merkle-Damgård based hash functions do have an upper limit, because appending the message length simplifies the security proof and the backdoor-resistance of the function and they usually use a fixed-length encoding of the length.
- SHA-3 (Spec PDF) does not have such a limit as it's based on the sponge-construction.
- Skein (Spec PDF) does have a limit of $2^96$ bytes.
- Blake2 (Spec PDF) has a limit of $2^128$ bytes.
$endgroup$
$begingroup$
Oh, Thanks (+1). I totally forgot the fact that during the process of computing message digest of a message (in MD5 and SHA1), it's original length in bits is appended to the padded bits. Therefore, if we use message length > that length, we won't be able to append the actual length of the original message (as it would either result in overflow or would get truncated using a modulo operation which would lead to incorrect length).
$endgroup$
– Vasu Deo.S
7 hours ago
$begingroup$
BTW could you please tell me why answers like this still refer to the input space be infinite in length?
$endgroup$
– Vasu Deo.S
6 hours ago
$begingroup$
@VasuDeo.S probably because for most purposes "infinite" is a good approximation of "messages shorter than 2^64 bit" (which is > 1 million terabyte).
$endgroup$
– SEJPM♦
6 hours ago
$begingroup$
Thanks for taking time to answer my question!!
$endgroup$
– Vasu Deo.S
6 hours ago
add a comment |
$begingroup$
Does hashing algorithms have an upper bound in the input space?
They can, but they don't have to and it depends on their specification.
- All Merkle-Damgård based hash functions do have an upper limit, because appending the message length simplifies the security proof and the backdoor-resistance of the function and they usually use a fixed-length encoding of the length.
- SHA-3 (Spec PDF) does not have such a limit as it's based on the sponge-construction.
- Skein (Spec PDF) does have a limit of $2^96$ bytes.
- Blake2 (Spec PDF) has a limit of $2^128$ bytes.
$endgroup$
Does hashing algorithms have an upper bound in the input space?
They can, but they don't have to and it depends on their specification.
- All Merkle-Damgård based hash functions do have an upper limit, because appending the message length simplifies the security proof and the backdoor-resistance of the function and they usually use a fixed-length encoding of the length.
- SHA-3 (Spec PDF) does not have such a limit as it's based on the sponge-construction.
- Skein (Spec PDF) does have a limit of $2^96$ bytes.
- Blake2 (Spec PDF) has a limit of $2^128$ bytes.
answered 7 hours ago
SEJPM♦SEJPM
30.5k6 gold badges62 silver badges146 bronze badges
30.5k6 gold badges62 silver badges146 bronze badges
$begingroup$
Oh, Thanks (+1). I totally forgot the fact that during the process of computing message digest of a message (in MD5 and SHA1), it's original length in bits is appended to the padded bits. Therefore, if we use message length > that length, we won't be able to append the actual length of the original message (as it would either result in overflow or would get truncated using a modulo operation which would lead to incorrect length).
$endgroup$
– Vasu Deo.S
7 hours ago
$begingroup$
BTW could you please tell me why answers like this still refer to the input space be infinite in length?
$endgroup$
– Vasu Deo.S
6 hours ago
$begingroup$
@VasuDeo.S probably because for most purposes "infinite" is a good approximation of "messages shorter than 2^64 bit" (which is > 1 million terabyte).
$endgroup$
– SEJPM♦
6 hours ago
$begingroup$
Thanks for taking time to answer my question!!
$endgroup$
– Vasu Deo.S
6 hours ago
add a comment |
$begingroup$
Oh, Thanks (+1). I totally forgot the fact that during the process of computing message digest of a message (in MD5 and SHA1), it's original length in bits is appended to the padded bits. Therefore, if we use message length > that length, we won't be able to append the actual length of the original message (as it would either result in overflow or would get truncated using a modulo operation which would lead to incorrect length).
$endgroup$
– Vasu Deo.S
7 hours ago
$begingroup$
BTW could you please tell me why answers like this still refer to the input space be infinite in length?
$endgroup$
– Vasu Deo.S
6 hours ago
$begingroup$
@VasuDeo.S probably because for most purposes "infinite" is a good approximation of "messages shorter than 2^64 bit" (which is > 1 million terabyte).
$endgroup$
– SEJPM♦
6 hours ago
$begingroup$
Thanks for taking time to answer my question!!
$endgroup$
– Vasu Deo.S
6 hours ago
$begingroup$
Oh, Thanks (+1). I totally forgot the fact that during the process of computing message digest of a message (in MD5 and SHA1), it's original length in bits is appended to the padded bits. Therefore, if we use message length > that length, we won't be able to append the actual length of the original message (as it would either result in overflow or would get truncated using a modulo operation which would lead to incorrect length).
$endgroup$
– Vasu Deo.S
7 hours ago
$begingroup$
Oh, Thanks (+1). I totally forgot the fact that during the process of computing message digest of a message (in MD5 and SHA1), it's original length in bits is appended to the padded bits. Therefore, if we use message length > that length, we won't be able to append the actual length of the original message (as it would either result in overflow or would get truncated using a modulo operation which would lead to incorrect length).
$endgroup$
– Vasu Deo.S
7 hours ago
$begingroup$
BTW could you please tell me why answers like this still refer to the input space be infinite in length?
$endgroup$
– Vasu Deo.S
6 hours ago
$begingroup$
BTW could you please tell me why answers like this still refer to the input space be infinite in length?
$endgroup$
– Vasu Deo.S
6 hours ago
$begingroup$
@VasuDeo.S probably because for most purposes "infinite" is a good approximation of "messages shorter than 2^64 bit" (which is > 1 million terabyte).
$endgroup$
– SEJPM♦
6 hours ago
$begingroup$
@VasuDeo.S probably because for most purposes "infinite" is a good approximation of "messages shorter than 2^64 bit" (which is > 1 million terabyte).
$endgroup$
– SEJPM♦
6 hours ago
$begingroup$
Thanks for taking time to answer my question!!
$endgroup$
– Vasu Deo.S
6 hours ago
$begingroup$
Thanks for taking time to answer my question!!
$endgroup$
– Vasu Deo.S
6 hours ago
add a comment |
Thanks for contributing an answer to Cryptography Stack Exchange!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
Use MathJax to format equations. MathJax reference.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fcrypto.stackexchange.com%2fquestions%2f72069%2fdoes-a-hash-function-have-a-upper-bound-on-input-length%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
$begingroup$
Not all hash functions but the universe have a limit on the data to store.
$endgroup$
– kelalaka
6 hours ago