Best encyption methods?

Reply

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

Re: Best encyption methods?

 
0
  #11
Feb 25th, 2009
nav33n my man! How you been!?!?!

Can we download the md5 anti hash method, so we can test our own web applciations?

Also how I assume to use the hash method is correct?

Thanks, REgards X
"You never stop learning." - OmniX
Reply With Quote Quick reply to this message  
Join Date: Nov 2007
Posts: 3,739
Reputation: nav33n is a jewel in the rough nav33n is a jewel in the rough nav33n is a jewel in the rough 
Solved Threads: 330
Moderator
Featured Poster
nav33n's Avatar
nav33n nav33n is offline Offline
Senior Poster

Re: Best encyption methods?

 
1
  #12
Feb 25th, 2009
I am good OmniX! How are you ?

I don't think there is any decrypting script/function which you can download. They have mentioned how there can be a collision between 2 different strings giving out the same hash ! I tried to read some more about the same, but, everything is going right over my head
http://www.mscs.dal.ca/~selinger/md5collision/
http://www.unixwiz.net/techtips/igui...to-hashes.html

Thank you for creating this thread.. I can spend the rest of the evening reading these links
Ignorance is definitely not bliss!

*PM asking for help will be ignored*
Reply With Quote Quick reply to this message  
Join Date: Dec 2007
Posts: 608
Reputation: OmniX is an unknown quantity at this point 
Solved Threads: 8
OmniX's Avatar
OmniX OmniX is offline Offline
Practically a Master Poster

Re: Best encyption methods?

 
0
  #13
Feb 25th, 2009
I have had no internet for months!

I have alot of catching up to do so join me :p

Ill do some more research and wait for a few more additional comments and come up with something.

But am I assuming how the hash method works, is correct?
(use any string to encrypt a variable to produce a unique 8 character string?)
"You never stop learning." - OmniX
Reply With Quote Quick reply to this message  
Join Date: Sep 2007
Posts: 1,440
Reputation: cwarn23 has a spectacular aura about cwarn23 has a spectacular aura about cwarn23 has a spectacular aura about 
Solved Threads: 135
cwarn23's Avatar
cwarn23 cwarn23 is offline Offline
Nearly a Posting Virtuoso

Re: Best encyption methods?

 
0
  #14
Feb 25th, 2009
Originally Posted by nav33n View Post
I don't think there is any decrypting script/function which you can download. They have mentioned how there can be a collision between 2 different strings giving out the same hash ! I tried to read some more about the same, but, everything is going right over my head
Although there may be no dehasher on the market that doesn't stop you from making one. But it does require about 2 petabytes of hardrive space (2048TB or 2097152GB). I have created a dehasher that simply records every key combination and its hash into a mysql database then when dehashing, just simply do a reverse lookup by searching for the recorded hash and original word when the entry was generated. Just let me know if you would like the script.
Try not to bump 10 year old threads as it can be really annoying.
Like php then read my website at http://syntax.cwarn23.net/
Star-Trek-Atlantis - now that's what I call a movie ^_^
My favourite PC. - MacGyver Fan
Bad english note: dis-iz-2b4u
Reply With Quote Quick reply to this message  
Join Date: Nov 2007
Posts: 3,739
Reputation: nav33n is a jewel in the rough nav33n is a jewel in the rough nav33n is a jewel in the rough 
Solved Threads: 330
Moderator
Featured Poster
nav33n's Avatar
nav33n nav33n is offline Offline
Senior Poster

Re: Best encyption methods?

 
0
  #15
Feb 25th, 2009
But am I assuming how the hash method works, is correct?
(use any string to encrypt a variable to produce a unique 8 character string?)
Yep. Thats correct. In this case, the algorithm convert it to 8 character string.
Ignorance is definitely not bliss!

*PM asking for help will be ignored*
Reply With Quote Quick reply to this message  
Join Date: Nov 2007
Posts: 3,739
Reputation: nav33n is a jewel in the rough nav33n is a jewel in the rough nav33n is a jewel in the rough 
Solved Threads: 330
Moderator
Featured Poster
nav33n's Avatar
nav33n nav33n is offline Offline
Senior Poster

Re: Best encyption methods?

 
0
  #16
