<div dir="ltr"><div class="gmail_extra"><div class="gmail_quote"><div>Hi Trevor,</div><div>Thanks for the prompt answer.</div><div> </div><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">In other asynchronous protocols (e.g. TextSecure) the initial setup<br>
just requires server contact to retrieve the recipient's "prekeys",<br>
and a bunch of computation. But even then, repeating this for every<br>
message would have more communication and computation costs than<br>
necessary, and relying entirely on prekeys for forward secrecy would<br>
have some downsides (one-time prekeys can be consumed; time-based<br>
prekeys have longer lifetimes), </blockquote><div><br></div><div>I was thinking about something like this:</div><div><pre style="overflow:auto;font-family:Consolas,'Liberation Mono',Menlo,Courier,monospace;font-size:14px;margin-top:0px;margin-bottom:16px;font-stretch:normal;line-height:1.45;padding:16px;border-radius:3px;word-wrap:normal;color:rgb(51,51,51);background-color:rgb(247,247,247)">if ratchet_flag:
DHRs = generateECDH()
<span style="line-height:1.45">RK = HASH( DH(A, DHRr) || DH(DHRs, B) || DH(DHRs, DHRr) )
</span> ratchet_flag = False</pre></div><div> </div><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">so it's nice to take advantage of<br>
symmetric-key ratcheting.<br>
<span class=""><font color="#888888"></font></span></blockquote><div><br></div><div>But ratcheting involves a DH - otherwise we lose the future secrecy, no?</div><div><br></div><div><pre style="overflow:auto;font-family:Consolas,'Liberation Mono',Menlo,Courier,monospace;font-size:14px;margin-top:0px;margin-bottom:16px;font-stretch:normal;line-height:1.45;padding:16px;border-radius:3px;word-wrap:normal;color:rgb(51,51,51);background-color:rgb(247,247,247)">RK, NHKs, CKs = KDF( HMAC-HASH(RK, DH(DHRs, DHRr)) )</pre></div><div><br></div><div>Thanks,</div><div> Sunny</div></div></div></div>