Hashing password to increase entropyClient side password hashingHashing length for storing passwordMD5 collision attacks: are they relevant in password hashing?Hashing a key: less entropy than the key itselfDoes it make sense to choose a longer password than the output of a hash?comparing password hashing algorithms - PoC ideas?Do you need more than 128-bit entropy?Is there a threshold of bits of entropy below which hashing becomes meaningless?Convert SHA-256 to SHA-1 and MD5 - Increase bit length/entropy?How do user get access to login when passwords are stored in MD5?Are passwords longer than 128 bits useless if hashed with MD5?

Calculate Pi using Monte Carlo

Would this string work as string?

Connection Between Knot Theory and Number Theory

How to get directions in deep space?

How do I lift the insulation blower into the attic?

PTIJ: Which Dr. Seuss books should one obtain?

Do native speakers use "ultima" and "proxima" frequently in spoken English?

Not hide and seek

How do you justify more code being written by following clean code practices?

New Order #2: Turn My Way

Why is "la Gestapo" feminine?

Why does the frost depth increase when the surface temperature warms up?

A seasonal riddle

Pre-Employment Background Check With Consent For Future Checks

Checking @@ROWCOUNT failing

What (if any) is the reason to buy in small local stores?

Magnifying glass in hyperbolic space

Derivative of an interpolated function

Make a Bowl of Alphabet Soup

Taking my research idea outside my paid job

python displays `n` instead of breaking a line

If the Dominion rule using their Jem'Hadar troops, why is their life expectancy so low?

Asserting that Atheism and Theism are both faith based positions

I keep switching characters, how do I stop?



Hashing password to increase entropy


Client side password hashingHashing length for storing passwordMD5 collision attacks: are they relevant in password hashing?Hashing a key: less entropy than the key itselfDoes it make sense to choose a longer password than the output of a hash?comparing password hashing algorithms - PoC ideas?Do you need more than 128-bit entropy?Is there a threshold of bits of entropy below which hashing becomes meaningless?Convert SHA-256 to SHA-1 and MD5 - Increase bit length/entropy?How do user get access to login when passwords are stored in MD5?Are passwords longer than 128 bits useless if hashed with MD5?













6















Is it secure to hash a password before using it in an application to increase password entropy?



Does this practice increase entropy when a PBKDF is used in the application itself or does the PBKDF itself increase the password entropy?



If a random password is hashed with md5 will the output provide a 128 bit entropy?



EDIT: It is meant to use the result of the hash function as a password for cryptographic functions and applications like AES-256, email and access to computer systems.



The procedure used will be password -> hash of password -> application



EDIT 2: E.g if an email application requests a password during registration, the intended password will be hashed locally before being provided to it.










share|improve this question
























  • For what do you want to use it in your application?

    – Sjoerd
    15 hours ago











  • i edited my question with more information on the application of the password

    – AXANO
    15 hours ago











  • Do you mean Client side password hashing?

    – Sjoerd
    15 hours ago






  • 5





    "If a random password is hashed with md5 will the output provide a 128 bit entropy?" - if the passwords consists of 8 random upper-case characters there are at most 26^8 possibilities which is far from 2^128. Putting some hash behind this will not magically add entropy since a hash is deterministic.

    – Steffen Ullrich
    15 hours ago







  • 1





    Again, a hash is a deterministic algorithm. At most you will loose entropy with this (for example when using MD5 on a password with 10000 characters) but never have entropy added.

    – Steffen Ullrich
    15 hours ago
















6















Is it secure to hash a password before using it in an application to increase password entropy?



Does this practice increase entropy when a PBKDF is used in the application itself or does the PBKDF itself increase the password entropy?



If a random password is hashed with md5 will the output provide a 128 bit entropy?



EDIT: It is meant to use the result of the hash function as a password for cryptographic functions and applications like AES-256, email and access to computer systems.



The procedure used will be password -> hash of password -> application



EDIT 2: E.g if an email application requests a password during registration, the intended password will be hashed locally before being provided to it.










share|improve this question
























  • For what do you want to use it in your application?

    – Sjoerd
    15 hours ago











  • i edited my question with more information on the application of the password

    – AXANO
    15 hours ago











  • Do you mean Client side password hashing?

    – Sjoerd
    15 hours ago






  • 5





    "If a random password is hashed with md5 will the output provide a 128 bit entropy?" - if the passwords consists of 8 random upper-case characters there are at most 26^8 possibilities which is far from 2^128. Putting some hash behind this will not magically add entropy since a hash is deterministic.

    – Steffen Ullrich
    15 hours ago







  • 1





    Again, a hash is a deterministic algorithm. At most you will loose entropy with this (for example when using MD5 on a password with 10000 characters) but never have entropy added.

    – Steffen Ullrich
    15 hours ago














6












6








6








Is it secure to hash a password before using it in an application to increase password entropy?



Does this practice increase entropy when a PBKDF is used in the application itself or does the PBKDF itself increase the password entropy?



If a random password is hashed with md5 will the output provide a 128 bit entropy?



EDIT: It is meant to use the result of the hash function as a password for cryptographic functions and applications like AES-256, email and access to computer systems.



The procedure used will be password -> hash of password -> application



EDIT 2: E.g if an email application requests a password during registration, the intended password will be hashed locally before being provided to it.










share|improve this question
















Is it secure to hash a password before using it in an application to increase password entropy?



Does this practice increase entropy when a PBKDF is used in the application itself or does the PBKDF itself increase the password entropy?



If a random password is hashed with md5 will the output provide a 128 bit entropy?



EDIT: It is meant to use the result of the hash function as a password for cryptographic functions and applications like AES-256, email and access to computer systems.



The procedure used will be password -> hash of password -> application



EDIT 2: E.g if an email application requests a password during registration, the intended password will be hashed locally before being provided to it.







passwords hash entropy






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited 14 hours ago







AXANO

















asked 15 hours ago









AXANOAXANO

603419




603419












  • For what do you want to use it in your application?

    – Sjoerd
    15 hours ago











  • i edited my question with more information on the application of the password

    – AXANO
    15 hours ago











  • Do you mean Client side password hashing?

    – Sjoerd
    15 hours ago






  • 5





    "If a random password is hashed with md5 will the output provide a 128 bit entropy?" - if the passwords consists of 8 random upper-case characters there are at most 26^8 possibilities which is far from 2^128. Putting some hash behind this will not magically add entropy since a hash is deterministic.

    – Steffen Ullrich
    15 hours ago







  • 1





    Again, a hash is a deterministic algorithm. At most you will loose entropy with this (for example when using MD5 on a password with 10000 characters) but never have entropy added.

    – Steffen Ullrich
    15 hours ago


















  • For what do you want to use it in your application?

    – Sjoerd
    15 hours ago











  • i edited my question with more information on the application of the password

    – AXANO
    15 hours ago











  • Do you mean Client side password hashing?

    – Sjoerd
    15 hours ago






  • 5





    "If a random password is hashed with md5 will the output provide a 128 bit entropy?" - if the passwords consists of 8 random upper-case characters there are at most 26^8 possibilities which is far from 2^128. Putting some hash behind this will not magically add entropy since a hash is deterministic.

    – Steffen Ullrich
    15 hours ago







  • 1





    Again, a hash is a deterministic algorithm. At most you will loose entropy with this (for example when using MD5 on a password with 10000 characters) but never have entropy added.

    – Steffen Ullrich
    15 hours ago

















For what do you want to use it in your application?

– Sjoerd
15 hours ago





For what do you want to use it in your application?

– Sjoerd
15 hours ago













i edited my question with more information on the application of the password

– AXANO
15 hours ago





i edited my question with more information on the application of the password

– AXANO
15 hours ago













Do you mean Client side password hashing?

– Sjoerd
15 hours ago





Do you mean Client side password hashing?

– Sjoerd
15 hours ago




5




5





"If a random password is hashed with md5 will the output provide a 128 bit entropy?" - if the passwords consists of 8 random upper-case characters there are at most 26^8 possibilities which is far from 2^128. Putting some hash behind this will not magically add entropy since a hash is deterministic.

– Steffen Ullrich
15 hours ago






"If a random password is hashed with md5 will the output provide a 128 bit entropy?" - if the passwords consists of 8 random upper-case characters there are at most 26^8 possibilities which is far from 2^128. Putting some hash behind this will not magically add entropy since a hash is deterministic.

– Steffen Ullrich
15 hours ago





1




1





Again, a hash is a deterministic algorithm. At most you will loose entropy with this (for example when using MD5 on a password with 10000 characters) but never have entropy added.

– Steffen Ullrich
15 hours ago






Again, a hash is a deterministic algorithm. At most you will loose entropy with this (for example when using MD5 on a password with 10000 characters) but never have entropy added.

– Steffen Ullrich
15 hours ago











3 Answers
3






active

oldest

votes


















15














No, you don't increase entropy by hashing it once, or twice, or ten times. Consider entropy as it is seem from the input, not the output. You cannot add entropy using a deterministic process, as the entropy of the result does not count.



Even if you have some code like this:



$password = "123456";
$result = md5($password) . sha1($password) . hash('gost', $password);
echo $result; // e10adc3949ba59abbe56e057f20f
// 8941b84cdecc9c273927ff6d9cca1ae75945990a2cb1f
// 81e5daab52a987f6d788c372


And you end up with a scary looking 136-byte string, the password is still 123456, and any attacker bruteforcing your hashed password will have to try, on average, only once, as 123456 is the top worst password on almost every single list.




If a random password is hashed with md5 will the output provide a 128 bit entropy?




No, MD5 is deterministic, so if the attacker knows the string is a MD5 hash, the entropy of it is the entropy of the random password you supplied.



To make the password more secure, use a proper key derivation (PBKDF2 is a good one), ask the user for a longer password, and check if the user is following basic password rules (no chars repeated in a row, proper length, mixed digits and chars, mixed case, things like that).






share|improve this answer




















  • 1





    The point that i find is problematic is that the OP Posted that the User is himself that don't want to enter a clear text password into a Website form and wanted to hash it before entering it. (or use now a key derivation before entering it into the form).

    – Serverfrog
    9 hours ago







  • 1





    This answer assumes that the brute force attacker knows what hash was used to create the derived password, as well as any salt that might be added in the process. If the hashing is done where the attacker has no way to know the algorithm and the salt, the derived password has the added entropy from that uncertainty about the hash and salt. One could consider this a form of two-factor authentication, in which the salt and algorithm held in the hash software represent the second factor..

    – Monty Harder
    8 hours ago






  • 4





    en.wikipedia.org/wiki/Kerckhoffs%27s_principle: If you design a security process, assume the attacker knows everything but the key.

    – ThoriumBR
    8 hours ago











  • Doesn't a hash actually reduce entropy, since there can be collisions?

    – Barmar
    4 hours ago






  • 1





    "Fun" fact. When you concatenate hashes of passwords like that, one (sort of counter intuitively) limits their password hashing scheme's resistance to password recovery to that of the weakest hash. For example argon2(salt, password) . md5(salt, password) is as easy to brute force as md5(salt, password).

    – Future Security
    50 mins ago


















4














