<div dir="ltr"><div>Hello all, coming out of lurk mode.</div><div><br></div>I have been thinking about how to more safely use cyphers in environments where one does not know for sure that they have a good source of entropy. A simple approach is to not use any; for instance, just use the hash of the clear text as the IV of a message when using a stream cipher. Ex:<div>
<br></div><div> nonce = hmac( key, message )</div><div> box( nonce, key, message ) </div><div><br></div><div><br></div><div>The has the obvious downside of losing semantic security. To improve on this we could mix a source of supposed entropy with a deterministic approach. To extend the above example:</div>
<div><div><br class=""> nonce = hmac( key, hmac( possiblyRand(), message ) )</div><div> box( nonce, key, message ) </div></div><div><br></div><div>It would seem that if possibly rand turns out to be predictable the only thing we have lost is semantic security and not confidentiality. This seems like a nice property to have.</div>
<div><br></div><div>Questions for those interested:</div><div> 1. Am I missing anything important that means this is a bad idea?</div><div> 2. Does this have the claimed properties?</div><div> 3. Is there a better mixing function then hmac?</div>
<div><br></div><div>-Jonathan</div></div>