crypt is not a two way algorithm. It is what is known as a hash.
I may not be able to explain this perfectly, but I'll try to give an idea.
I won't get into details about cryptography (read Cryptonomicon by Neil Stephenson - not a detailed manual, but a good book on the subject - very well researched - and suggests several other books to read).
To put it simply, a two way encryption scheme is limited in it's ability to conceal data because all the data required to get the original input must be contained in the output.
As a very simplified example, if I wanted to encrypt the number 4, there are a number of things I could do. Here is a very simple encryption concept:
the password is seven
multiply by the password
convert each character to alphabetic equivalent
result=BH
So, BH would be 4, and to know that, you have to know that BH means 28 and that you have to devide by the password (7) to get the original input. This could be used with any number and should always work (decimals could be converted to an alphabetic equivalent, if you wished). The problem is, of course, that you are very limited to what you do to the input, because you always have to be able to undo it. For instance, to decrypt BH
convert each letter to the numeric equivalent
devide by the password
the result is 4
However, a one way algorithm (such as crypt) has a much greater freedom in its ability to mangle the input. Again, concealing the number 4:
devide by an approximation of pi
remove the decimal point and trim the result to five characters
convert every other character to letter equivalent starting with the first
advance each letter two places (a=c, b=d, etc)
result=C2F3D
Thus, C2F3D is the result of the input 4, but since most of the resultant data was lost in conversion, converting C2F3D back to 4 is nearly impossible (though, as others can tell you, it is possible to brute force, just much harder).
What crypt does is take your input and use a special seed (That you specify) in the manipulation. That way, you can use the same seed to crypt it again and compare the results. if the results match, the input was the same both times.
I'm sure I got some things wrong, but that is a brief explaination.
-Ben