I'm confused. Why is he using scryptenc_buf when crypto_scrypt does what he wants?<p>I gave him a toolbox which contained a screwdriver and a hammer, and he seems to be complaining that the screwdriver isn't very good at hammering nails.
> Anyone could sign in to anybody else's accounts using any passwords.<p>This is a good test to write: create two users, and see if one can log in using the other's password. (There are lots of ways this could go wrong, not only by using a 0-length password.) Basically, if you don't want something to happen, write a test that fails when it does.
There's a password hashing competition going right now that will hopefully result in some more state-of-the art primitives available through a suitable interface.<p><a href="https://password-hashing.net" rel="nofollow">https://password-hashing.net</a>
> If I develop a crypto library, I'll conduct user studies like how they do it in usability research. Give developers the library and ask them to conduct a specific task. Rinse and repeat until nobody would misuse it.<p>Yes! User testing is often ignored even by application developers who should really know better; it's practically unheard of to perform user testing on APIs, but it makes so much sense. The world would be a better place.