<div dir="ltr"><br><div class="gmail_extra"><br><br><div class="gmail_quote">On Tue, Oct 8, 2013 at 4:49 PM, Mike Perry <span dir="ltr"><<a href="mailto:mikeperry@torproject.org" target="_blank">mikeperry@torproject.org</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Jurre van Bergen:<br>
<div class="im">><br>
> *OTR*<br>
> OTR support comes from the Go crypto package:<br>
> <a href="https://code.google.com/p/go.crypto/" target="_blank">https://code.google.com/p/go.crypto/</a><br>
> This library only has support for OTRv2 and not the latest OTRv3<br>
> specification. If we want to be resistant to several attacks[1]  on the<br>
> OTR protocol, we need to reimplement the OTR protocol and update it to<br>
> the latest version or, we use Cgo, which binds into libotr. (Open<br>
> questions: OTR by default?, )<br>
><br>
> [1]<br>
> <a href="http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.165.7945&rep=rep1&type=pdf" target="_blank">http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.165.7945&rep=rep1&type=pdf</a><br>

<br>
</div>According to agl:<br>
"The DH and DSA code uses Go's math/big library, which isn't constant<br>
time."<br>
<br>
He said these non-constant time Go primitives are used by OTR, and will<br>
be used by TLS if they are specified by the negotiated cipher suite.<br></blockquote><div>The easy fix is to make go.crypto constant time, for at least what we need.</div><div><br></div><div>If we are okay with bad performance this doesn't require much trickery for DH: saturated limb arithmetic modulo</div>
<div>a constant with a precomputed Barrett reduction tables is constant time.</div><div><br></div><div>DSA is harder because the modulus is provided as part of the key. I don't know how to do that in constant time.</div>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<br>
So xmpp-client's OTR and TLS support would definitely need to be<br>
rewritten to call out to a native code implementation or rewritten to<br>
use new constant time Go primitives, independent of OTRv2 vs OTRv3.</blockquote><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<span class="HOEnZb"><font color="#888888"><br>
<br>
--<br>
Mike Perry<br>
</font></span><br>_______________________________________________<br>
tor-dev mailing list<br>
<a href="mailto:tor-dev@lists.torproject.org">tor-dev@lists.torproject.org</a><br>
<a href="https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-dev" target="_blank">https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-dev</a><br>
<br></blockquote></div><br><br clear="all"><div><br></div>-- <br>"Those who would give up Essential Liberty to purchase a little Temporary Safety deserve neither  Liberty nor Safety."<br>-- Benjamin Franklin 
</div></div>