NT/LM and Unix Crypt Hash Creation in C#

B

bb

I have a requirement to create and store in our database the users
password in a couple of additional hashes (we currently store an MD5
hash)

the spec is pretty brief...

Spec:
Store the NT Hash and Unix Crypt of password when a user
creates/modifies password
End.

Ive had a sniff around and not really found many good resources on how
these methods of hash creation are performed. I understood unix crypt
uses DES and i get a result like this when doing it on the unix shell

$ crypt google
nWw/IiIxKckm2

the NT/LM one seems to be a bit different, and various websites suggest
there are two hashes "The NTLM, NTLMv2, and Kerberos all use the NT
hash, also known as the Unicode hash. The LM authentication protocol
uses the LM hash."

I'd like to know how to create both!

Any pointers on this about preferably inbuild c# classes which will
create these hashes, or some keywords or urls for me to have a sniff
on.
 
C

Chris Priede

Hi,
I understood unix crypt uses DES and i get a
result like this when doing it on the unix shell

This may or may not be relevant to your project, but MD5 crypt is more
commonly used today, while DES crypt is supported mainly for backwards
compatibility. MD5 encrypted password strings begin with the magic
characters "$1$" and are significantly longer.

Reference code for either of these should be very easy to find, thanks to
Linux and FreeBSD -- just Google something like "DES crypt source" or "MD5
crypt source".
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads


Top