Products

Solutions

Resources

Partners

Community

Blog

About

QA

Ideas Test

New Community Website

Ordinarily, you'd be at the right spot, but we've recently launched a brand new community website... For the community, by the community.

Yay... Take Me to the Community!

Welcome to the DNN Community Forums, your preferred source of online community support for all things related to DNN.
In order to participate you must be a registered DNNizen

HomeHomeOur CommunityOur CommunityGeneral Discuss...General Discuss...How Does DNN Hash/Encrypt Passwords?How Does DNN Hash/Encrypt Passwords?
Previous
 
Next
New Post
9/14/2012 11:38 AM
 
I am writing a login system that will log in against a DotNetNuke application's database. I have access to the database and can read the PasswordSalt in the aspnet_Membership table. Hence I will have as inputs:

  1. user's password (submitted by form)
  2. user's salt (I can look up)

and I must produce as output the hashed/encrypted Password. The PasswordFormat=2, which is "Encrypted". However, I have not been able to find details of the encryption algorithm being used, so that I can rewrite it in my own application. So far, my research has led me to this page:

http://msdn.microsoft.com/en-us/library/aa478949.aspx

and also this this stackoverflow post, which has the following formula in one of the comments:

Convert.ToBase64String((new Rfc2898DeriveBytes(YourPWD, YourSALT)).GetBytes(20))

However, this formula does not appear to work on my test data, which has the following inputs and outputs:

password: 888888
salt: ahEvjCX3FM04S5cSi1qdHA==
hashed password: y3rxLUDYdj1/+IGC94/tvW6M3pQTCi/9bq1cNOUgYlM=

You can see the test I attempted here: http://ideone.com/EClO2

I just need working code that will do whatever DNN does internally to turn those inputs into a the hashed password that is actually stored in the DB.

Thanks,
Jonah
 
New Post
9/14/2012 3:55 PM
 
Don't try to reverse engineer the process. Take a look at the methods used in the DNN authentication provider, and just use them.

If you must create your own code, download the DotNetNuke source and grab what you need.



Joe Craig
Patapsco Research Group, Ellicott City, MD
DotNetNuke Development and Services (http://patapscorg.com)
 
New Post
9/14/2012 4:08 PM
 
Joseph Craig wrote:
Don't try to reverse engineer the process. Take a look at the methods used in the DNN authentication provider, and just use them.

If you must create your own code, download the DotNetNuke source and grab what you need.

 Hi Joseph,

Thanks for the reply.

I actually need to reverse engineer the process, since the new application that will be accessing this database is not even written in C#, it's written in ruby.  

I am posting this because, as someone unfamiliar with both C# and DNN, it would probably take me a very long time to figure out where the relevant code is in the source.  So I was hoping somewhere here could just paste in the relevant portion, or just describe the algorithm.

 
New Post
9/14/2012 5:10 PM
 

Hello,

I think DNN's password management stuff is really just a wrapper for the standard ASP.NET membership provider. So, all the password stuff is really managed by that... Given this, you will probably have better luck looking in Ruby forums about connecting to an ASP.NET user account store. 

With that said, as was mentioned, the process is messy. I played with something similar myself a while back and didn't really get anywhere.

Hope this helps,

Mike

 
New Post
9/14/2012 5:32 PM
 
Mike is right, password encryption / hash is done by MS membership provider

Cheers from Germany,
Sebastian Leupold

dnnWerk - The DotNetNuke Experts   German Spoken DotNetNuke User Group

Speed up your DNN Websites with TurboDNN
 
Previous
 
Next
HomeHomeOur CommunityOur CommunityGeneral Discuss...General Discuss...How Does DNN Hash/Encrypt Passwords?How Does DNN Hash/Encrypt Passwords?


These Forums are dedicated to discussion of DNN Platform and Evoq Solutions.

For the benefit of the community and to protect the integrity of the ecosystem, please observe the following posting guidelines:

  1. No Advertising. This includes promotion of commercial and non-commercial products or services which are not directly related to DNN.
  2. No vendor trolling / poaching. If someone posts about a vendor issue, allow the vendor or other customers to respond. Any post that looks like trolling / poaching will be removed.
  3. Discussion or promotion of DNN Platform product releases under a different brand name are strictly prohibited.
  4. No Flaming or Trolling.
  5. No Profanity, Racism, or Prejudice.
  6. Site Moderators have the final word on approving / removing a thread or post or comment.
  7. English language posting only, please.
What is Liquid Content?
Find Out
What is Liquid Content?
Find Out
What is Liquid Content?
Find Out