<div dir="ltr"><br><br><div class="gmail_quote"><div dir="ltr">On Wed, 8 Mar 2017 at 16:53 Jonathan Thornburg <<a href="mailto:jthorn4242@gmail.com">jthorn4242@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">On Wed, Mar 08, 2017 at 10:45:41AM +0000, Robin Wood wrote:<br class="gmail_msg">
> The client is hashing 4-6 digit PINs (mostly 4 digit) with bcrypt, they<br class="gmail_msg">
> have the work factor set as high as the business will allow them but they<br class="gmail_msg">
> are worried that due to the small key space it will still be possible to<br class="gmail_msg">
> reverse individual PINs. They are now thinking of encrypting the hashes<br class="gmail_msg">
> before storing them to add an extra layer of protection. The encryption is<br class="gmail_msg">
> fast enough to not affect login times so my suggestion of using the<br class="gmail_msg">
> additional processing to increase the work factor instead was rejected.<br class="gmail_msg">
<br class="gmail_msg">
What about salting the hash?<br class="gmail_msg"></blockquote><div><br></div><div>I assumed bcrypt had to be salted so didn't mention it, yes, they have salt</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
More generally, what's the threat model?<br class="gmail_msg"></blockquote><div><br></div><div>Someone grabbing just the database</div><div><br></div><div>Robin</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
(Online attacks?  Offline attacks after someone steals the database of<br class="gmail_msg">
hashed PINs?  Something else?)<br class="gmail_msg">
<br class="gmail_msg">
ciao,<br class="gmail_msg">
<br class="gmail_msg">
--<br class="gmail_msg">
-- "Jonathan Thornburg [remove -animal to reply]" <<a href="mailto:jthorn@astro.indiana-zebra.edu" class="gmail_msg" target="_blank">jthorn@astro.indiana-zebra.edu</a>><br class="gmail_msg">
   Dept of Astronomy & IUCSS, Indiana University, Bloomington, Indiana, USA<br class="gmail_msg">
   "There was of course no way of knowing whether you were being watched<br class="gmail_msg">
    at any given moment.  How often, or on what system, the Thought Police<br class="gmail_msg">
    plugged in on any individual wire was guesswork.  It was even conceivable<br class="gmail_msg">
    that they watched everybody all the time."  -- George Orwell, "1984"<br class="gmail_msg">
</blockquote></div></div>