Best encyption methods?

Reply

Join Date: Dec 2007
Posts: 626
Reputation: OmniX is an unknown quantity at this point 
Solved Threads: 10
OmniX's Avatar
OmniX OmniX is offline Offline
Practically a Master Poster

Best encyption methods?

 
2
  #1
Feb 25th, 2009
I have tried to research this and im always running into old articles.

What I have come across are (possibly more):
md5, sha1, hash, crypt and mcrypt

Now I have used md5/sha1 before and have 32/40 character long strings the others I dont know too much about but in short, what is the best encryption method? (I may have not even listed it)

Thanks, Regards X
"You never stop learning." - OmniX
Reply With Quote Quick reply to this message  
Join Date: Sep 2007
Posts: 1,546
Reputation: cwarn23 has a spectacular aura about cwarn23 has a spectacular aura about cwarn23 has a spectacular aura about 
Solved Threads: 137
cwarn23's Avatar
cwarn23 cwarn23 is offline Offline
Posting Virtuoso

Re: Best encyption methods?

 
4
  #2
Feb 25th, 2009
I just love this question. In my opinion, it is best to use more than one hash so that it is harder to crack. And so that those online database chrackers can't store your hash, include the whirlpool hash. So below is a function I have made for a much better hash:
  1. function truehash($hashzzz) {
  2. return hash('crc32b',hash('whirlpool',$hashzzz));
  3. }
The function above will be really hard to crack as it uses oppisite types of output. One of the advantages with the function above is that crc32b is short (less data recorded) and whirlpool is long (containing more data). And since a whirlpool hash is 128 characters long, I doubt anybody will have a giant database of the whirlpool conversions. Of course you could use all of the hashes in the function but may make take a bit of cpu.
Any other comments?
Try not to bump 10 year old threads as it can be really annoying.
http://syntax.cwarn23.net/
Smilies: ^_* +_+ v_v -_- *~*`
My favourite PC. - Oopy Doopy Do 2U2!
Reply With Quote Quick reply to this message  
Join Date: Dec 2007
Posts: 626
Reputation: OmniX is an unknown quantity at this point 
Solved Threads: 10
OmniX's Avatar
OmniX OmniX is offline Offline
Practically a Master Poster

Re: Best encyption methods?

 
0
  #3
Feb 25th, 2009
I havent researched the hash method in depth but what I have understood is that:

hash('$hash_string', $variable);

$hash_string = "abc" or whateva string you wish to use as hash method
$variable = variable wanting to hash (aka password)

So in your example you have doubled hashed your password, once using a long string and then against a short string? correct?

Due to the mix of the long and short encryption you believe this is the best method of encryptions?

The above correct? Thanks
"You never stop learning." - OmniX
Reply With Quote Quick reply to this message  
Join Date: Sep 2007
Posts: 1,546
Reputation: cwarn23 has a spectacular aura about cwarn23 has a spectacular aura about cwarn23 has a spectacular aura about 
Solved Threads: 137
cwarn23's Avatar
cwarn23 cwarn23 is offline Offline
Posting Virtuoso

Re: Best encyption methods?

 
0
  #4
Feb 25th, 2009
Originally Posted by OmniX
Due to the mix of the long and short encryption you believe this is the best method of encryptions?

The above correct? Thanks
Yes that is correct.
Try not to bump 10 year old threads as it can be really annoying.
http://syntax.cwarn23.net/
Smilies: ^_* +_+ v_v -_- *~*`
My favourite PC. - Oopy Doopy Do 2U2!
Reply With Quote Quick reply to this message  
Join Date: Dec 2007
Posts: 626
Reputation: OmniX is an unknown quantity at this point 
Solved Threads: 10
OmniX's Avatar
OmniX OmniX is offline Offline
Practically a Master Poster

Re: Best encyption methods?

 
0
  #5
Feb 25th, 2009
I forgot to ask, how many characters is the string produced?

Also am I correct in that I can use any string I wish to hash a password?

Thanks
"You never stop learning." - OmniX
Reply With Quote Quick reply to this message  
Join Date: Sep 2007
Posts: 1,546
Reputation: cwarn23 has a spectacular aura about cwarn23 has a spectacular aura about cwarn23 has a spectacular aura about 
Solved Threads: 137
cwarn23's Avatar
cwarn23 cwarn23 is offline Offline
Posting Virtuoso