Feb 25th, 2009
Originally Posted by cwarn23 View Post
Although there may be no dehasher on the market that doesn't stop you from making one. But it does require about 2 petabytes of hardrive space (2048TB or 2097152GB). I have created a dehasher that simply records every key combination and its hash into a mysql database then when dehashing, just simply do a reverse lookup by searching for the recorded hash and original word when the entry was generated. Just let me know if you would like the script.
Woah ! Something like a keylogger ? Is it in php or java/vb.net ?
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,440
Reputation: cwarn23 has a spectacular aura about cwarn23 has a spectacular aura about cwarn23 has a spectacular aura about 
Solved Threads: 135
cwarn23's Avatar
cwarn23 cwarn23 is offline Offline
Nearly a Posting Virtuoso

Re: Best encyption methods?

 
1
  #17
Feb 25th, 2009
Originally Posted by nav33n View Post
Woah ! Something like a keylogger ? Is it in php or java/vb.net ?
It is php and to dehash sha1 you can simply use the following scripts (page titles are on second line of each code box):
  1. <?
  2. //db.php
  3. //configure below mysql variables
  4. $dbhost='localhost';
  5. $accountname='root';
  6. $password='';
  7. $database='my database';
  8. ?>
Above box will configure the database. The database needs a table with the name 'dehasher' and two columns each named 'word' and 'hash'. Also the above must be named db.php
Below is the search page (index.php)
  1. <?
  2. //index.php
  3. if (isset($_GET['hash']))
  4. {
  5. set_time_limit(0);
  6. ini_set('memory_limit','512M');
  7. ini_set('mysql.cache_size','1073741824');
  8. include('db.php');
  9. mysql_connect($dbhost,$accountname,$password)
  10. or die("Could not connect to MySQL server");
  11. mysql_select_db($database) or die(mysql_error()."Could not select database");
  12. $rowid=0;
  13. $sqlresult=mysql_query("SELECT * FROM `dehasher`");
  14. while ($row = mysql_fetch_array($sqlresult))
  15. {
  16. if ($_GET['hash']==$row['hash'])
  17. {
  18. $word=$row['word'];
  19. $dehashed=1;
  20. break;
  21. }
  22. }
  23. mysql_free_result($sqlresult);
  24. unset($row);
  25. }
  26. echo "Enter in the details below and click the dehash button to dehash the code.<br>
  27. <b>Please note it may take a few minutes to dehash due to the size of the database</b><br>
  28. <table border=1 cellpadding=5 cellspacing=0 bgcolor=#FFCCCC><tr><td>
  29. <form style='padding:0; margin:0;'>
  30. <table border=0 cellpadding=0 cellspacing=0 bgcolor=#FFCCCC><tr><td>
  31. Insert hash below</td><td>Hash type</td></tr><tr><td valign=top>
  32. <input type='text' name='hash' size=50> </td><td align=left><input type='submit' value='dehash'>
  33. </td></tr></table>
  34. </form></td></tr></table>";
  35. if (!isset($dehashed)) { $dehashed=0; }
  36. if ($dehashed==1)
  37. {
  38. echo "<p>.<p><font size=3>The hash was decrypted successfully.<br>Below are the details:<br>
  39. <table border=1 cellpadding=0 cellspacing=0><tr><td>
  40. <table border=0 cellpadding=4 cellspacing=0><tr>
  41. <td bgcolor=#EEBBBB><font face='arial'><b>Word</b></font></td><td bgcolor=#FFCCCC>".$word."</td></tr><tr>
  42. <td bgcolor=#D8CCCC><font face='arial'><b>Hash</b></font></td><td bgcolor=#E9DDDD>".$_GET['hash']."</td></tr></table>
  43. </td></tr></table>";
  44. } else if (isset($_GET['hash'])) {
  45. echo "<b>Your hash could not be decrypted.</b>";
  46. }
  47. ?>
