

That’s it, you now know how to use MD5 salt in your code, and why it’s so important if you want to stay with an MD5 encryption method.īut if you can, it’s probably the best option to choose another algorithm. If your salt is “1234” it’s like you didn’t use one (azerty or azerty1234 are two weak passwords). In PHP for example, you need to use the point symbol to concatenate two strings: ĭon’t forget to use a long salt, or even better a dynamic salt. In fact, it’s easy, you just need to concatenate the two strings together. Now that you are convinced that this is important, here’s how to do it. That’s why using salt, or at least asking for long passwords is a good practice.
#Md5 encoding online password#
You understand that with a password of 30 characters or more there is probably no database that will have the information, except for basic phrases. You could guess that a 6 characters password is two times safer than a 3 characters password.īut no, it adds a lot more possibilities for each additional character. 5 characters password: 380,204,032 possibilities.So the number of total hash to generate and store increase fast: If we don’t consider special characters, there are 62 possibilities for each password letter: So if you add 32 characters with your salt, no matter the password size, you’re almost safe.Īnd it’s the same problem by using an MD5 hash database. I don’t have the current time needed for each password length, but the more characters you have the best it is. In brute force mode, the attacker will probably start with the most common passwords, and then start the alphabet list (a, b, … aa, ab, …). With both methods, the password length is an issue for him to find the decrypted hash value. If you want to learn more about this MD5 decryption methods, click on the link to check my other post on the subject. Using a database: look up for the word in a database.


The main weakness of the MD5 algorithm is its speed. More details Why do you need to use salt with MD5? How to decrypt a MD5? Here is an example with the same password and the static salt: username password b.king 81345f0d478885f72dd51c07cc3ab146 m.donald 244b7f46f6aa268fc862e73d81cfc832īecome an ethical hacker that can hack computer systems like black hat hackers and secure them like security experts. So, he will try without, and maybe never find your passwords. The database with salt looks like the same as previously.Īnd that’s the strength of that strategy, the attacker will not now directly if you are using salt or not. It’s a basic example, you have to find a better salt, that looks like a random value but that you can find easily to generate password hash. Or even better, a MD5 hash of the account creation date, like this: “azertyd003a3d8626f9a78abc9ce900b217819”. To avoid him to understand that, you may use dynamic salt.įor example, you can use the account creation date as salt: “azerty20190512”. If he knows that he needs to add “randomstringforsalt” before each password, your salt is no longer useful. If you always use the same salt, an attacker can find it, and then make his job easier. It will be as if the m.donald password was strong, while it is the weakest in the world.Īt the time I write these lines, the corresponding MD5 is not in the MD5Online database 🙂 Use a dynamic salt So if the m.donald password is “azerty”, you’ll encrypt “randomstringforsaltazerty” instead. You can choose to add a static salt like “randomstringforsalt” before any password. If you start using salt, you’ll need to concatenate a string to the use password. If you use the MD5 decryption tool on MD5Online, you’ll find in a second what these passwords are. This is what the table looks like when you use a MD5 function to store the password. Let’s take two users from your database, it will look like this: username password b.king 5f4dcc3b5aa765d61d8327deb882cf99 m.donald ab4f63f9ac65152575886860dde480a1 Let’s say you want to store user passwords in a database.Īs often, you may want to use MD5 to store the password. I already gave you the answer in the introduction, but I’ll give you an example in this part. Password Strength Classifier | Machine Learning What is an MD5 salt?
