can someone tell me how to use and exploit the MD5 ALgO for a file crypting prog

and a file decrypting prog

thanks

and a file decrypting prog

thanks

Question is not clear; I'll take a stab at it ;)

A hash is used to 'ensure' data has not changed. Together with a PK crypto algorithm, you can also sign data:

sender

1) hash data

2) encrypt (with private key)

receiver

1) decrypt (with public key)

2) hash data

3) compare newly calculated hash and decrypted hash

If equal, the data is almost certainly authentic: the sender is known (assuming you have his public key), and the data is unchanged.

The SHA-1 algorithm (FIPS 180-1) is more secure, and not too much slower - I'd use it instead.

If you just want to encrypt and decrypt something, then a hash won't do you a lot of good - they are by definition 'one-way' functions.

A hash is used to 'ensure' data has not changed. Together with a PK crypto algorithm, you can also sign data:

sender

1) hash data

2) encrypt (with private key)

receiver

1) decrypt (with public key)

2) hash data

3) compare newly calculated hash and decrypted hash

If equal, the data is almost certainly authentic: the sender is known (assuming you have his public key), and the data is unchanged.

The SHA-1 algorithm (FIPS 180-1) is more secure, and not too much slower - I'd use it instead.

If you just want to encrypt and decrypt something, then a hash won't do you a lot of good - they are by definition 'one-way' functions.

MD5 is not used to encrypt data, it is instead used to validate data.

Example:

many sites when they offer an ISO image for download will also have available the MD5 hash of that ISO (an MD5 hash is 32 bytes long). Once you have downloaded the ISO, you can use one of many tools to obtain the MD5 hash from the image you have, and compare it to the MD5 the site has, if the two MD5 hashes are the same then your downloaded image is perfect, if they are not the same then the image is corrupted. So the MD5 hash is kind of like a signature or a fingerprint.

Example:

many sites when they offer an ISO image for download will also have available the MD5 hash of that ISO (an MD5 hash is 32 bytes long). Once you have downloaded the ISO, you can use one of many tools to obtain the MD5 hash from the image you have, and compare it to the MD5 the site has, if the two MD5 hashes are the same then your downloaded image is perfect, if they are not the same then the image is corrupted. So the MD5 hash is kind of like a signature or a fingerprint.

You can use md5 to "encrypt" passwords. Encrypt is not the correct worb because is not a true encryption

Linux uses md5 passwords

Linux uses md5 passwords