A key derivation function will not increase the entropy, but it does make things more secure. A KDF has the following functions:



  • It creates a key of the correct length. Many encryption algorithms take a fixed size length, such as 16 bytes. By using a KDF you can use a password of any length.

  • It distributes the entropy of the password over the whole key. Encryption algorithms are meant to work with random-looking keys. If you use 1000000000000000 as key, this can introduce security issues in the encryption algorithm. A KDF scrambles the password into a random-looking key.

  • It takes time. To slow down brute-force attacks, key derivation can be made slow so that attempting many passwords takes an unreasonable amount of time.





share|improve this answer


















  • 1





    Nice answer but it does not cover the part concerning hashing prior to password usage

    – AXANO
    15 hours ago


















2














TL;DR



Hashing a Bad Password before sending it to some Server as Password is more time intensive, uncomfortable and less secure than a simple Password manager.



The Question seems to aim to misuse a Hashing Algorithm as a very simple Password Manager.



Use a real one or any real Password manager.



I will use your example to show why it will be a bad idea:



  • You have the not so "entropy-rich" password 1111111111111

  • it will have the hash 9DCBF642C78137F656BA7C24381AC25B

Now a Attacker get somehow a Database where the Passwords are in clear text (happend to often in the past). And why ever he will accidentally search there for hashes that have know plaintext (the not so "entropy-rich" password is one of it). Now he knows that the user with your username/email uses "1111111111111" and then MD5 it, as Password. What is then the benefit you have? One step more someone must take, but security wise there is no real difference.



Here the Difference what could happend in the Real World:



Your way:



ClearText -- MD5 --> HashedClearText -- sent to Server(HTTP(S))-->| |-- MD5/SHA*/... --> HashedHashedClearText



Normal Way:



ClearText -- sent to Server(HTTP(S)) -->| | -- MD5/SHA*/... --> HashedClearText






share|improve this answer























  • The problem i want to avoid is the centralization of passwords As well as the fact that it is not portable to amnesic operating systems

    – AXANO
    10 hours ago











  • avoid centralization with a single hashed password? amnesic operating systems: portable secure device, beside a Human Head that can't really store many Passwords pretty well

    – Serverfrog
    10 hours ago











  • you can be forced to decrypt "portable secure devices"

    – AXANO
    10 hours ago






  • 1





    as you can be force to spell out a Password. xkcd.com/538 (how will you decrypt a password storage or device, without telling them the password. The same holds on your case)

    – Serverfrog
    10 hours ago











Your Answer








StackExchange.ready(function()
var channelOptions =
tags: "".split(" "),
id: "162"
;
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
);



);













draft saved

draft discarded


















StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fsecurity.stackexchange.com%2fquestions%2f205680%2fhashing-password-to-increase-entropy%23new-answer', 'question_page');

);

Post as a guest















Required, but never shown

























3 Answers
3






active

oldest

votes








3 Answers
3






active

oldest

votes









active

oldest

votes






active

oldest

votes









15














No, you don't increase entropy by hashing it once, or twice, or ten times. Consider entropy as it is seem from the input, not the output. You cannot add entropy using a deterministic process, as the entropy of the result does not count.



Even if you have some code like this:



$password = "123456";
$result = md5($password) . sha1($password) . hash('gost', $password);
echo $result; // e10adc3949ba59abbe56e057f20f
// 8941b84cdecc9c273927ff6d9cca1ae75945990a2cb1f
// 81e5daab52a987f6d788c372


And you end up with a scary looking 136-byte string, the password is still 123456, and any attacker bruteforcing your hashed password will have to try, on average, only once, as 123456 is the top worst password on almost every single list.




If a random password is hashed with md5 will the output provide a 128 bit entropy?




No, MD5 is deterministic, so if the attacker knows the string is a MD5 hash, the entropy of it is the entropy of the random password you supplied.



To make the password more secure, use a proper key derivation (PBKDF2 is a good one), ask the user for a longer password, and check if the user is following basic password rules (no chars repeated in a row, proper length, mixed digits and chars, mixed case, things like that).






share|improve this answer




















  • 1





    The point that i find is problematic is that the OP Posted that the User is himself that don't want to enter a clear text password into a Website form and wanted to hash it before entering it. (or use now a key derivation before entering it into the form).

    – Serverfrog
    9 hours ago







  • 1





    This answer assumes that the brute force attacker knows what hash was used to create the derived password, as well as any salt that might be added in the process. If the hashing is done where the attacker has no way to know the algorithm and the salt, the derived password has the added entropy from that uncertainty about the hash and salt. One could consider this a form of two-factor authentication, in which the salt and algorithm held in the hash software represent the second factor..

    – Monty Harder
    8 hours ago






  • 4





    en.wikipedia.org/wiki/Kerckhoffs%27s_principle: If you design a security process, assume the attacker knows everything but the key.

    – ThoriumBR
    8 hours ago











  • Doesn't a hash actually reduce entropy, since there can be collisions?

    – Barmar
    4 hours ago






  • 1





    "Fun" fact. When you concatenate hashes of passwords like that, one (sort of counter intuitively) limits their password hashing scheme's resistance to password recovery to that of the weakest hash. For example argon2(salt, password) . md5(salt, password) is as easy to brute force as md5(salt, password).

    – Future Security
    50 mins ago















15














No, you don't increase entropy by hashing it once, or twice, or ten times. Consider entropy as it is seem from the input, not the output. You cannot add entropy using a deterministic process, as the entropy of the result does not count.



Even if you have some code like this:



$password = "123456";
$result = md5($password) . sha1($password) . hash('gost', $password);
echo $result; // e10adc3949ba59abbe56e057f20f
// 8941b84cdecc9c273927ff6d9cca1ae75945990a2cb1f
// 81e5daab52a987f6d788c372