And below is the database generator:
  1. <?
  2. //generator.php
  3. set_time_limit(0);
  4. ini_set('memory_limit','2147483648M');
  5. ini_set('mysql.cache_size','1073741824');
  6. include('db.php');
  7. mysql_connect($dbhost,$accountname,$password)
  8. or die("Could not connect to MySQL server");
  9. mysql_select_db($database) or die(mysql_error()."Could not select database");
  10. $rownum=0;
  11. //echo - text debugger for IE.
  12. echo "<img src=0.gif width=1 height=1 alt=' ".
  13. " '><br>";
  14. $list=" ABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890`~!@#$%^&*()-_=+\|[{]};:\"',<.>/?abcdefghijklmnopqrstuvwxyz.,";
  15. $loops=38430716820228233;
  16. $chars=30;
  17. $allwords=array();
  18. $sqlresult=mysql_query("SELECT `word` FROM `dehasher`");
  19. while ($row = mysql_fetch_array($sqlresult))
  20. {
  21. $allwords[]=$row['word'];
  22. }
  23. mysql_free_result($sqlresult);
  24. unset($row);
  25. unset($sqlresult);
  26. while (count($allwords)<$loops)
  27. {
  28. $escapecharplus=0;
  29. $repeat=mt_rand(1,$chars);
  30. while ($escapecharplus<$repeat)
  31. {
  32. $randomword.=$list[mt_rand(1, strlen($list)-1)];
  33. $escapecharplus+=1;
  34. }
  35. if (!in_array($randomword,$allwords))
  36. {
  37. $allwords[]=$randomword;
  38. $rowid+=1;
  39. mysql_query("INSERT INTO `dehasher` SET `word`='".mysql_real_escape_string($randomword).
  40. "', `hash`='".mysql_real_escape_string(hash('sha1', $randomword))."'");
  41. echo mysql_error();
  42. $rownum+=1;
  43. echo "<xmp>".$randomword."\n</xmp>";
  44. flush();
  45. unset($randomword);
  46. if (mt_rand(1,32)==2)
  47. {
  48. mysql_query("DELETE FROM `dehasher` WHERE `word`=''; DELETE FROM `dehasher` WHERE `hash`=''");
  49. }
  50. usleep(50000); // lower cpu
  51. }
  52. }
  53. ?>
But as you can see, if you used a whirlpool hash it would take 4 times the amount of hardrive space than the average size hash assuming the average size hash is 32 characters. But have fun dehashing if you have plenty of harddrive space.
Try not to bump 10 year old threads as it can be really annoying.
Like php then read my website at http://syntax.cwarn23.net/
Star-Trek-Atlantis - now that's what I call a movie ^_^
My favourite PC. - MacGyver Fan
Bad english note: dis-iz-2b4u
Reply With Quote Quick reply to this message  
Join Date: Nov 2007
Posts: 3,739
Reputation: nav33n is a jewel in the rough nav33n is a jewel in the rough nav33n is a jewel in the rough 
Solved Threads: 330
Moderator
Featured Poster
nav33n's Avatar
nav33n nav33n is offline Offline
Senior Poster

Re: Best encyption methods?

 
0
  #18
Feb 25th, 2009
Hmm.. one question though.. The table will store random strings and their hashes.. I guess it would be more efficient if a dictionary (like the ones used in Brute force) with all the commonly used words are also stored..
Ignorance is definitely not bliss!

*PM asking for help will be ignored*
Reply With Quote Quick reply to this message  
Join Date: Dec 2007
Posts: 608
Reputation: OmniX is an unknown quantity at this point 
Solved Threads: 8
OmniX's Avatar
OmniX OmniX is offline Offline
Practically a Master Poster

Re: Best encyption methods?

 
0
  #19
Feb 25th, 2009
So if your double hasing a password as such, why not just make it even harder and make it a triple hasher with 3 unique words like banana, apple and pear? and if not even harder with apricot, peach, grape and just make a like 10 x hash encrypter?

Im just trying to understand the functioning of the hash encrypter before I start on my encrypting!

Thanks, Regards X
"You never stop learning." - OmniX
Reply With Quote Quick reply to this message  
Join Date: Nov 2007
Posts: 3,739
Reputation: nav33n is a jewel in the rough nav33n is a jewel in the rough nav33n is a jewel in the rough 
Solved Threads: 330
Moderator
Featured Poster
nav33n's Avatar
nav33n nav33n is offline Offline
Senior Poster

Re: Best encyption methods?

 
0
  #20
Feb 25th, 2009
You can! But you will just be adding unnecessary overload to your CPU ! I think you can use cwarn23's function. Its neat !
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
Thread Tools Search this Thread



About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC