Tool to use the crypt() function for hashing/encryption of passwords using MD5, Blowfish, bCrypt, SHA256 or SHA512.
Crypt() Hashing Function - dCode
Tag(s) : Modern Cryptography
dCode is free and its tools are a valuable help in games, maths, geocaching, puzzles and problems to solve every day!
A suggestion ? a feedback ? a bug ? an idea ? Write to dCode!
The only way to crack a 'crypt()' hashed password is to use a brute-force attack, testing millions/billions of passwords. dCode recommends tools like Hashcat https://hashcat.net/hashcat/
Crypt is a function developed for storing passwords (mainly on UNIX systems) which is based on hash functions. It takes as a parameter a character string (the password) and a salt (in order to complicate brute-force decryption attempts).
In general, crypt use a hash algorithm and apply the chosen parameters to it (generally several iterations) in order to generate a unique identifier string containing the hash of the password (and the parameters used). This string will be stored by the system. When a user wants to test a password with, the algorithm will have to regenerate the string again with the same parameters, if the 2 strings are identical, then the password is also identical.
In order to further secure the passwords, it is recommended to use a fairly long password, a unique salt for each password, and to apply algorithms with significant calculation costs (ie. must be long and memory intensive, which is generally done by increasing the number of iterations of the algorithm).
The encryption is one-way (principle of hash functions), that is to say it cannot be decrypted with a decrypt function.
The only way to find a password is to try all the possibilities. This type of attack is potentially possible but very difficult in practice because it can take days or years of calculations.
If the password has no salt, then it is possible to use the rainbow tables, storing the most commonly used passwords.
If the password is short (low length), and the salt is known then trying all possible strings represents 255 ^ (length) calculations.
If the algorithm used is weak, fast to compute and parallelizable, then it is possible to compute more crypt() per second and speed up the search.
A hash from the Crypt function usually begins with the symbol $ followed by a number. There is a variant where the string begins with _ (underscore) and another without an immediately recognizable signature.
|$2$, $2a$, $2b$, $2x$, $2y$||Blowfish (bCrypt)|
The string then contains any parameters and the salt used. The calculated hashes are encoded in a base 64 using the alphabet ./0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz
Example: $2y$10$secretsecretsecretse$.Qs2cjeDDosPe31wRbYCwnTcids4c4Ca (version bCrypt/Blowfish)
Example: $5$secret$BG4MkQdYxdLv2KOoRkK.3omTkZhME3rKNpREJ3pgmI8 (version SHA-256)
Reminder : dCode is free to use.
The copy-paste of the page "Crypt() Hashing Function" or any of its results, is allowed as long as you cite dCode!
Cite as source (bibliography):
Crypt() Hashing Function on dCode.fr [online website], retrieved on 2023-02-08,