NamePros
Welcome, Guest! Ready to make a name for yourself in the domain business? We welcome both the hobbyist and professional domainer to join the discussion as part of the NamePros community.

Click here to create your profile to start earning reputation for posting, and trader ratings for buying & selling in our free e-marketplace. Build your trader rating with each successful sale. Our system has tracked over 100,000 sales and counting!
FAQ & TOS Register Search Today's Posts Mark Forums Read

Go Back   NamePros.com > Website Development Discussion Forums > Programming > Webmaster Tutorials
Reload this Page Md5()

Webmaster Tutorials Instructional webmaster-related how-to's and tutorials.

Advanced Search
0 members in live chat ~  


Closed Thread
 
LinkBack Thread Tools
Old 03-04-2006, 01:29 PM THREAD STARTER               #1 (permalink)
NamePros Regular
 
asgsoft's Avatar
Join Date: Sep 2005
Location: At Home
Posts: 881
asgsoft is a glorious beacon of lightasgsoft is a glorious beacon of lightasgsoft is a glorious beacon of lightasgsoft is a glorious beacon of lightasgsoft is a glorious beacon of lightasgsoft is a glorious beacon of lightasgsoft is a glorious beacon of lightasgsoft is a glorious beacon of light
 



Md5()


MD5, a hash encrytion of texts. although it is supposed to be uncovertable it can be converted back recently. it is a very easy function to use but uesed a lot in sending encrypted data and storing it, like this forum it uses it to store passwords. this is how it works:
PHP Code:
$text="test text";
$encryptedmd5($text);
echo 
$encrypted
this will ouput 1e2db57dd6527ad4f8f281ab028d2c70. but to make it more secure like what IPB does it to double encypt it. so it looks like this:
????: NamePros.com http://www.namepros.com/webmaster-tutorials/173486-md5.html
PHP Code:
$text="test text";
$encryptedmd5(md5($text));
echo 
$encrypted
this will output: a932721fa7514980123ca95f1e94cb47 which is harder to crack becuase it is an encrytption of an encryptiom.

hope that helps.
asgsoft is offline  
Old 05-10-2006, 06:53 AM   #2 (permalink)
Senior Member
 
RickM's Avatar
Join Date: Sep 2005
Location: Herts, UK
Posts: 3,806
RickM has a brilliant futureRickM has a brilliant futureRickM has a brilliant futureRickM has a brilliant futureRickM has a brilliant futureRickM has a brilliant futureRickM has a brilliant futureRickM has a brilliant futureRickM has a brilliant futureRickM has a brilliant futureRickM has a brilliant future
 


Cancer Survivorship Save The Children Save The Children Cancer Animal Cruelty Child Abuse Cancer Survivorship 9/11/01 :: Never Forget Animal Cruelty Child Abuse Animal Rescue Animal Cruelty Protect Our Planet Protect Our Planet Protect Our Planet Animal Cruelty Save a Life
A better sollution is sh1

it works exactly the same as md5 except you replace md5 with sh1.

Combine this with ROT13 and salt and you have secure encryption
__________________
Disney World Fans - Mobile Apps for your WDW Vacation!
WSDReg - Affordable Domain Registration. Serving NP members since 2006!

Hotel Site Script - 15% Discount for NP members with code 'NPROS'
RickM is offline  
Old 05-10-2006, 09:46 AM THREAD STARTER               #3 (permalink)
NamePros Regular
 
asgsoft's Avatar
Join Date: Sep 2005
Location: At Home
Posts: 881
asgsoft is a glorious beacon of lightasgsoft is a glorious beacon of lightasgsoft is a glorious beacon of lightasgsoft is a glorious beacon of lightasgsoft is a glorious beacon of lightasgsoft is a glorious beacon of lightasgsoft is a glorious beacon of lightasgsoft is a glorious beacon of light
 



do you have any code examples?
asgsoft is offline  
Old 05-10-2006, 11:29 AM   #4 (permalink)
Senior Member
 
dhscott's Avatar
Join Date: Apr 2006
Posts: 1,345
dhscott is a name known to alldhscott is a name known to alldhscott is a name known to alldhscott is a name known to alldhscott is a name known to alldhscott is a name known to all
 



The only things I can think of that would require MD5() are for logins. For that you need a database, MySQL goes well with PHP.

An example I found on the net can be found here. I haven't tried it out yet, but I intend to later on just to see how it works. It requires MySQL.

Judging by reading the summary, it MD5's on the clientside and macthes it up on the serverside instead of sending a plain-text password as it were... I'm confused now!