Re: Best encyption methods?

 
0
  #6
Feb 25th, 2009
The returned hash of my truehash function is 8 characters long and yes any string or number can be hashed through this function.
Try not to bump 10 year old threads as it can be really annoying.
http://syntax.cwarn23.net/
Smilies: ^_* +_+ v_v -_- *~*`
My favourite PC. - Oopy Doopy Do 2U2!
Reply With Quote Quick reply to this message  
Join Date: Dec 2007
Posts: 626
Reputation: OmniX is an unknown quantity at this point 
Solved Threads: 10
OmniX's Avatar
OmniX OmniX is offline Offline
Practically a Master Poster

Re: Best encyption methods?

 
0
  #7
Feb 25th, 2009
I think I didnt ask my second question correctly.

The terms 'crc32b' and 'whirlpool' are just random variables selected or actual hash functions? could I have used 'apple123' and 'banana123' instead?
"You never stop learning." - OmniX
Reply With Quote Quick reply to this message  
Join Date: Nov 2007
Posts: 3,761
Reputation: nav33n is a jewel in the rough nav33n is a jewel in the rough nav33n is a jewel in the rough 
Solved Threads: 332
Moderator
Featured Poster
nav33n's Avatar
nav33n nav33n is offline Offline
Senior Poster

Re: Best encyption methods?

 
0
  #8
Feb 25th, 2009
Check this link.. http://www.hudzilla.org/phpbook/read.php/17_3_7
I also read here that md5 can generate collision (and is not safe anymore!). Someone also mentions (in the 2nd link) that whirlpool (as mentioned by cwarn23) is a good replacement! SHA1 isn't a safe encryption method too! Hmm.. I should stop using SHA1 !
Ignorance is definitely not bliss!

*PM asking for help will be ignored*
Reply With Quote Quick reply to this message  
Join Date: Sep 2007
Posts: 1,546
Reputation: cwarn23 has a spectacular aura about cwarn23 has a spectacular aura about cwarn23 has a spectacular aura about 
Solved Threads: 137
cwarn23's Avatar
cwarn23 cwarn23 is offline Offline
Posting Virtuoso

Re: Best encyption methods?

 
0
  #9
Feb 25th, 2009
Originally Posted by OmniX View Post
I think I didnt ask my second question correctly.

The terms 'crc32b' and 'whirlpool' are just random variables selected or actual hash functions? could I have used 'apple123' and 'banana123' instead?
Well the terms 'crc32b' and 'whirlpool' are what tells the computer which type of hash to use, so no you can't change those unless you want to use a different type of hash. It is the second field contains the string to hash.
Try not to bump 10 year old threads as it can be really annoying.
http://syntax.cwarn23.net/
Smilies: ^_* +_+ v_v -_- *~*`
My favourite PC. - Oopy Doopy Do 2U2!
Reply With Quote Quick reply to this message  
Join Date: Nov 2007
Posts: 3,761
Reputation: nav33n is a jewel in the rough nav33n is a jewel in the rough nav33n is a jewel in the rough 
Solved Threads: 332
Moderator
Featured Poster
nav33n's Avatar
nav33n nav33n is offline Offline
Senior Poster

Re: Best encyption methods?

 
0
  #10
Feb 25th, 2009
Originally Posted by cwarn23 View Post
I just love this question. In my opinion, it is best to use more than one hash so that it is harder to crack. And so that those online database chrackers can't store your hash, include the whirlpool hash. So below is a function I have made for a much better hash:
  1. function truehash($hashzzz) {
  2. return hash('crc32b',hash('whirlpool',$hashzzz));
  3. }
The function above will be really hard to crack as it uses oppisite types of output. One of the advantages with the function above is that crc32b is short (less data recorded) and whirlpool is long (containing more data). And since a whirlpool hash is 128 characters long, I doubt anybody will have a giant database of the whirlpool conversions. Of course you could use all of the hashes in the function but may make take a bit of cpu.
Any other comments?
Thats a very nice function. I wish I could give you more rep today
Ignorance is definitely not bliss!

*PM asking for help will be ignored*
Reply With Quote Quick reply to this message  
Reply

Message:



Other Threads in the PHP Forum


Views: 3868 | Replies: 109
Thread Tools Search this Thread



Tag cloud for PHP
About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC