<div dir="ltr"><div class="gmail_extra"><br><div class="gmail_quote">On Fri, Aug 11, 2017 at 9:52 PM, Matt Palmer <span dir="ltr"><<a href="mailto:mattpalms@gmail.com" target="_blank">mattpalms@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="auto"><span style="font-family:sans-serif">> NIST also recommends another layer of protection using a keyed hash with a secret key:</span><br style="font-family:sans-serif"><br style="font-family:sans-serif"><font face="sans-serif">If you are going to make a salt secret and store it in an HSM, why not just encrypt the password and avoid all this costly memory hard hashing?</font><div dir="auto"><font face="sans-serif"><br></font></div><div dir="auto"><font face="sans-serif">Salts were never supposed to be secrets, they exist to increase the cost of offline attacks, by preventing the use of precomputed rainbow tables.</font></div><div dir="auto"><span style="font-family:sans-serif"><br></span></div><div dir="auto"><span style="font-family:sans-serif">Arguably with GPU based attacks, they are only adding a small increase in work, linear in the number of passwords to be cracked, if they are stored alongside the hashed password. </span><br></div><div dir="auto"><span style="font-family:sans-serif"><br></span></div><div dir="auto"><span style="font-family:sans-serif">But again, if you have a good secret,  can you not just encrypt...?</span></div></div></blockquote></div><br></div><div class="gmail_extra"><br></div><div class="gmail_extra">With encryption, if the secret key gets compromised, then its as good as having plain text passwords. With keyed hash you will still need to have some resources to crack it.</div><div class="gmail_extra"><br></div><div class="gmail_extra"><div><div class="gmail_signature"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div><b>Shreyas Zare</b><br><a href="https://technitium.com/" target="_blank">Technitium</a><br></div><div><br></div></div></div></div></div></div></div></div>