Bah, i'll find an easier example that's easy to get!
dhscott is offline  
Old 05-10-2006, 12:36 PM THREAD STARTER               #5 (permalink)
NamePros Regular
 
asgsoft's Avatar
Join Date: Sep 2005
Location: At Home
Posts: 881
asgsoft is a glorious beacon of lightasgsoft is a glorious beacon of lightasgsoft is a glorious beacon of lightasgsoft is a glorious beacon of lightasgsoft is a glorious beacon of lightasgsoft is a glorious beacon of lightasgsoft is a glorious beacon of lightasgsoft is a glorious beacon of light
 



I ment for rmwebs's post?

How will the code look like?
asgsoft is offline  
Old 05-10-2006, 01:14 PM   #6 (permalink)
Senior Member
 
dhscott's Avatar
Join Date: Apr 2006
Posts: 1,345
dhscott is a name known to alldhscott is a name known to alldhscott is a name known to alldhscott is a name known to alldhscott is a name known to alldhscott is a name known to all
 



D'oh! Didn't see you wrote the thread!

Not familiar with ROT13 either, what is this?
dhscott is offline  
Old 05-10-2006, 03:54 PM   #7 (permalink)
NamePros Regular
 
Tree's Avatar
Join Date: Feb 2006
Location: Atlanta, GA, USA
Posts: 335
Tree will become famous soon enoughTree will become famous soon enough
 



ROT13 advances letters thirteen characters.

a = n
b = o
c = p
etc, etc.

More on MD5
Too much about MD5
Tree is offline  
Old 05-10-2006, 05:18 PM   #8 (permalink)
Tech Support
Join Date: Mar 2005
Posts: 4,944
Eric Has achieved greatnessEric Has achieved greatnessEric Has achieved greatnessEric Has achieved greatnessEric Has achieved greatnessEric Has achieved greatnessEric Has achieved greatnessEric Has achieved greatnessEric Has achieved greatnessEric Has achieved greatnessEric Has achieved greatness
 

Member of the Month
MOTM September 2005
Save a Life Child Abuse 9/11/01 :: Never Forget Baby Health Marrow Donor Program AIDS/HIV Breast Cancer Animal Rescue Cystic Fibrosis Ethan Allen Fund Animal Cruelty Ethan Allen Fund Ethan Allen Fund Baby Health Cancer Alzheimer's Protect Our Planet Cancer Survivorship SIDS Child Abuse Diabetes Protect Our Planet Multiple Sclerosis Autism Adoption Special Olympics
Originally Posted by rmwebs
A better sollution is sh1

it works exactly the same as md5 except you replace md5 with sh1.

Combine this with ROT13 and salt and you have secure encryption
I believe you mean sha1
????: NamePros.com http://www.namepros.com/showthread.php?t=173486

www.php.net/sha1
Eric is offline  
Old 05-11-2006, 04:22 AM   #9 (permalink)
NamePros Regular
 
kiore's Avatar
Join Date: Nov 2005
Location: Auckland, New Zealand
Posts: 283
kiore is a jewel in the roughkiore is a jewel in the roughkiore is a jewel in the rough
 




Originally Posted by rmwebs
Combine this with ROT13 and ...
Better still, for extra security, double encrypt with ROT13.
__________________
Ramblings: Twitter | Blog: Domaining .NZ | Sales: Hot Domains | Portfolio: Rare Domains
kiore is offline  
Old 05-11-2006, 09:47 AM   #10 (permalink)
NamePros Member
 
J4m!3's Avatar
Join Date: Oct 2005
Location: Clevedon, UK
Posts: 198
J4m!3 will become famous soon enoughJ4m!3 will become famous soon enough
 



Wow im confused lol
J4m!3 is offline  
Old 05-31-2006, 07:22 AM   #11 (permalink)
Senior Member
 
RickM's Avatar
Join Date: Sep 2005
Location: Herts, UK
Posts: 3,806
RickM has a brilliant futureRickM has a brilliant futureRickM has a brilliant futureRickM has a brilliant futureRickM has a brilliant futureRickM has a brilliant futureRickM has a brilliant futureRickM has a brilliant futureRickM has a brilliant futureRickM has a brilliant futureRickM has a brilliant future
 


Cancer Survivorship Save The Children Save The Children Cancer Animal Cruelty Child Abuse Cancer Survivorship 9/11/01 :: Never Forget Animal Cruelty Child Abuse Animal Rescue Animal Cruelty Protect Our Planet Protect Our Planet Protect Our Planet Animal Cruelty Save a Life
*a little bumpy update*

