One-Way Encription And DES Alogorithm Confused
Been reading about encription but am confused about "one way encription" and DES encription.
My confusion is if a one way encription function such as crypt can use DES algorithm then is crypt realy one way?
Resources im using:
http://www.ssh.fi/support/cryptography/introduction/ and http://hotwired.lycos.com/webmonkey/...tw=programming
http://ca2.php.net/manual/en/ref.mcrypt.php
Ok here is what I understand, DES is a symmetric (secret key) based encription alogrithm. It is nolonger considered safe for encripting sensitive data as it can easily be broken with sophisticated hardware/software afordable to governments and organized criminals.
One way encription functions such as crypt in php and linux, offer "message digest hashing" where the cyphertext cannot be decrypted. And this is usefull for username/password pairs in user login systems where the entered password is encripted the same was as it was when it was stored, and if the two hashes match then the password is valid.
My confusion and thus questions arise, if you can use a one way encription function such as crypt, and encript useing the DES alogrithm, then this is not one way correct? Because if DES has been cracked, then its not one way,
PHP Code:
$string = "My secret message";
$salt = "yk"; // Two for DES
$cyphertext = crypt($string, $salt);
Then the cyphertext can be cracked useing hardware corect? Then is crypt realy one way encription?
Obviously very new to encription