Go Back   Oxyscripts Forums > phpUserLogin > phpUserLogin Support
User Name
Password

Reply
 
Thread Tools Display Modes
  #1  
Old 27th June 2003, 23:52
Chairman Mao Chairman Mao is offline
Junior Member
 
Join Date: 27th June 2003
Posts: 1
Default What is "hidden_key"

Hi.
I'm trying out phpUserLogin, and my question is: what does the var 'hidden_key' do?

Does the cryptographic strength of this package depend a lot on what you use for this var? If so, I'm a little worried since it's static and I don't have any guideline for the key length to use. Is it like a session key?

Also, has anyone had any experience using this package with other session handling scripts like PHP Secure Sessions?

Any info would be appreciated.
Thanks.
Reply With Quote
  #2  
Old 28th June 2003, 21:54
Drakxter Drakxter is offline
Senior Member
 
Join Date: 22nd February 2002
Posts: 1,557
Default

"hidden_key" is used in the cookies, to make them much more secure...

If there was no hidden_key then it would be easy to make fake cookies (untill the next version, where passwords will also be used in the cookies (but also encrypted in the hash cookie)), but by adding this "random key" the "hacker" needs to go to millions of differnt hash using differnt keys, and on each server he needs to do it again, becuase it uses a whole other key...

This little example might help..
md5() is a function in php that makes a special hash of fixed lenght out of the text you supplie to it.

When the cookies are made a username and a hash cookie are made.

The username cookie stores the users username, while the hash cookies stores a "hash" that is built up like this: md5(username+hidden_key)

Now when the user changes page, the script will check these cookies to see if they are legit, this is done by checking the cookie hash against a new hash, made with the cookie username.. So:

md5(cookie_username+hidden_key) = cookie_hash

If those two are the same, the cookies are valid...

Now what to set this key to... Well it could be:

1363klæjsdlgfh346213 or

6436lj3lsdafiu3 or

1354645yhnsdn bdlkj or even

094kkk34k4k4k4 or what about

heymynameisdrakxter

Hopes this clears things up a bit..

Ohh and lenght does not really matter, as long as its 1 char or longer... but I would personnally set it to something at least over 10 chars long.
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
Forum Jump


     

Site Map
All times are GMT. The time now is 08:23.


Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2010, Jelsoft Enterprises Ltd.
Copyright (c) Oxyscripts 2001-2007
Top Sponsor

Sponsors