Home All Groups Group Topic Archive Search About

TripleDESCryptoServiceProvider - Secret Key Length

Author
4 Dec 2006 2:14 PM
mehdi
Hi,
Consider a string that's being chosen by the end-user as his/her
password. In this scenario, consider it to be 5 characters long. How am
I supposed to encrypt this using the TripleDESCryptoServiceProvider?
The algorithm demands a given length of secret key, however, I cannot
force the user to enter exactly X characters long password! I'm really
confused.

Any help would be highly appreciated,

TIA,
Mehdi

Author
4 Dec 2006 2:34 PM
Dominick Baier
Have a look at the PasswordDeriveBytes class. This allows to generate a fixed
length key from a password.


-----
Dominick Baier (http://www.leastprivilege.com)

Show quoteHide quote
> Hi,
> Consider a string that's being chosen by the end-user as his/her
> password. In this scenario, consider it to be 5 characters long. How
> am
> I supposed to encrypt this using the TripleDESCryptoServiceProvider?
> The algorithm demands a given length of secret key, however, I cannot
> force the user to enter exactly X characters long password! I'm really
> confused.
> Any help would be highly appreciated,
>
> TIA,
> Mehdi
Author
6 Dec 2006 8:19 AM
mehdi
Wow, I just found the cure and removed my question from the group.
However, you were really fast that you answered my deleted message. :)
Thanks, though.

Dominick Baier wrote:
Show quoteHide quote
> Have a look at the PasswordDeriveBytes class. This allows to generate a fixed
> length key from a password.
>
>
> -----
> Dominick Baier (http://www.leastprivilege.com)
>
> > Hi,
> > Consider a string that's being chosen by the end-user as his/her
> > password. In this scenario, consider it to be 5 characters long. How
> > am
> > I supposed to encrypt this using the TripleDESCryptoServiceProvider?
> > The algorithm demands a given length of secret key, however, I cannot
> > force the user to enter exactly X characters long password! I'm really
> > confused.
> > Any help would be highly appreciated,
> >
> > TIA,
> > Mehdi