SHA1:
PHP Code:
<?php    
if($_POST['go'] == 'Go')
{
    echo 
sha1($_POST['text']);
} else {
echo 
"<form method='post' action='encrypt.php'>
<input type='text' name='text'> <input type='submit' name='go' value='Go'>
</form>"
;
}
?>
That gives the SHA1 output.
For extra security:

PHP Code:
<?php    
if($_POST['go'] == 'Go')
????: NamePros.com http://www.namepros.com/showthread.php?t=173486
{
    echo 
sha1(md5(str_rot13($_POST['text'])));
} else {
echo 
"<form method='post' action='encrypt.php'>
<input type='text' name='text'> <input type='submit' name='go' value='Go'>
</form>"
;
}
?>
The above will do SHA1, MD5 and then ROT13
__________________
Disney World Fans - Mobile Apps for your WDW Vacation!
WSDReg - Affordable Domain Registration. Serving NP members since 2006!

Hotel Site Script - 15% Discount for NP members with code 'NPROS'
RickM is offline  
Old 05-31-2006, 08:35 AM   #12 (permalink)
NamePros Member
 
dchesterton's Avatar
Join Date: Aug 2005
Location: Essex, UK
Posts: 139
dchesterton will become famous soon enoughdchesterton will become famous soon enough
 




Quote:
although it is supposed to be uncovertable it can be converted back recently
This statement is 100% false. You cannot convert back MD5, it is true that collisions have been found but all that means is that two different strings produce the same hash. They are still nearly impossible to find.

Any encryption is prone to dictionary attacks if you don't include a salt. An MD5 encryption with a salt will be more than enough for many sites out there although if you are serious about security I would recommend hashing with SHA256 or even SHA512 and including a pre-set SALT that only you know and a random SALT which will be stored in the database with the password. That way even if a user gets the hashed password and the SALT they still cannot use a dictionary attack as they do not have the secret salt that only you know.

Quote:
The only things I can think of that would require MD5() are for logins. For that you need a database, MySQL goes well with PHP.

An example I found on the net can be found here. I haven't tried it out yet, but I intend to later on just to see how it works. It requires MySQL.

Judging by reading the summary, it MD5's on the clientside and macthes it up on the serverside instead of sending a plain-text password as it were... I'm confused now!
You are correct that passwords are normally stored in a MySql database, but what if somebody (even a site admin) gains access to the database? The passwords are there in plain-text. If they are hashed (not encrypted, two totally different things) then it's impossible to find the users' password.

Unfortunately the password's will still be sent in plaintext from the client to the server, this is where SSL certificates are needed.

I have also heard, might not be completely true but if you hash an already hashed string it increases the chance of collisions. Don't ask me how though
????: NamePros.com http://www.namepros.com/showthread.php?t=173486

Hope that all made sense
dchesterton is offline  
Old 05-31-2006, 09:06 AM   #13 (permalink)
Senior Member
 
RickM's Avatar
Join Date: Sep 2005
Location: Herts, UK
Posts: 3,806
RickM has a brilliant futureRickM has a brilliant futureRickM has a brilliant futureRickM has a brilliant futureRickM has a brilliant futureRickM has a brilliant futureRickM has a brilliant futureRickM has a brilliant futureRickM has a brilliant futureRickM has a brilliant futureRickM has a brilliant future
 


Cancer Survivorship Save The Children Save The Children Cancer Animal Cruelty Child Abuse Cancer Survivorship 9/11/01 :: Never Forget Animal Cruelty Child Abuse Animal Rescue Animal Cruelty Protect Our Planet Protect Our Planet Protect Our Planet Animal Cruelty Save a Life
Actualy, MD5 can be decrypted...it has only recently been found out though.

I wont post code up here that will prove this as i wouldnt want to create security problems for anyone, however i can assure you - MD5 is very decryptable...i have been able to decrypt upto 10 chars so far, and im sure others have got furthur.

I would appreciate it if people stopped PMing me asking for the code...regardless of your reasoning, i would prefer not to release it.

You can find it the same way i did...www.google.com
__________________
Disney World Fans - Mobile Apps for your WDW Vacation!
WSDReg - Affordable Domain Registration. Serving NP members since 2006!

Hotel Site Script - 15% Discount for NP members with code 'NPROS'
RickM is offline  
Old 05-31-2006, 02:24 PM   #14 (permalink)
Senior Member
 