And you end up with a scary looking 136-byte string, the password is still 123456, and any attacker bruteforcing your hashed password will have to try, on average, only once, as 123456 is the top worst password on almost every single list.




If a random password is hashed with md5 will the output provide a 128 bit entropy?




No, MD5 is deterministic, so if the attacker knows the string is a MD5 hash, the entropy of it is the entropy of the random password you supplied.



To make the password more secure, use a proper key derivation (PBKDF2 is a good one), ask the user for a longer password, and check if the user is following basic password rules (no chars repeated in a row, proper length, mixed digits and chars, mixed case, things like that).






share|improve this answer




















  • 1





    The point that i find is problematic is that the OP Posted that the User is himself that don't want to enter a clear text password into a Website form and wanted to hash it before entering it. (or use now a key derivation before entering it into the form).

    – Serverfrog
    9 hours ago







  • 1





    This answer assumes that the brute force attacker knows what hash was used to create the derived password, as well as any salt that might be added in the process. If the hashing is done where the attacker has no way to know the algorithm and the salt, the derived password has the added entropy from that uncertainty about the hash and salt. One could consider this a form of two-factor authentication, in which the salt and algorithm held in the hash software represent the second factor..

    – Monty Harder
    8 hours ago






  • 4





    en.wikipedia.org/wiki/Kerckhoffs%27s_principle: If you design a security process, assume the attacker knows everything but the key.

    – ThoriumBR
    8 hours ago











  • Doesn't a hash actually reduce entropy, since there can be collisions?

    – Barmar
    4 hours ago






  • 1





    "Fun" fact. When you concatenate hashes of passwords like that, one (sort of counter intuitively) limits their password hashing scheme's resistance to password recovery to that of the weakest hash. For example argon2(salt, password) . md5(salt, password) is as easy to brute force as md5(salt, password).

    – Future Security
    50 mins ago













15












15








15







No, you don't increase entropy by hashing it once, or twice, or ten times. Consider entropy as it is seem from the input, not the output. You cannot add entropy using a deterministic process, as the entropy of the result does not count.



Even if you have some code like this:



$password = "123456";
$result = md5($password) . sha1($password) . hash('gost', $password);
echo $result; // e10adc3949ba59abbe56e057f20f
// 8941b84cdecc9c273927ff6d9cca1ae75945990a2cb1f
// 81e5daab52a987f6d788c372


And you end up with a scary looking 136-byte string, the password is still 123456, and any attacker bruteforcing your hashed password will have to try, on average, only once, as 123456 is the top worst password on almost every single list.




If a random password is hashed with md5 will the output provide a 128 bit entropy?




No, MD5 is deterministic, so if the attacker knows the string is a MD5 hash, the entropy of it is the entropy of the random password you supplied.



To make the password more secure, use a proper key derivation (PBKDF2 is a good one), ask the user for a longer password, and check if the user is following basic password rules (no chars repeated in a row, proper length, mixed digits and chars, mixed case, things like that).






share|improve this answer















No, you don't increase entropy by hashing it once, or twice, or ten times. Consider entropy as it is seem from the input, not the output. You cannot add entropy using a deterministic process, as the entropy of the result does not count.



Even if you have some code like this:



$password = "123456";
$result = md5($password) . sha1($password) . hash('gost', $password);
echo $result; // e10adc3949ba59abbe56e057f20f
// 8941b84cdecc9c273927ff6d9cca1ae75945990a2cb1f
// 81e5daab52a987f6d788c372


And you end up with a scary looking 136-byte string, the password is still 123456, and any attacker bruteforcing your hashed password will have to try, on average, only once, as 123456 is the top worst password on almost every single list.




If a random password is hashed with md5 will the output provide a 128 bit entropy?




No, MD5 is deterministic, so if the attacker knows the string is a MD5 hash, the entropy of it is the entropy of the random password you supplied.



To make the password more secure, use a proper key derivation (PBKDF2 is a good one), ask the user for a longer password, and check if the user is following basic password rules (no chars repeated in a row, proper length, mixed digits and chars, mixed case, things like that).







share|improve this answer














share|improve this answer



share|improve this answer








edited 9 hours ago

























answered 9 hours ago









ThoriumBRThoriumBR

23.5k75571




23.5k75571







  • 1





    The point that i find is problematic is that the OP Posted that the User is himself that don't want to enter a clear text password into a Website form and wanted to hash it before entering it. (or use now a key derivation before entering it into the form).

    – Serverfrog
    9 hours ago







  • 1





    This answer assumes that the brute force attacker knows what hash was used to create the derived password, as well as any salt that might be added in the process. If the hashing is done where the attacker has no way to know the algorithm and the salt, the derived password has the added entropy from that uncertainty about the hash and salt. One could consider this a form of two-factor authentication, in which the salt and algorithm held in the hash software represent the second factor..

    – Monty Harder
    8 hours ago






  • 4





    en.wikipedia.org/wiki/Kerckhoffs%27s_principle: If you design a security process, assume the attacker knows everything but the key.

    – ThoriumBR
    8 hours ago











  • Doesn't a hash actually reduce entropy, since there can be collisions?

    – Barmar
    4 hours ago






  • 1





    "Fun" fact. When you concatenate hashes of passwords like that, one (sort of counter intuitively) limits their password hashing scheme's resistance to password recovery to that of the weakest hash. For example argon2(salt, password) . md5(salt, password) is as easy to brute force as md5(salt, password).

    – Future Security
    50 mins ago












  • 1





    The point that i find is problematic is that the OP Posted that the User is himself that don't want to enter a clear text password into a Website form and wanted to hash it before entering it. (or use now a key derivation before entering it into the form).

    – Serverfrog
    9 hours ago







  • 1





    This answer assumes that the brute force attacker knows what hash was used to create the derived password, as well as any salt that might be added in the process. If the hashing is done where the attacker has no way to know the algorithm and the salt, the derived password has the added entropy from that uncertainty about the hash and salt. One could consider this a form of two-factor authentication, in which the salt and algorithm held in the hash software represent the second factor..

    – Monty Harder
    8 hours ago






  • 4





    en.wikipedia.org/wiki/Kerckhoffs%27s_principle: If you design a security process, assume the attacker knows everything but the key.

    – ThoriumBR
    8 hours ago











  • Doesn't a hash actually reduce entropy, since there can be collisions?

    – Barmar
    4 hours ago






  • 1





    "Fun" fact. When you concatenate hashes of passwords like that, one (sort of counter intuitively) limits their password hashing scheme's resistance to password recovery to that of the weakest hash. For example argon2(salt, password) . md5(salt, password) is as easy to brute force as md5(salt, password).

    – Future Security
    50 mins ago







