Services/KeyExchange: Difference between revisions

Jump to navigation Jump to search
Line 250: Line 250:
<li>Desktop computes and uploads msg 1.
<li>Desktop computes and uploads msg 1.


<b>New in version 2:</b> The If-Match header is set so that we only upload this message if the previous Desktop's message is still in the channel. This is to prevent double PUTs during retries.
<b>New in version 2:</b> The If-Match header is set so that we only upload this message if the other side's previous message is still in the channel. This is to prevent double PUTs during retries. If a 412 is received then it means that our first PUT was actually correctly received by the server and that the other side has already uploaded it's next message. So just consider the 412 to be a 200.
<pre>
<pre>
C: PUT /a7id HTTP/1.1
C: PUT /a7id HTTP/1.1
Line 300: Line 300:
...
...
</pre>
</pre>
  <p>Mobile computes and uploads msg 2</p>
  <p>Mobile computes and uploads msg 2.
 
<b>New in version 2:</b> The If-Match header is set so that we only upload this message if the other side's previous message is still in the channel. This is to prevent double PUTs during retries. If a 412 is received then it means that our first PUT was actually correctly received by the server and that the other side has already uploaded it's next message. So just consider the 412 to be a 200.
</p>
  <pre>C: PUT /a7id HTTP/1.1
  <pre>C: PUT /a7id HTTP/1.1
C: If-Match: "etag-of-sender1-message"
C: If-Match: "etag-of-sender1-message"
Line 335: Line 338:
...
...
</pre>
</pre>
<p>Desktop computes key, computes and uploads msg 2</p>
<p>Desktop computes key, computes and uploads msg 2.
 
<b>New in version 2:</b> The If-Match header is set so that we only upload this message if the other side's previous message is still in the channel. This is to prevent double PUTs during retries. If a 412 is received then it means that our first PUT was actually correctly received by the server and that the other side has already uploaded it's next message. So just consider the 412 to be a 200.
</p>
<pre>
<pre>
C: PUT /a7id HTTP/1.1
C: PUT /a7id HTTP/1.1
Line 371: Line 377:
S: Etag: "etag-of-sender2-message"
S: Etag: "etag-of-sender2-message"
</pre>
</pre>
<p>Mobile computes key, uploads encrypted known message "0123456789ABCDEF" to prove its knowledge (msg 3)</p>
<p>Mobile computes key, uploads encrypted known message "0123456789ABCDEF" to prove its knowledge (msg 3).
 
<b>New in version 2:</b> The If-Match header is set so that we only upload this message if the other side's previous message is still in the channel. This is to prevent double PUTs during retries. If a 412 is received then it means that our first PUT was actually correctly received by the server and that the other side has already uploaded it's next message. So just consider the 412 to be a 200.
</p>
<pre>
<pre>
C: PUT /a7id HTTP/1.1
C: PUT /a7id HTTP/1.1
Line 402: Line 411:
</pre>
</pre>
Desktop verifies it against its own version. If the hash matches, it encrypts and uploads Sync credentials.
Desktop verifies it against its own version. If the hash matches, it encrypts and uploads Sync credentials.
<b>New in version 2:</b> The If-Match header is set so that we only upload this message if the other side's previous message is still in the channel. This is to prevent double PUTs during retries. If a 412 is received then it means that our first PUT was actually correctly received by the server and that the other side has already uploaded it's next message. So just consider the 412 to be a 200.
<pre>
<pre>
C: PUT /a7id HTTP/1.1
C: PUT /a7id HTTP/1.1
Confirmed users
971

edits

Navigation menu