<html><head><meta http-equiv="Content-Type" content="text/html charset=windows-1252"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class=""><div><blockquote type="cite" class=""><div class="">On Feb 2, 2017, at 2:14 PM, Ron Garret <<a href="mailto:ron@flownet.com" class="">ron@flownet.com</a>> wrote:</div><br class="Apple-interchange-newline"><div class=""><div style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;" class="">If that’s your quality metric, why hash a long key then instead of just (say) truncating it?</div><br class="Apple-interchange-newline"></div></blockquote></div><br class=""><div class=""><div class="">If you truncate you may lose entropy.  Take the case of HMAC-SHA256,</div><div class="">where the block size is 512 bits, i.e. 32 bytes.  Suppose the key</div><div class="">consists of the concatenation of two passphrases, each encoded in 32</div><div class="">bytes, and each having 50 bits of entropy, for a total of 64 bytes</div><div class="">with 100 bits of entropy.  If you truncate you lose one of the</div><div class="">passphrases, so the truncated key only has 50 bits of entropy.  If you</div><div class="">hash, you keep all 100 bits of entropy.</div><div class=""><br class=""></div><div class="">Francisco</div></div><div class=""><br class=""></div></body></html>