1




1





The point that i find is problematic is that the OP Posted that the User is himself that don't want to enter a clear text password into a Website form and wanted to hash it before entering it. (or use now a key derivation before entering it into the form).

– Serverfrog
9 hours ago






The point that i find is problematic is that the OP Posted that the User is himself that don't want to enter a clear text password into a Website form and wanted to hash it before entering it. (or use now a key derivation before entering it into the form).

– Serverfrog
9 hours ago





1




1





This answer assumes that the brute force attacker knows what hash was used to create the derived password, as well as any salt that might be added in the process. If the hashing is done where the attacker has no way to know the algorithm and the salt, the derived password has the added entropy from that uncertainty about the hash and salt. One could consider this a form of two-factor authentication, in which the salt and algorithm held in the hash software represent the second factor..

– Monty Harder
8 hours ago





This answer assumes that the brute force attacker knows what hash was used to create the derived password, as well as any salt that might be added in the process. If the hashing is done where the attacker has no way to know the algorithm and the salt, the derived password has the added entropy from that uncertainty about the hash and salt. One could consider this a form of two-factor authentication, in which the salt and algorithm held in the hash software represent the second factor..

– Monty Harder
8 hours ago




4




4





en.wikipedia.org/wiki/Kerckhoffs%27s_principle: If you design a security process, assume the attacker knows everything but the key.

– ThoriumBR
8 hours ago





en.wikipedia.org/wiki/Kerckhoffs%27s_principle: If you design a security process, assume the attacker knows everything but the key.

– ThoriumBR
8 hours ago













Doesn't a hash actually reduce entropy, since there can be collisions?

– Barmar
4 hours ago





Doesn't a hash actually reduce entropy, since there can be collisions?

– Barmar
4 hours ago




1




1





"Fun" fact. When you concatenate hashes of passwords like that, one (sort of counter intuitively) limits their password hashing scheme's resistance to password recovery to that of the weakest hash. For example argon2(salt, password) . md5(salt, password) is as easy to brute force as md5(salt, password).

– Future Security
50 mins ago





"Fun" fact. When you concatenate hashes of passwords like that, one (sort of counter intuitively) limits their password hashing scheme's resistance to password recovery to that of the weakest hash. For example argon2(salt, password) . md5(salt, password) is as easy to brute force as md5(salt, password).

– Future Security
50 mins ago













4














A key derivation function will not increase the entropy, but it does make things more secure. A KDF has the following functions:



  • It creates a key of the correct length. Many encryption algorithms take a fixed size length, such as 16 bytes. By using a KDF you can use a password of any length.

  • It distributes the entropy of the password over the whole key. Encryption algorithms are meant to work with random-looking keys. If you use 1000000000000000 as key, this can introduce security issues in the encryption algorithm. A KDF scrambles the password into a random-looking key.

  • It takes time. To slow down brute-force attacks, key derivation can be made slow so that attempting many passwords takes an unreasonable amount of time.





share|improve this answer


















  • 1





    Nice answer but it does not cover the part concerning hashing prior to password usage

    – AXANO
    15 hours ago















4














A key derivation function will not increase the entropy, but it does make things more secure. A KDF has the following functions:



  • It creates a key of the correct length. Many encryption algorithms take a fixed size length, such as 16 bytes. By using a KDF you can use a password of any length.

  • It distributes the entropy of the password over the whole key. Encryption algorithms are meant to work with random-looking keys. If you use 1000000000000000 as key, this can introduce security issues in the encryption algorithm. A KDF scrambles the password into a random-looking key.

  • It takes time. To slow down brute-force attacks, key derivation can be made slow so that attempting many passwords takes an unreasonable amount of time.





share|improve this answer


















  • 1





    Nice answer but it does not cover the part concerning hashing prior to password usage

    – AXANO
    15 hours ago













4












4








4







A key derivation function will not increase the entropy, but it does make things more secure. A KDF has the following functions:



  • It creates a key of the correct length. Many encryption algorithms take a fixed size length, such as 16 bytes. By using a KDF you can use a password of any length.

  • It distributes the entropy of the password over the whole key. Encryption algorithms are meant to work with random-looking keys. If you use 1000000000000000 as key, this can introduce security issues in the encryption algorithm. A KDF scrambles the password into a random-looking key.

  • It takes time. To slow down brute-force attacks, key derivation can be made slow so that attempting many passwords takes an unreasonable amount of time.





share|improve this answer













