UK WEB HOSTING FORUM FOR DISCUSSION ON WEB HOSTING SERVICE AND SUPPORT
LINUX HOSTING WINDOWS HOSTING PACKAGES SHOPPING CART OSCOMMERCE ZEN CART AGORA
ECOMMERCE HOSTING ASP MSSQL FRONTPAGE HOSTING PHP MYSQL HOSTING DISCUSSION FORUM
CPANEL RESELLER HOSTING DEDICATED SERVER VPS HOSTING PLESK VIRTUOZZO
Quick Search
Your forum announcement here!

  UK Web Hosting | Dedicated Server Windows and Linux VPS Forum > Web Hosting and Domains > PHP Hosting

Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 19-10-2006, 19:28
Member
 
Join Date: Nov 2005
Posts: 56
Default Password Encryption

Hiya all,

I swear I'm obsessed with passwords and encryption. The question I have is, is there anything stronger and better than MD5 password encryption. The reason I ask is that some people frown on MD5 (some fussy clients) and was wondering if I could use anything else within PHP.

Ta in advance,
__________________
LD
------------------------------------------------------
Webmaster of DeanRichardson.Com
Web: http://www.deanrichardson.com/
Forum: http://www.deanrichardson.com/forum/
!!! AVE IT !!!
Reply With Quote
  #2 (permalink)  
Old 20-10-2006, 09:58
Premium Member
 
Join Date: Sep 2006
Posts: 80
Default

Well the first thing to remeber is that MD5 is NOT an encryption method is simply a hashing tool.

If you take 1 byte or 1GB and run it though MD5 you will get 32Byte string. The clincher is that it is possible for the 1 byte string and the 1GB file to have the SAME hash.

Although it is unlikly as there are billions of combinations.

MD5 is usually acceptable for storing password hashes and comparing user entry to see if they have provided the correct password however another one you may try is SHA1
http:// uk2.php.net/sha1
Reply With Quote
  #3 (permalink)  
Old 04-11-2006, 13:52
Junior Member
 
Join Date: Nov 2006
Location: Leeds, UK
Posts: 24
Default

If you are storing passwords in a MySQL database, the solution with the best simplicity/strength tradeoff is to use the built-in AES_ENCRYPT() function.

Refer to the manual, it is quite simple!

You can also use this to encrypt data used in your PHP scripts, in the same way that you can use MySQL to perform mathematical operations.
Reply With Quote
  #4 (permalink)  
Old 04-11-2006, 15:29
Member
 
Join Date: Oct 2006
Location: Nieuwkerken-Waas; Flanders
Posts: 32
Default

A tip for encrypting passwords: use the username as a seed, i.e. append the username to the password before encrypting; If you do, it's even more difficult that someone can guess/get a password, because now, the encrypted value depends not only on the password, but also on the username!
__________________
Êl síla nan lû e-govaded vín!
Reply With Quote
  #5 (permalink)  
Old 08-11-2006, 19:30
Member
 
Join Date: Oct 2006
Posts: 34
Default

The idea of "salting" a password with something user-specific is actually a bit more involved than that. The idea is that, if users A and B had the same password and someone was able to get hold of the hashed passwords, if they knew A's password then they'd spot that B had the same hash and hence probably the same password. Salting the password with something unique to that user prevents this problem.
Reply With Quote
  #6 (permalink)  
Old 09-11-2006, 11:28
paul's Avatar
Senior Member
 
Join Date: Nov 2005
Location: Norway
Posts: 1,810
Default

SHA-1 seems slower than MD5, but it get in larger message that make it more resistant to brute force attacks. You may also consider to Java code that implements one-way hash algorithm, for more detail on this type of pattern google search for "java singleton pattern".
__________________
UK Motor Seek || Prison Fight
Funny Jokes



Last edited by paul : 09-11-2006 at 11:30.
Reply With Quote
  #7 (permalink)  
Old 09-11-2006, 12:03
sanderson's Avatar
Premium Member
 
Join Date: Oct 2006
Posts: 185
Default

Quote:
Originally Posted by ledeanio View Post
... was wondering if I could use anything else within PHP.
Yes Ledeanio, surely you can use crypt() available within PHP. Have you ever tried it. It works same as md5(), One-way string encryption (hashing). The only difference is that md5() support md5 algorithm only while crypt() supports DES, Blowfish and MD5 (it depends on which system PHP is built on).
Reply With Quote
  #8 (permalink)  
Old 09-11-2006, 14:53
Member
 
Join Date: Oct 2006
Location: Nieuwkerken-Waas; Flanders
Posts: 32
Default

Quote:
Originally Posted by sanderson View Post
Yes Ledeanio, surely you can use crypt() available within PHP. Have you ever tried it. It works same as md5(), One-way string encryption (hashing). The only difference is that md5() support md5 algorithm only while crypt() supports DES, Blowfish and MD5 (it depends on which system PHP is built on).
Don't use a single DES, it's easy to crack such an encryption.
__________________
Êl síla nan lû e-govaded vín!
Reply With Quote
Reply



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

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


All times are GMT. The time now is 11:13.

 

Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
LinkBacks Enabled by Web Hosting 3.1.0
Copyright © 2001-2008, eUKhost.com. All rights reserved.

 
Site Map

VPS Hosting
VPS Hosting plans

Dedicated Server Hosting
Dedicated Server plans

Business Web Hosting
100% uptime Hosting

Cpanel Hosting
cPanel Shared Hosting

Reseller Hosting
Reseller Web Hosting

Windows Hosting
Windows Shared Hosting

Windows VPS

Windows VPS Hosting

Semi Dedicated Servers
Semi-Dedicated Hosting

Dedicated Server Mirroring
Dedicated Server Mirroring

Webhosting Knowledgebase
Frequently asked Questions

Web Hosting Blog
eUKhost Blog

Web Hosting Support
Support Helpdesk

UK Data Center
eUKhost Datacenter

Web Hosting Forum
eUKhost Forum

Support Tutorials
Online Flash Tutorials

Offsite Back-up Plans
Remote Backup Service

Customer Testimonials
eUK Customer Testimonials


knowledgebase articles

eUKhost.com Services

Pre-Sales Questions
Pre-sales FAQ's

Domain Names
Domain registration FAQ's

cPanel Hosting
cPanel Hosting FAQ's

Windows Web Hosting
Plesk Control Panel

Reseller Hosting
Reseller Hosting FAQ's

VPS Hosting
Virtual Private Server

Semi-Dedicated Servers
Semi-Dedicated FAQ's

Dedicated Servers
Dedicated Server Hosting


popular blog categories


Web Hosting
Website Hosting articles

UK Web Hosting
UK Hosting articles

Dedicated Server Hosting
Dedicated Server guidelines

VPS Hosting
VPS hosting articles

cPanel Hosting
cPanel Hosting articles

Linux Operating System
Linux Operating techniques

Windows Web Hosting
Windows plesk articles