MD5, and 2 constants

Moderator: BarsMonster

Post Reply [phpBB Debug] PHP Warning: in file [ROOT]/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1266: count(): Parameter must be an array or an object that implements Countable
za3toor
Posts: 8
Joined: Sun Mar 15, 2009 4:08 pm
[phpBB Debug] PHP Warning: in file [ROOT]/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1266: count(): Parameter must be an array or an object that implements Countable

MD5, and 2 constants

Post by za3toor » Sun Mar 15, 2009 4:30 pm

Hey guys...

I am interested in a new algorithm that looks like this:

Target Hash = MD5(MD5("constant1"$PASS)"constant2)

where constant1 != constant 2.

Before the program starts, I would like to pass in both constants and the target hash. The return would be the $pass.

Thanks,

za3toor

User avatar
LordMike
Posts: 184
Joined: Tue Feb 10, 2009 8:34 am
[phpBB Debug] PHP Warning: in file [ROOT]/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1266: count(): Parameter must be an array or an object that implements Countable

Re: MD5, and 2 constants

Post by LordMike » Mon Mar 16, 2009 8:19 pm

I think this is what's called Salt, and is currently being implemented.

IIRC.

Then again, I'm not on dev. team.

za3toor
Posts: 8
Joined: Sun Mar 15, 2009 4:08 pm
[phpBB Debug] PHP Warning: in file [ROOT]/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1266: count(): Parameter must be an array or an object that implements Countable

Re: MD5, and 2 constants

Post by za3toor » Mon Mar 16, 2009 9:14 pm

True, but it is called a salt when the value of it is not known, but in my case, I know the values of both constants and I want to pass them in.

User avatar
BarsMonster
Site Admin
Posts: 1118
Joined: Wed Oct 01, 2008 7:58 pm
[phpBB Debug] PHP Warning: in file [ROOT]/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1266: count(): Parameter must be an array or an object that implements Countable

Re: MD5, and 2 constants

Post by BarsMonster » Mon Mar 16, 2009 9:16 pm

za3toor wrote:True, but it is called a salt when the value of it is not known, but in my case, I know the values of both constants and I want to pass them in.
If salt is unknown, then it's just a bruteforce.
Salt means "known salt".

za3toor
Posts: 8
Joined: Sun Mar 15, 2009 4:08 pm
[phpBB Debug] PHP Warning: in file [ROOT]/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1266: count(): Parameter must be an array or an object that implements Countable

Re: MD5, and 2 constants

Post by za3toor » Mon Mar 16, 2009 9:19 pm

oh cool, thanks for clearing that up

za3toor
Posts: 8
Joined: Sun Mar 15, 2009 4:08 pm
[phpBB Debug] PHP Warning: in file [ROOT]/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1266: count(): Parameter must be an array or an object that implements Countable

Re: MD5, and 2 constants

Post by za3toor » Mon Mar 16, 2009 9:23 pm

then it would be salt1 and salt 2

md5(md5($salt1.$pass).$salt2)

User avatar
BarsMonster
Site Admin
Posts: 1118
Joined: Wed Oct 01, 2008 7:58 pm
[phpBB Debug] PHP Warning: in file [ROOT]/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1266: count(): Parameter must be an array or an object that implements Countable

Re: MD5, and 2 constants

Post by BarsMonster » Tue Mar 17, 2009 12:56 am

Well, what is gonna be implemented is

md5($salt1.md5($salt2.$pass.$salt3).$salt4)
and
md5($salt1.$pass.$salt2)

za3toor
Posts: 8
Joined: Sun Mar 15, 2009 4:08 pm
[phpBB Debug] PHP Warning: in file [ROOT]/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1266: count(): Parameter must be an array or an object that implements Countable

Re: MD5, and 2 constants

Post by za3toor » Tue Mar 17, 2009 1:35 am

BarsMonster wrote:Well, what is gonna be implemented is

md5($salt1.md5($salt2.$pass.$salt3).$salt4)
and
md5($salt1.$pass.$salt2)
That would be amazing, how long would something like this need to get developed?

Bitweasil
Posts: 110
Joined: Fri Nov 07, 2008 6:50 am
[phpBB Debug] PHP Warning: in file [ROOT]/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1266: count(): Parameter must be an array or an object that implements Countable

Re: MD5, and 2 constants

Post by Bitweasil » Tue Mar 17, 2009 2:11 am

Does the inner md5 return an ASCII string (32 bytes, 1-0a-f) or a binary string (16 bytes, 0x00-0xff)?

za3toor
Posts: 8
Joined: Sun Mar 15, 2009 4:08 pm
[phpBB Debug] PHP Warning: in file [ROOT]/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1266: count(): Parameter must be an array or an object that implements Countable

Re: MD5, and 2 constants

Post by za3toor » Tue Mar 17, 2009 2:33 am

Bitweasil wrote:Does the inner md5 return an ASCII string (32 bytes, 1-0a-f) or a binary string (16 bytes, 0x00-0xff)?
the inner MD5 would return an ascii string (32 bytes)

za3toor
Posts: 8
Joined: Sun Mar 15, 2009 4:08 pm
[phpBB Debug] PHP Warning: in file [ROOT]/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1266: count(): Parameter must be an array or an object that implements Countable

Re: MD5, and 2 constants

Post by za3toor » Tue Mar 17, 2009 2:50 am

for example,

if the equasion as follows

HASH = md5($salt1.md5($salt2.$pass.$salt3).$salt4)

$salt1 = MD5(hello world1): = 118e57b1eecd61e54b502055d82aa57f:
$salt2 = hello world2:
$salt3 = :hello world3
$salt4 = :MD5(hello world4) = :b3a8d3286f6d531d852659d45e2385af

HASH= MD5(118e57b1eecd61e54b502055d82aa57f:MD5(hello world2:$pass:hello world3):b3a8d3286f6d531d852659d45e2385af)

if the first try of the bruteforce for $pass = 123456 then the final eqation would look like this

HASH= MD5(118e57b1eecd61e54b502055d82aa57f:MD5(hello world2:123456:hello world3):b3a8d3286f6d531d852659d45e2385af)


MD5(hello world2:123456:hello world3) = 88de97b9c5c8814ce86464d4f30b5bd8

there fore the end result would be

HASH= MD5(118e57b1eecd61e54b502055d82aa57f:88de97b9c5c8814ce86464d4f30b5bd8:b3a8d3286f6d531d852659d45e2385af)= 975dd70d08c14bcef100aabac2f449cc

I hope that explains it....

User avatar
BarsMonster
Site Admin
Posts: 1118
Joined: Wed Oct 01, 2008 7:58 pm
[phpBB Debug] PHP Warning: in file [ROOT]/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1266: count(): Parameter must be an array or an object that implements Countable

Re: MD5, and 2 constants

Post by BarsMonster » Tue Mar 17, 2009 3:44 am

Bitweasil wrote:Does the inner md5 return an ASCII string (32 bytes, 1-0a-f) or a binary string (16 bytes, 0x00-0xff)?
In PHP things in almost all cases it's hex string. In other systems binary might be used (rarely)

d0PING
Posts: 60
Joined: Fri Dec 26, 2008 1:59 pm
[phpBB Debug] PHP Warning: in file [ROOT]/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1266: count(): Parameter must be an array or an object that implements Countable

Re: MD5, and 2 constants

Post by d0PING » Tue Mar 17, 2009 10:12 am

...but don't forget for 447 bits :wink: ...
experiment kills the theory

Bitweasil
Posts: 110
Joined: Fri Nov 07, 2008 6:50 am
[phpBB Debug] PHP Warning: in file [ROOT]/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1266: count(): Parameter must be an array or an object that implements Countable

Re: MD5, and 2 constants

Post by Bitweasil » Tue Mar 17, 2009 3:40 pm

Right, that's why I asked.

Also, >447-bit inputs are annoying, as you need a multi-pass implementation. Tip for those securing passwords: Just make sure you have a >55 character string at some point, and it's annoying to work with.

User avatar
BarsMonster
Site Admin
Posts: 1118
Joined: Wed Oct 01, 2008 7:58 pm
[phpBB Debug] PHP Warning: in file [ROOT]/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1266: count(): Parameter must be an array or an object that implements Countable

Re: MD5, and 2 constants

Post by BarsMonster » Wed Mar 18, 2009 6:06 am

Bitweasil wrote:Right, that's why I asked.

Also, >447-bit inputs are annoying, as you need a multi-pass implementation. Tip for those securing passwords: Just make sure you have a >55 character string at some point, and it's annoying to work with.
I would say it's annoying when password is being split between 2 blocks. That's really annoying.
If you just have 1-block salt, you can calculate it in advance.

Post Reply
[phpBB Debug] PHP Warning: in file [ROOT]/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1266: count(): Parameter must be an array or an object that implements Countable
[phpBB Debug] PHP Warning: in file [ROOT]/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1266: count(): Parameter must be an array or an object that implements Countable

Who is online

Users browsing this forum: No registered users and 1 guest