crypt
- char *crypt(const char *key, const char *salt);
- The key is the plain text string to be encrypted
- The salt is a randomization factor.
- A value in [a-zA-Z./]
- It was an attempt to make it more difficult to store all encrypted passwords.
- It increased the storage space required by a factor of 4096
- With DES, crypt only used the first 8 characters of the plain text password.
- This has never been a good solution, see this paper about faster crypt from 1988.
- Here is a really nice paper on the subject of rainbow tables.
- Modern Salts
- Currently glib c supports the following salts
- 1: MD5
- 5: SHA-256
- 6: SHA-5122
- SHA is the Secure Hash Algorithm.
- To use these, use a salt in the form of
- $id$salt$encrypted
- ID is from the table.
- Salt is up to 16 characters from [a-zA-Z0-9./]
- The entire plain text password is used.