FRIHOST FORUMS SEARCH FAQ TOS BLOGS COMPETITIONS
You are invited to Log in or Register a free Frihost Account!


Encryption





imagefree
I am currently using md5 method of encryption for encrypting texts (strings). But i have read a lot of books recommending base 64 encrypting.

Which one of these is most secure and please also tell me if there is even better solution!



I use md5 because there is no direct or easy way to decrypt it.
What do you say? What are pros and cons of using md5 and base 64 in php!

Thanks
MrBlueSky
Base64 is not an encryption, but an encoding: you can (easily) reverse a base64 encoded text:

Code:

echo base64_decode(base64_encode("abc"));


It gives no security at all. Do you mean DES, which uses a standard key of 64 bits?

Md5 gives some security, but it depends on the password. If you have an easy to guess password (a dictionairy word or something like that) it can easily be decoded using google, rainbow-tables or a tool like Cain. Consider for example using "letmein" as pass: The encoded md5 pass is: "0d107d09f5bbe40cade3de5c71e9e9b7". A quick google search reveals the original password.
AftershockVibe
I doubt you meant DES - it's key length is actually 56 bits (the rest are checksum) and a very strange choice since it's a two way encryption not just a hash function.

If you want better security for your hashes then I suggest you use a hasing algorithm with greater length SHA-1 or RipeMD-160. SHA1 is a PHP built in function.

But above all, make sure you salt your passwords! Pick a salt that is long and uses non-standard characters. Preferably, randomly generated. Information here:
http://phpsec.org/articles/2005/password-hashing.html

Can you post your Base 64 links? It'd be interesting to read...
Related topics
A "small" list of free apps
My wirlees
Php - Basic Encryption site
Email Encryption - Do you / would you use it?
Best Encryption Software
[php] encryption
Custom encryption + program
Software for Data encryption!
Private folders in XP
AES encryption in C++
Freeware for Compression algo and Data Encryption
ENCRYPTION
Email Message Free Encryption
Best Encryption Software.
Reply to topic    Frihost Forum Index -> Scripting -> Php and MySQL

FRIHOST HOME | FAQ | TOS | ABOUT US | CONTACT US | SITE MAP
© 2005-2011 Frihost, forums powered by phpBB.