Re: MD5Crypt in .net



Does anyone have a .NET implementation of MD5Crypt that they'd be willing to
share.
I've had trouble using the GNU crypt.dll, generates errors under ASP.NET,
and am having trouble porting it over myself.

Thank You.

-Jason Leighorn

"Keith" <Keith@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
news:A78BD2BE-4FD5-434F-A10D-F30B8428A2F3@xxxxxxxxxxxxxxxx
Would you be willing to post the source?

"TIBM" wrote:

Thanks a lot for your replies. In the end I converted Poul's code to c#:
4
hours of work, but it works 100%!
Thanks again.

Tib

"Göran Andersson" wrote:

Maybe this poster has something:

http://lists.ximian.com/pipermail/mono-devel-list/2004-July/006972.html

TIBM wrote:
My appologies: the function is called MD5Crypt!!! Thanks for the
research,
but I think I sent you on a wild goose-chase.
The function takes a password and a salt string and generates an
OpenBSD/FreeBSD/Linux-compatible md5-encoded password entry.
Apparently the
function does exist on Unix systems and I think it might be
implemented in
Perl. I found a c-implementation written by Poul-Henning Kamp, but
I'm
time-constrained and I was hoping something like this was already
done in
.net.

Tib

"Göran Andersson" wrote:

The implementations that I found of the MD5Encrypt method just takes
the
MD5 hash and formats it into a string containing the hexadecimal
codes
for the bytes in the hash code.

TIBM wrote:
Thanks for the reply.

Actually, I'm pretty sure that the MD5 hash and the MD5Encrypt
should
produce different results. The MD5Hash behaves the same on all
systems (I
compared the output of Java MessageDigest.getInstance("MD5") and
.NET
MD5CryptoServiceProvider().ComputeHash() and they are identical).
MD5Encrypt
is something else, and it looks like it is using a salt as well -
just
noticed that in the requirements. I'm still confused about what
MD5Encrypt
really is...

Tiberiu

"Göran Andersson" wrote:

MD5 is a cryptigraphic hash function. That means that it uses
encryption
methods to calculate a hash code. There are no MD5 encryption or
decryption methods.

What might be the purpose of the requirement to use the MD5Crypt
function, is to produce an MD5 hash that will have the same value
as if
it was done on some other specific system. In that case you will
have to
know what specific function it is supposed to mimic.

TIBM wrote:
Hi. I posted this question on the wrong forum before. I'm hoping
that I'll
have more luck here.

I'm working on a project in which I need to use MD5 cryptography.
The
requirements are vague, but I need to do both: compute the MD5
hash of a
string and perform the MD5Crypt function on the string. I know
that class
MD5CryptoServiceProvider provides the ComputeHash() function (for
the first
part). However, I don't think it provides an MD5Crypt function.
Actually, I
have no idea what the MD5Crypt function is. From what I know MD5
is a hashing
algorithm, so am I looking for a MD5 cryptography algorithm? I
don't think
one exists (not under this name).

All I know about the MD5Crypt function is that it is a popular
UNIX and BSD
function.

Thanks,

Tib




.



Relevant Pages

  • MD5 for ninnies
    ... If I apply an MD5 hash on a character string, say, "Hello", and the ... * I do know that two different strings will never yield the same MD5 ... * I also know that MD5 is a bit slower than MD4. ...
    (comp.security.misc)
  • Re: MD5 collisions
    ... string_a and string_b have the same MD5 hash - ie they are collisions. ... I have a third string, called 'string_c', which consists of "hello world". ... Is it guaranteed that string_A and string_B will both (MD5) hash to the same ... left as an exercise to the reader. ...
    (sci.crypt)
  • Re: MD5 collisions
    ... string_a and string_b have the same MD5 hash - ie they are collisions. ... I have a third string, called 'string_c', which consists of "hello world". ... Is it guaranteed that string_A and string_B will both (MD5) hash to the same ... It is also certain that if str_a and str_b have the same length and end in the same 64 bytes then str_a || str_c collides with str_b || str_c for any bit sequence str_c. ...
    (sci.crypt)
  • Re: Lost password + MD5 ?
    ... >well store them plaintext. ... >INPUTSTRINGS that give the same MD5 hash as the original string. ... >They came up with an algoritm that produces some string (StringB and StringC ...
    (comp.lang.php)