I opened an issue on their bug tracker a couple days ago because I had more fundamental questions about how their algorithm was designed.<p>HN comment: <a href="https://news.ycombinator.com/item?id=15204989" rel="nofollow">https://news.ycombinator.com/item?id=15204989</a><p>Github Issue: <a href="https://github.com/18F/identity-idp/issues/1665" rel="nofollow">https://github.com/18F/identity-idp/issues/1665</a><p>Now I may be misunderstanding their implementation, but it seems to me actually worse than "this isn't FIPS 140". I take no issue with their use of scrypt at all. The complaints in this Gist actually seem to miss the mark to me.<p>The problem isn't scrypt, or storing a hash. The real problem is storing <i>d</i> which, seems to me, defeats the purpose of using an HSM in the first place!<p>Again, with the disclaimer that I'm not 100% certain that's what they're doing, it's just what the documentation says, and what it seems like is happening from reading the Ruby code. I don't develop in Ruby, but while the language is fairly easy to read, with all their variables named 'encryption_code', 'encryption_key', 'encrypted_key', 'encrypted_code', etc. it's easy to get lost.<p>EDIT: Can someone please co-validate my analysis please? Or please tell me what I got wrong! From what I can see, the design is obviously broken. I don't consider myself qualified to find flaws in other people's crypto so, when I find obvious flaws in what should be well designed crypto I get a little freaked out.