Scott's Avatar
Join Date: Jun 2003
Location: UK
Posts: 3,541
Scott has a reputation beyond reputeScott has a reputation beyond reputeScott has a reputation beyond reputeScott has a reputation beyond reputeScott has a reputation beyond reputeScott has a reputation beyond reputeScott has a reputation beyond reputeScott has a reputation beyond reputeScott has a reputation beyond reputeScott has a reputation beyond reputeScott has a reputation beyond repute
 

Member of the Month
February 2005

MD5 can't be decrypted... MD5 produces a cryptographic hash. A hash cannot be decrypted or "converted back". MD5 is still very safe if used with a salt.
Scott is offline  
Old 05-31-2006, 04:01 PM   #15 (permalink)
Account Suspended
Join Date: Oct 2005
Location: United Kingdom
Posts: 1,554
NetworkTown.Net is just really niceNetworkTown.Net is just really niceNetworkTown.Net is just really niceNetworkTown.Net is just really nice
 



Originally Posted by Scott
MD5 can't be decrypted... MD5 produces a cryptographic hash. A hash cannot be decrypted or "converted back". MD5 is still very safe if used with a salt.
well i just did a google search and found a site that can decrypt md5 i tried it and worked.
NetworkTown.Net is offline  
Old 05-31-2006, 04:22 PM   #16 (permalink)
Senior Member
 
Scott's Avatar
Join Date: Jun 2003
Location: UK
Posts: 3,541
Scott has a reputation beyond reputeScott has a reputation beyond reputeScott has a reputation beyond reputeScott has a reputation beyond reputeScott has a reputation beyond reputeScott has a reputation beyond reputeScott has a reputation beyond reputeScott has a reputation beyond reputeScott has a reputation beyond reputeScott has a reputation beyond reputeScott has a reputation beyond repute
 

Member of the Month
February 2005

Originally Posted by gameztown
well i just did a google search and found a site that can decrypt md5 i tried it and worked.
OK. "Decrypt" this: 981d5552164c6b0865a9c161432c290e
Scott is offline  
Old 05-31-2006, 04:41 PM   #17 (permalink)
NamePros Member
 
dchesterton's Avatar
Join Date: Aug 2005
Location: Essex, UK
Posts: 139
dchesterton will become famous soon enoughdchesterton will become famous soon enough
 




Well please provide a link then. It is impossible to decrypt a hash, there is a difference between encryption and hashing. I'm guessing the site these people are referring to is http://www.md5decrypt.com/, try it with a string you have hashed and funnily enough it throws up an error, good isn't it! That site can only decrypt strings you have put into it, obviously it keeps a database of all strings entered and then tries to find a match.

When will you people learn that it's impossible to decrypt a proper md5 hash. It takes supercomputers weeks just to find a collision.
dchesterton is offline  
Old 06-01-2006, 01:00 PM   #18 (permalink)
Soon to be RICHdoggie!
 
PoorDoggie's Avatar
Join Date: Jan 2005
Location: UK
Posts: 2,408
PoorDoggie is just really nicePoorDoggie is just really nicePoorDoggie is just really nicePoorDoggie is just really nicePoorDoggie is just really nicePoorDoggie is just really nicePoorDoggie is just really nicePoorDoggie is just really nice
 



Originally Posted by Scott
OK. "Decrypt" this: 981d5552164c6b0865a9c161432c290e
heh... a very badly scripted error!
PoorDoggie is offline  
Old 06-01-2006, 02:22 PM   #19 (permalink)
Senior Member
 
dhscott's Avatar
Join Date: Apr 2006
Posts: 1,345
dhscott is a name known to alldhscott is a name known to alldhscott is a name known to alldhscott is a name known to alldhscott is a name known to alldhscott is a name known to all
 



If in doubt, hash it twice! (md5(md5))

I know wordpress does...
dhscott is offline  
Old 06-01-2006, 02:31 PM   #20 (permalink)
Soon to be RICHdoggie!
 
PoorDoggie's Avatar
Join Date: Jan 2005
Location: UK
Posts: 2,408
PoorDoggie is just really nicePoorDoggie is just really nicePoorDoggie is just really nicePoorDoggie is just really nicePoorDoggie is just really nicePoorDoggie is just really nicePoorDoggie is just really nicePoorDoggie is just really nice
 



Originally Posted by qwhois
If in doubt, hash it twice! (md5(md5))
????: NamePros.com http://www.namepros.com/showthread.php?t=173486

I know wordpress does...
I do this:

PHP Code:

$str 
"hello"// string

$md5 md5($str); // md5 the string

$new substr($md516).substr($md5016); // put first 16 chars after first 16...

$last md5($new); // md5 the resulting string... 
but then again, maybe I am going over the top...