A key derivation function will not increase the entropy, but it does make things more secure. A KDF has the following functions:



  • It creates a key of the correct length. Many encryption algorithms take a fixed size length, such as 16 bytes. By using a KDF you can use a password of any length.

  • It distributes the entropy of the password over the whole key. Encryption algorithms are meant to work with random-looking keys. If you use 1000000000000000 as key, this can introduce security issues in the encryption algorithm. A KDF scrambles the password into a random-looking key.

  • It takes time. To slow down brute-force attacks, key derivation can be made slow so that attempting many passwords takes an unreasonable amount of time.






share|improve this answer












share|improve this answer



share|improve this answer










answered 15 hours ago









SjoerdSjoerd

20.3k94865




20.3k94865







  • 1





    Nice answer but it does not cover the part concerning hashing prior to password usage

    – AXANO
    15 hours ago












  • 1





    Nice answer but it does not cover the part concerning hashing prior to password usage

    – AXANO
    15 hours ago







1




1





Nice answer but it does not cover the part concerning hashing prior to password usage

– AXANO
15 hours ago





Nice answer but it does not cover the part concerning hashing prior to password usage

– AXANO
15 hours ago











2














TL;DR



Hashing a Bad Password before sending it to some Server as Password is more time intensive, uncomfortable and less secure than a simple Password manager.



The Question seems to aim to misuse a Hashing Algorithm as a very simple Password Manager.



Use a real one or any real Password manager.



I will use your example to show why it will be a bad idea:



  • You have the not so "entropy-rich" password 1111111111111

  • it will have the hash 9DCBF642C78137F656BA7C24381AC25B

Now a Attacker get somehow a Database where the Passwords are in clear text (happend to often in the past). And why ever he will accidentally search there for hashes that have know plaintext (the not so "entropy-rich" password is one of it). Now he knows that the user with your username/email uses "1111111111111" and then MD5 it, as Password. What is then the benefit you have? One step more someone must take, but security wise there is no real difference.



Here the Difference what could happend in the Real World:



Your way:



ClearText -- MD5 --> HashedClearText -- sent to Server(HTTP(S))-->| |-- MD5/SHA*/... --> HashedHashedClearText



Normal Way:



ClearText -- sent to Server(HTTP(S)) -->| | -- MD5/SHA*/... --> HashedClearText






share|improve this answer























  • The problem i want to avoid is the centralization of passwords As well as the fact that it is not portable to amnesic operating systems

    – AXANO
    10 hours ago











  • avoid centralization with a single hashed password? amnesic operating systems: portable secure device, beside a Human Head that can't really store many Passwords pretty well

    – Serverfrog
    10 hours ago











  • you can be forced to decrypt "portable secure devices"

    – AXANO
    10 hours ago






  • 1





    as you can be force to spell out a Password. xkcd.com/538 (how will you decrypt a password storage or device, without telling them the password. The same holds on your case)

    – Serverfrog
    10 hours ago
















2














TL;DR



Hashing a Bad Password before sending it to some Server as Password is more time intensive, uncomfortable and less secure than a simple Password manager.



The Question seems to aim to misuse a Hashing Algorithm as a very simple Password Manager.



Use a real one or any real Password manager.



I will use your example to show why it will be a bad idea:



  • You have the not so "entropy-rich" password 1111111111111

  • it will have the hash 9DCBF642C78137F656BA7C24381AC25B

Now a Attacker get somehow a Database where the Passwords are in clear text (happend to often in the past). And why ever he will accidentally search there for hashes that have know plaintext (the not so "entropy-rich" password is one of it). Now he knows that the user with your username/email uses "1111111111111" and then MD5 it, as Password. What is then the benefit you have? One step more someone must take, but security wise there is no real difference.



Here the Difference what could happend in the Real World:



Your way:



ClearText -- MD5 --> HashedClearText -- sent to Server(HTTP(S))-->| |-- MD5/SHA*/... --> HashedHashedClearText



Normal Way:



ClearText -- sent to Server(HTTP(S)) -->| | -- MD5/SHA*/... --> HashedClearText






share|improve this answer























  • The problem i want to avoid is the centralization of passwords As well as the fact that it is not portable to amnesic operating systems

    – AXANO
    10 hours ago











  • avoid centralization with a single hashed password? amnesic operating systems: portable secure device, beside a Human Head that can't really store many Passwords pretty well

    – Serverfrog
    10 hours ago











  • you can be forced to decrypt "portable secure devices"

    – AXANO
    10 hours ago






  • 1





    as you can be force to spell out a Password. xkcd.com/538 (how will you decrypt a password storage or device, without telling them the password. The same holds on your case)

    – Serverfrog
    10 hours ago














2












2








2







TL;DR



Hashing a Bad Password before sending it to some Server as Password is more time intensive, uncomfortable and less secure than a simple Password manager.



The Question seems to aim to misuse a Hashing Algorithm as a very simple Password Manager.



Use a real one or any real Password manager.



I will use your example to show why it will be a bad idea:



  • You have the not so "entropy-rich" password 1111111111111

  • it will have the hash 9DCBF642C78137F656BA7C24381AC25B

Now a Attacker get somehow a Database where the Passwords are in clear text (happend to often in the past). And why ever he will accidentally search there for hashes that have know plaintext (the not so "entropy-rich" password is one of it). Now he knows that the user with your username/email uses "1111111111111" and then MD5 it, as Password. What is then the benefit you have? One step more someone must take, but security wise there is no real difference.



Here the Difference what could happend in the Real World:



Your way:



ClearText -- MD5 --> HashedClearText -- sent to Server(HTTP(S))-->| |-- MD5/SHA*/... --> HashedHashedClearText



Normal Way:



ClearText -- sent to Server(HTTP(S)) -->| | -- MD5/SHA*/... --> HashedClearText






share|improve this answer













TL;DR



Hashing a Bad Password before sending it to some Server as Password is more time intensive, uncomfortable and less secure than a simple Password manager.



The Question seems to aim to misuse a Hashing Algorithm as a very simple Password Manager.



Use a real one or any real Password manager.



I will use your example to show why it will be a bad idea:



  • You have the not so "entropy-rich" password 1111111111111

  • it will have the hash 9DCBF642C78137F656BA7C24381AC25B

Now a Attacker get somehow a Database where the Passwords are in clear text (happend to often in the past). And why ever he will accidentally search there for hashes that have know plaintext (the not so "entropy-rich" password is one of it). Now he knows that the user with your username/email uses "1111111111111" and then MD5 it, as Password. What is then the benefit you have? One step more someone must take, but security wise there is no real difference.



Here the Difference what could happend in the Real World:



Your way:



ClearText -- MD5 --> HashedClearText -- sent to Server(HTTP(S))-->| |-- MD5/SHA*/... --> HashedHashedClearText



Normal Way:



ClearText -- sent to Server(HTTP(S)) -->| | -- MD5/SHA*/... --> HashedClearText







share|improve this answer












share|improve this answer



share|improve this answer










answered 10 hours ago









ServerfrogServerfrog

485617




485617












  • The problem i want to avoid is the centralization of passwords As well as the fact that it is not portable to amnesic operating systems

    – AXANO
    10 hours ago











  • avoid centralization with a single hashed password? amnesic operating systems: portable secure device, beside a Human Head that can't really store many Passwords pretty well

    – Serverfrog
    10 hours ago











  • you can be forced to decrypt "portable secure devices"

    – AXANO
    10 hours ago






  • 1





    as you can be force to spell out a Password. xkcd.com/538 (how will you decrypt a password storage or device, without telling them the password. The same holds on your case)

    – Serverfrog
    10 hours ago


















  • The problem i want to avoid is the centralization of passwords As well as the fact that it is not portable to amnesic operating systems

    – AXANO
    10 hours ago











  • avoid centralization with a single hashed password? amnesic operating systems: portable secure device, beside a Human Head that can't really store many Passwords pretty well

    – Serverfrog
    10 hours ago











  • you can be forced to decrypt "portable secure devices"

    – AXANO
    10 hours ago






  • 1





    as you can be force to spell out a Password. xkcd.com/538 (how will you decrypt a password storage or device, without telling them the password. The same holds on your case)

    – Serverfrog
    10 hours ago

















The problem i want to avoid is the centralization of passwords As well as the fact that it is not portable to amnesic operating systems

– AXANO
10 hours ago





The problem i want to avoid is the centralization of passwords As well as the fact that it is not portable to amnesic operating systems

– AXANO
10 hours ago













avoid centralization with a single hashed password? amnesic operating systems: portable secure device, beside a Human Head that can't really store many Passwords pretty well

– Serverfrog
10 hours ago





avoid centralization with a single hashed password? amnesic operating systems: portable secure device, beside a Human Head that can't really store many Passwords pretty well

– Serverfrog
10 hours ago













you can be forced to decrypt "portable secure devices"

– AXANO
10 hours ago





you can be forced to decrypt "portable secure devices"

– AXANO
10 hours ago




1




1





as you can be force to spell out a Password. xkcd.com/538 (how will you decrypt a password storage or device, without telling them the password. The same holds on your case)

– Serverfrog
10 hours ago






as you can be force to spell out a Password. xkcd.com/538 (how will you decrypt a password storage or device, without telling them the password. The same holds on your case)

– Serverfrog
10 hours ago


















draft saved

draft discarded
















































Thanks for contributing an answer to Information Security 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.

To learn more, see our tips on writing great answers.




draft saved


draft discarded














StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fsecurity.stackexchange.com%2fquestions%2f205680%2fhashing-password-to-increase-entropy%23new-answer', 'question_page');

);

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







Popular posts from this blog

Bruad Bilen | Luke uk diar | NawigatsjuunCommonskategorii: BruadCommonskategorii: RunstükenWikiquote: Bruad

What is the offset in a seaplane's hull?

