Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

Required fields*

3
  • 3
    The question you are going to get is, "why use a custom solution instead of the standard libraries that do it right?" If you want a review of certain elements of your scheme for learning purposes, that's fine, but just know that the way you phrased your intro paragraph, you are going to get flooded with "just use bcrypt/PBKDF2". Commented Oct 13, 2016 at 16:22
  • 2
    I'll focus on just one little detail (and leave the rest for someone else), i.e. mt_rad(). The MT scheme is known to generate poor random numbers at the beginning and then generate better ones after some time. Therefore if you run this as plain PHP you will get predictable salts, yet if you use something like php-fpm then you will end with good state for the PRNG. That's bad because your scheme produces different security concerns depending on how it is used. Commented Oct 13, 2016 at 16:29
  • Thanks, edited the post a little to clarify I'm not planning on using it haha, and I read that salts don't even need to be too random - it's likely attackers would get access to the salts if they had access to the password, so overall it makes no difference if they're hard to predict or not Commented Oct 13, 2016 at 16:46