Tom
PoorDoggie is offline  
Old 06-11-2006, 02:57 AM   #21 (permalink)
NamePros Regular
Join Date: Dec 2005
Posts: 210
wackyjoe is on a distinguished road
 



md5() is decryptable, but it can take a while to do so depending on the chars. If it is combined with Aa1-10*#@#$% well it would take days to decrypt...if it is a simple "hello" it will take around 10mins maybe...

But yes people have been able to decrypt it through dictionary words, brute force attacks.

md5 and sha1 are both decryptable...if you really are that desperate i can show u a screen shot .. if it is allowed by the board admin ofcourse
????: NamePros.com http://www.namepros.com/showthread.php?t=173486

Linux decrypters are alot quicker then windows and they do it in nerly half the time aswell.

as mentioned above, you can prevent this by ofcourse using a salt.


No matter how much of an encryption you do create SOMEONE will be able to get around it someday
Last edited by wackyjoe; 06-11-2006 at 03:05 AM.
wackyjoe is offline  
Old 06-11-2006, 03:00 AM   #22 (permalink)
Senior Member
 
Scott's Avatar
Join Date: Jun 2003
Location: UK
Posts: 3,541
Scott has a reputation beyond reputeScott has a reputation beyond reputeScott has a reputation beyond reputeScott has a reputation beyond reputeScott has a reputation beyond reputeScott has a reputation beyond reputeScott has a reputation beyond reputeScott has a reputation beyond reputeScott has a reputation beyond reputeScott has a reputation beyond reputeScott has a reputation beyond repute
 

Member of the Month
February 2005

Originally Posted by wackyjoe
md5() is decryptable, but it can take a while to do so depending on the chars. If it is combined with Aa1-10*#@#$% well it would take days to decrypt...if it is a simple "hello" it will take around 10mins maybe...

But yes people have been able to decrypt it through dictionary words, brute force attacks.

????: NamePros.com http://www.namepros.com/showthread.php?t=173486
md5 and sha1 are both decryptable...if you really are that desperate i can show u a screen shot .. if it is allowed by the board admin ofcourse

Linux decrypters are alot quicker then windows and they do it in nerly half the time aswell.

No matter how much of an encryption you do create SOMEONE will be able to get around it someday

Originally Posted by Scott
OK. "Decrypt" this: 981d5552164c6b0865a9c161432c290e
Scott is offline  
Old 06-11-2006, 03:18 AM   #23 (permalink)
NamePros Regular
Join Date: Dec 2005
Posts: 210
wackyjoe is on a distinguished road
 



have sent you a PM
wackyjoe is offline  
Old 06-11-2006, 09:03 AM   #24 (permalink)
Senior Member
 
dhscott's Avatar
Join Date: Apr 2006
Posts: 1,345
dhscott is a name known to alldhscott is a name known to alldhscott is a name known to alldhscott is a name known to alldhscott is a name known to alldhscott is a name known to all
 



If anyone thinks a encryption is unencryptable, you are clearly wrong. They thought enigma was unencryptable, but it wasn't. It took ages but it happened.

How about SSL encryption?

I heard it took a team of mathematicians 17 years to break one little line of code... (does anyone have a link to this story?)

What is the effectiveness of MD5 hash? It's 128 isn't it? SHA1 is 160-bits as well?

Put it simply, combine hash's and you shouldn't have any trouble, with anyone (For a long time atleast).
dhscott is offline  
Old 06-11-2006, 10:18 AM   #25 (permalink)
NamePros Regular
 
nick's Avatar
Join Date: Jun 2004
Location: Iowa City
Posts: 703
nick has much to be proud ofnick has much to be proud ofnick has much to be proud ofnick has much to be proud ofnick has much to be proud ofnick has much to be proud ofnick has much to be proud ofnick has much to be proud of
 


Save The Children
doing md5(md5($string)) isn't necasarilly safer
__________________
formally ninedogger
------
Want to talk to a stranger? -->| Click Here | TalkToAStranger.com | <-- Meet New Friends
nick is offline  
Closed Thread


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools


Similar Threads
Thread Thread Starter Forum Replies Last Post
Md5 faisj Programming 2 11-15-2005 09:29 PM
md5 table axilant Programming 4 06-29-2005 08:17 PM
MD5 or SHA1, which do you prefer? nicholas CODE 15 11-05-2004 12:00 PM

 
All times are GMT -7. The time now is 12:57 AM.

Domain name forum recommended by Domaining.com Powered by: vBulletin® Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.6.0 Ad Management plugin by RedTyger