Click to See Complete Forum and Search --> : Md5


swingall
May 17th, 2002, 10:15 AM
Can any one familiar with MD5 or SMTP help me on this problem?

The RFC 2554 has code like the following:

C: AUTH CRAM-MD5
S: 334
PENCeUxFREJoU0NnbmhNWitOMjNGNndAZWx3b29kLmlubm9zb2Z0LmNvbT4=
C: ZnJlZCA5ZTk1YWVlMDljNDBhZjJiODRhMGMyYjNiYmFlNzg2ZQ==


After Base64 decode of the server response, it translates to:
<CByLEDBhSCgnhMZ+N23F6w@elwood.innosoft.com>
After Base64 decode of the client reply, it translates to :
fred 9e95aee09c40af2b84a0c2b3bbae786e

How did I get the second part after fred? RFC 2095 says
MD5((Key XOR opad), MD5((Key XOR ipad), text))

I don't know how I can get the result like: 9e95aee09c40af2b84a0c2b3bbae786e

There was a sample code on RFC 2095. I can't get the same result as the author showed by using his own code.
MD5 doesn't take two parameters. What did the author mean on his third step by "append the stream of data 'text' to the B byte string resulting from step 2".

Thanks in advance.

Bret
May 17th, 2002, 10:48 AM
I dont think you will get the same results as the author...the key is randomly generated...so unless you got the same key as the author, you wont get the same results.

I have used the sample code from the MD5 RFC and it works without a problem. Is that the code you are using? http://www.faqs.org/rfcs/rfc1321.html

Bret

swingall
May 17th, 2002, 01:01 PM
I used the same key the author supplied. I have MD5 itself working without problem. The problem here is to apply
MD5( key XOR opad, MD5(Key XOR ipad, text)) algorithm.
I don't know how MD5 can take two parameters in this case?