Slayer Innehåll Historia | Stil, komposition och lyrik | Bandets betydelse och framgångar | Sidoprojekt och samarbeten | Kontroverser | Medlemmar | Utmärkelser och nomineringar | Turnéer och festivaler | Diskografi | Referenser | Externa länkar | Navigeringsmenywww.slayer.net”Metal Massacre vol. 1””Metal Massacre vol. 3””Metal Massacre Volume III””Show No Mercy””Haunting the Chapel””Live Undead””Hell Awaits””Reign in Blood””Reign in Blood””Gold & Platinum – Reign in Blood””Golden Gods Awards Winners”originalet”Kerrang! Hall Of Fame””Slayer Looks Back On 37-Year Career In New Video Series: Part Two””South of Heaven””Gold & Platinum – South of Heaven””Seasons in the Abyss””Gold & Platinum - Seasons in the Abyss””Divine Intervention””Divine Intervention - Release group by Slayer””Gold & Platinum - Divine Intervention””Live Intrusion””Undisputed Attitude””Abolish Government/Superficial Love””Release “Slatanic Slaughter: A Tribute to Slayer” by Various Artists””Diabolus in Musica””Soundtrack to the Apocalypse””God Hates Us All””Systematic - Relationships””War at the Warfield””Gold & Platinum - War at the Warfield””Soundtrack to the Apocalypse””Gold & Platinum - Still Reigning””Metallica, Slayer, Iron Mauden Among Winners At Metal Hammer Awards””Eternal Pyre””Eternal Pyre - Slayer release group””Eternal Pyre””Metal Storm Awards 2006””Kerrang! Hall Of Fame””Slayer Wins 'Best Metal' Grammy Award””Slayer Guitarist Jeff Hanneman Dies””Bullet-For My Valentine booed at Metal Hammer Golden Gods Awards””Unholy Aliance””The End Of Slayer?””Slayer: We Could Thrash Out Two More Albums If We're Fast Enough...””'The Unholy Alliance: Chapter III' UK Dates Added”originalet”Megadeth And Slayer To Co-Headline 'Canadian Carnage' Trek”originalet”World Painted Blood””Release “World Painted Blood” by Slayer””Metallica Heading To Cinemas””Slayer, Megadeth To Join Forces For 'European Carnage' Tour - Dec. 18, 2010”originalet”Slayer's Hanneman Contracts Acute Infection; Band To Bring In Guest Guitarist””Cannibal Corpse's Pat O'Brien Will Step In As Slayer's Guest Guitarist”originalet”Slayer’s Jeff Hanneman Dead at 49””Dave Lombardo Says He Made Only $67,000 In 2011 While Touring With Slayer””Slayer: We Do Not Agree With Dave Lombardo's Substance Or Timeline Of Events””Slayer Welcomes Drummer Paul Bostaph Back To The Fold””Slayer Hope to Unveil Never-Before-Heard Jeff Hanneman Material on Next Album””Slayer Debut New Song 'Implode' During Surprise Golden Gods Appearance””Release group Repentless by Slayer””Repentless - Slayer - Credits””Slayer””Metal Storm Awards 2015””Slayer - to release comic book "Repentless #1"””Slayer To Release 'Repentless' 6.66" Vinyl Box Set””BREAKING NEWS: Slayer Announce Farewell Tour””Slayer Recruit Lamb of God, Anthrax, Behemoth + Testament for Final Tour””Slayer lägger ner efter 37 år””Slayer Announces Second North American Leg Of 'Final' Tour””Final World Tour””Slayer Announces Final European Tour With Lamb of God, Anthrax And Obituary””Slayer To Tour Europe With Lamb of God, Anthrax And Obituary””Slayer To Play 'Last French Show Ever' At Next Year's Hellfst””Slayer's Final World Tour Will Extend Into 2019””Death Angel's Rob Cavestany On Slayer's 'Farewell' Tour: 'Some Of Us Could See This Coming'””Testament Has No Plans To Retire Anytime Soon, Says Chuck Billy””Anthrax's Scott Ian On Slayer's 'Farewell' Tour Plans: 'I Was Surprised And I Wasn't Surprised'””Slayer””Slayer's Morbid Schlock””Review/Rock; For Slayer, the Mania Is the Message””Slayer - Biography””Slayer - Reign In Blood”originalet”Dave Lombardo””An exclusive oral history of Slayer”originalet”Exclusive! Interview With Slayer Guitarist Jeff Hanneman”originalet”Thinking Out Loud: Slayer's Kerry King on hair metal, Satan and being polite””Slayer Lyrics””Slayer - Biography””Most influential artists for extreme metal music””Slayer - Reign in Blood””Slayer guitarist Jeff Hanneman dies aged 49””Slatanic Slaughter: A Tribute to Slayer””Gateway to Hell: A Tribute to Slayer””Covered In Blood””Slayer: The Origins of Thrash in San Francisco, CA.””Why They Rule - #6 Slayer”originalet”Guitar World's 100 Greatest Heavy Metal Guitarists Of All Time”originalet”The fans have spoken: Slayer comes out on top in readers' polls”originalet”Tribute to Jeff Hanneman (1964-2013)””Lamb Of God Frontman: We Sound Like A Slayer Rip-Off””BEHEMOTH Frontman Pays Tribute To SLAYER's JEFF HANNEMAN””Slayer, Hatebreed Doing Double Duty On This Year's Ozzfest””System of a Down””Lacuna Coil’s Andrea Ferro Talks Influences, Skateboarding, Band Origins + More””Slayer - Reign in Blood””Into The Lungs of Hell””Slayer rules - en utställning om fans””Slayer and Their Fans Slashed Through a No-Holds-Barred Night at Gas Monkey””Home””Slayer””Gold & Platinum - The Big 4 Live from Sofia, Bulgaria””Exclusive! Interview With Slayer Guitarist Kerry King””2008-02-23: Wiltern, Los Angeles, CA, USA””Slayer's Kerry King To Perform With Megadeth Tonight! - Oct. 21, 2010”originalet”Dave Lombardo - Biography”Slayer Case DismissedArkiveradUltimate Classic Rock: Slayer guitarist Jeff Hanneman dead at 49.”Slayer: "We could never do any thing like Some Kind Of Monster..."””Cannibal Corpse'S Pat O'Brien Will Step In As Slayer'S Guest Guitarist | The Official Slayer Site”originalet”Slayer Wins 'Best Metal' Grammy Award””Slayer Guitarist Jeff Hanneman Dies””Kerrang! Awards 2006 Blog: Kerrang! Hall Of Fame””Kerrang! Awards 2013: Kerrang! Legend”originalet”Metallica, Slayer, Iron Maien Among Winners At Metal Hammer Awards””Metal Hammer Golden Gods Awards””Bullet For My Valentine Booed At Metal Hammer Golden Gods Awards””Metal Storm Awards 2006””Metal Storm Awards 2015””Slayer's Concert History””Slayer - Relationships””Slayer - Releases”Slayers officiella webbplatsSlayer på MusicBrainzOfficiell webbplatsSlayerSlayerr1373445760000 0001 1540 47353068615-5086262726cb13906545x(data)6033143kn20030215029