<div dir="ltr"><div><div class="gmail_signature">Hello List,</div></div><div class="gmail_signature"><br></div><div class="gmail_signature">I was wondering if using HMAC with something like SHA-256 to create a key stream in CFB/OFB/CTR mode is a bad idea. </div><div class="gmail_signature"><br></div><div class="gmail_signature">Considering that in CFB/OFB/CTR modes, the cipher required in the mode is used only to perform encryption operation for both encryption and decryption, a HMAC can be used to generate a key stream.</div><div class="gmail_signature"><br></div><div class="gmail_signature">So, the overall CFB/OFB/CTR mode remains exactly same with exception of using HMAC in place for a cipher. The key being used as HMAC key while IV can be as the HMAC message.</div><div class="gmail_signature"><br></div><div class="gmail_signature">I am not a cryptographer but, have some experience with implementing cryptography. I could not come up with reasons as to why this could be a bad idea.<br></div><div class="gmail_signature"><br></div><div class="gmail_signature">Regards,</div><div class="gmail_signature"><br></div><div class="gmail_signature">MemoryVandal</div>
</div>