I'm wondering how exactly the SE Open ID provider stores passwords, in far too many high-profile cases passwords were only marginally protected. I personally expect that SE uses a suitable hash function and salt, but it would be nice to know for sure.

  • 7
    No salt is used. The only hash is 2ROT13.
    – Cole Tobin
    Jul 22, 2013 at 8:31
  • 3
    I've heard they bathsalt the passwords...
    – Bart
    Jul 22, 2013 at 8:51
  • 7
    They md5 them, twice. That's right, TWICE. No way you're getting past that!
    – James
    Jul 22, 2013 at 10:06
  • Exactly what I wanted to know about the often defunct myOpenId, and the reason to remove my account there as soon as it was online again for just a bit. Nice detail: myOpenId will block my old username forever, in case I forgot to delete some old usage. (At least, they promise.)
    – Arjan
    Jul 22, 2013 at 10:48
  • @Arjan yah, well, the NSA claims they aren't spying on us, and Microsoft claims there isn't a back door for them
    – Cole Tobin
    Jul 23, 2013 at 2:02

1 Answer 1


PBKDF2 based on HMAC-SHA1 with twenty-thousand iterations (the latter is set in our configuration).

Just check the code (search for SecureHash and go from there).

  • Thanks, I totally missed that the source is available. Jul 22, 2013 at 10:50
  • 2
    Hehe, this code says it can do better ;-) private const int DefaultHashIterations = 1000; ...but also if (val < DefaultHashIterations) throw new ArgumentException("HashIterations cannot be less than 4000");
    – Arjan
    Jul 22, 2013 at 10:54
  • @Arjan Oops you're right; I've updated with the value we use.
    – balpha StaffMod
    Jul 22, 2013 at 10:58
  • 1
    Ah, that was not what I was trying to say. I guess in the above snippet 1,000 is the minimum, but the error message claims it's 4,000. :-)
    – Arjan
    Jul 22, 2013 at 11:02
  • For my own sanity, are we talking about the actual user's passwords here, because I can't make that out from the code :( it seems that this deals mostly with decrypting the user's profile for populating the OpenID response.
    – Jack
    Jul 22, 2013 at 11:07
  • @Jack Yes, it's the actual password. See code.google.com/p/stackid/source/browse/OpenIdProvider/Models/… (a "pending user" is a user before they have confirmed their email and is later turned into a real user, where these fields are copied from the PendingUser
    – balpha StaffMod
    Jul 22, 2013 at 11:09
  • I see. Having implemented my own provider, I had assumed this was similar in the sense that the provider offloads the actual authentication and then uses the information found inside the authenticated session to produce the response :) thanks for the additional info!
    – Jack
    Jul 22, 2013 at 11:14
  • Is this on github now?
    – user1228
    Oct 6, 2015 at 15:27
  • @Won't No, we haven't moved it yet.
    – balpha StaffMod
    Oct 6, 2015 at 15:34

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .