Please login or register. Welcome to the Studio, guest!


Quick Links:


newBookmarkLockedFalling

Llanilek

Llanilek Avatar
Former Elite Mod

****
Dedicated Studio Member

931


October 2005
Since MD5 was "cracked" thanks to rainbow tables... encryption techniques are changing between different programmers everyone has their own style of new encryption what are some of your favi encryption techniques.

there are new sha techniques creeping in so i hear from chris sha259 or something like that i believe peter has the class for this?

so do you believe that security in php is slipping? or is this just a chance for us to develop our own security techniques?


Chris

Chris Avatar

******
Head Coder

19,519


June 2005
sha256. And I said I know Peter uses it sometimes. :P

And security isn't slipping, holes that were there are just being found. It's kinda like Windows XP. It isn't any more insecure (Well, shouldn't be. :P), it's just that new holes are being found daily.

New security methods are being created daily it seems though.


Last Edit: Jan 20, 2007 17:06:13 GMT by Chris

Xikeon

Xikeon Avatar

***
Dedicated Member

152


August 2005
I use the following:
sha1( md5( "code" ) )
.. :)

Mithras

Mithras Avatar

****
Studio Member

600


July 2006
mikeo said:
I use the following:
sha1( md5( "code" ) )
.. :)


You should salt it as well.


Support Rob Scuderi, the #1 Penguins Defender!

lucifer said:
"Behold: me! I have authority in this building."

Xikeon

Xikeon Avatar

***
Dedicated Member

152


August 2005
mithras said:
mikeo said:
I use the following:
sha1( md5( "code" ) )
.. :)


You should salt it as well.

???What is that.. lol

Mithras

Mithras Avatar

****
Studio Member

600


July 2006
mikeo said:
mithras said:


You should salt it as well.

???What is that.. lol


Click the link :P

It's basically where you take random letters/numbers and add it to the beginning and/or end of a string that you plan on hashing, so that it's longer. It just makes it harder to crack.


Support Rob Scuderi, the #1 Penguins Defender!

lucifer said:
"Behold: me! I have authority in this building."

Chris

Chris Avatar

******
Head Coder

19,519


June 2005
I always forget to add a salt. :P

Xikeon

Xikeon Avatar

***
Dedicated Member

152


August 2005
I still don't understand it, lol.

Mithras

Mithras Avatar

****
Studio Member

600


July 2006
Ok, let's say someone enters the password 123456, and you plan on using SHA1 to encrypt it, then store it in a cookie. You would do something like this:


$pw = '123456';
$salt = 'dmj' . $ps . '9dl';
$hash = sha1($salt);
$_COOKIE['password'] = $hash;


It just increases the length of the hashed string, thus making it harder to crack with a rainbow table, or something like that.


Last Edit: Feb 5, 2007 14:50:06 GMT by Mithras


Support Rob Scuderi, the #1 Penguins Defender!

lucifer said:
"Behold: me! I have authority in this building."

Llanilek

Llanilek Avatar
Former Elite Mod

****
Dedicated Studio Member

931


October 2005
but by using salt you must somehow store the salt where it won't be lost otherwise if its used for logging in somewhere the salt must be checked against the password the salt i tend to use alot is a mix of a reversed sha1 encryption of the date and time the user registered

this is something i just whipped up fast i don't know if it would work or not as i haven't tested it.


<?php
class user_enc {

function reg_encrypt($str) {
// Set Vars
$d = gmdate('dmygia'); # Date
$hash = sha1(md5($d)); # double encryption
$rev = strrev($hash); # Reversed
$salt1 = md5($hash); # encrypt the hash
$salt2 = md5(sha1(md5(strrev(($str))));
$pass = $salt1.'-'.$salt2;

return $pass;
}
}
?>



Last Edit: Feb 6, 2007 17:24:56 GMT by Llanilek

Chris

Chris Avatar

******
Head Coder

19,519


June 2005
You'd need to pass the date they registered to the function somehow Yami. :P

Llanilek

Llanilek Avatar
Former Elite Mod

****
Dedicated Studio Member

931


October 2005
obviously lol.... like i said that was just the base.... and then you'd have to store that salt data against the password in the database to verify the login ..

newBookmarkLockedFalling