First page Back Continue Last page Summary Graphic
What the password crypt does
The password crypt() is based on 56 bit DES, with different output based on the salt
(it takes the user's password as the encryption key and uses it to encrypt a 64-bit block of zeros. The resulting 64-bit block of cipher text is then encrypted again with the user's password; the process is repeated a total of 25 times. The final 64 bits are unpacked into a string of 11 printable characters)
How to crypt a plaintext password yourself:
print crypt("password%*^!0","AE");
AEp.KavrfPRpI
print crypt("password","AE");
AEp.KavrfPRpI
print crypt("pássword","AE");
AEp.KavrfPRpI
print crypt("password","/9");
/9qua3Q0m0i3o
Only the first 8 characters are used and their 7 bits
(95 characters to chose from gives 96^8 passwords = 7,213,895,789,838,336)