<div dir="ltr"><br><div class="gmail_extra"><br><div class="gmail_quote">On Thu, Nov 12, 2015 at 1:15 PM, Nick Badger <span dir="ltr"><<a href="mailto:nbadger1@gmail.com" target="_blank">nbadger1@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><div dir="ltr"><span><div>I'm merging message trees here to avoid multiple replies.<br><br>Re: Joe --<br></div><span class=""><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-style:solid;border-left-color:rgb(204,204,204);padding-left:1ex"><div dir="ltr">Your
proposed scheme might be secure there, but the straightforward way to
do what you're trying to do is compute a MAC of the plaintext and use
that as your IV. Key-reuse is a problem for provable security, as you
point out. The simplest thing is to just have two keys, one for the MAC
computation and one for the encryption.</div></blockquote><div><br></div></span></span><div></div>
<div class="gmail_extra">MACs are definitely simpler and feel more elegant, but if possible, I'd prefer to stick with an encrypt-then-MAC/sign approach all around (the containers themselves are signed, not MAC'd).<br></div></div></blockquote><div><br></div><div>Note that what I was suggesting is exactly what AES-SIV does: CMAC is computed with one key over the entire plaintext (plus additional authenticated data), this MAC is used directly as the IV, CTR encryption is applied, and then the ciphertext is sent along with the MAC. If you had asked me this morning I might have said "I'm not sure using the same MAC as your IV and MAC has no security gotchas, would have to think to be sure there are no gotchas" and suggested maybe adding a second MAC over the whole ciphertext to be safe. Fortunately the security analysis has already been done to show that re-using the MAC in this was an IV is safe, leading to AES-SIV: <a href="https://www.iacr.org/archive/eurocrypt2006/40040377/40040377.pdf">https://www.iacr.org/archive/eurocrypt2006/40040377/40040377.pdf</a></div><div><br></div><div>So I would suggest using that.</div></div></div></div>