How is .net generating extra bits in MD5?
From: Pete (jpeteb_at_hotmail.com)
Date: 01/21/05
- Previous message: JH Higgins: "Connection string user ID changes to (null)"
- Next in thread: Valery Pryamikov: "Re: How is .net generating extra bits in MD5?"
- Reply: Valery Pryamikov: "Re: How is .net generating extra bits in MD5?"
- Reply: Shawn Farkas [MS]: "RE: How is .net generating extra bits in MD5?"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] [ attachment ]
Date: 21 Jan 2005 11:53:48 -0800
Hi,
I have a piece of .net code I am trying to understand. It creates a MD5
hash then requests 256 bits from the hash, where MD5 only generates 128
bits. I've looked at the hash with another non-.net piece of code and
the first 128 bits match up correctly. How is Microsoft creating the
second 128 bits? I cannot seem to figure that out. Here is a code
fragment in C#:
string passPhrase; // password string
string saltValue; // salt string
string hashAlgorithm; // set to "MD5"
int passwordIterations; // set to 2
int keySize; // set to 256
byte[] initVectorBytes = Encoding.ASCII.GetBytes(initVector);
byte[] saltValueBytes = Encoding.ASCII.GetBytes(saltValue);
PasswordDeriveBytes password = new PasswordDeriveBytes(
passPhrase,
saltValueBytes,
hashAlgorithm,
passwordIterations);
byte[] keyBytes = password.GetBytes(keySize / 8);
TIA for any help.
- Previous message: JH Higgins: "Connection string user ID changes to (null)"
- Next in thread: Valery Pryamikov: "Re: How is .net generating extra bits in MD5?"
- Reply: Valery Pryamikov: "Re: How is .net generating extra bits in MD5?"
- Reply: Shawn Farkas [MS]: "RE: How is .net generating extra bits in MD5?"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] [ attachment ]
Relevant Pages
|