Services/KeyExchange: Difference between revisions

Jump to navigation Jump to search
Line 141: Line 141:
<li>Mobile asks server for new channel ID (3 characters a-z0-9)
<li>Mobile asks server for new channel ID (3 characters a-z0-9)
<pre>C: GET /new_channel HTTP/1.1
<pre>C: GET /new_channel HTTP/1.1
S: "a7i"</pre></li>
S: "a7id"</pre></li>
<li>Mobile generates PIN from channel ID + random weak secret (3 characters a-z0-9), computes and uploads J-PAKE msg 1
<li>Mobile generates PIN from random weak secret (4 characters a-z0-9) and the channel ID, computes and uploads J-PAKE msg 1
<pre>
<pre>
C: PUT /a7i HTTP/1.1
C: PUT /a7id HTTP/1.1
C:  
C:  
C: {
C: {
Line 169: Line 169:
<li>Desktop asks user for the PIN, extracts channel ID and weak secret, fetches Mobile's msg 1
<li>Desktop asks user for the PIN, extracts channel ID and weak secret, fetches Mobile's msg 1
<pre>
<pre>
C: GET /a7i HTTP/1.1
C: GET /a7id HTTP/1.1


S: HTTP/1.1 200 OK
S: HTTP/1.1 200 OK
Line 176: Line 176:
<li>Desktop computes and uploads msg 1
<li>Desktop computes and uploads msg 1
<pre>
<pre>
C: PUT /a7i HTTP/1.1
C: PUT /a7id HTTP/1.1
C:  
C:  
C: {
C: {
Line 201: Line 201:
<li>Mobile polls for Desktop's msg 1
<li>Mobile polls for Desktop's msg 1
<pre>
<pre>
C: GET /a7i HTTP/1.1
C: GET /a7id HTTP/1.1
C: If-None-Match: "444b424cbc84805b40bcd35c8ebe4524"
C: If-None-Match: "444b424cbc84805b40bcd35c8ebe4524"


Line 208: Line 208:
<p>Mobile tries again after 1s</p>
<p>Mobile tries again after 1s</p>
<pre>
<pre>
C: GET /a7i HTTP/1.1
C: GET /a7id HTTP/1.1
C: If-None-Match: "444b424cbc84805b40bcd35c8ebe4524"
C: If-None-Match: "444b424cbc84805b40bcd35c8ebe4524"


Line 215: Line 215:
</pre>
</pre>
  <p>Mobile computes and uploads msg 2</p>
  <p>Mobile computes and uploads msg 2</p>
  <pre>C: PUT /a7i HTTP/1.1
  <pre>C: PUT /a7id HTTP/1.1
C:  
C:  
C: {
C: {
Line 234: Line 234:
<li>Desktop polls for and eventually retrieves Mobile's msg 2
<li>Desktop polls for and eventually retrieves Mobile's msg 2
<pre>
<pre>
C: GET /a7i HTTP/1.1
C: GET /a7id HTTP/1.1
C: If-None-Match: "209a424cbc8480465abcd35c8ebe4524"
C: If-None-Match: "209a424cbc8480465abcd35c8ebe4524"


Line 242: Line 242:
<p>Desktop computes key, computes and uploads msg 2</p>
<p>Desktop computes key, computes and uploads msg 2</p>
<pre>
<pre>
C: PUT /a7i HTTP/1.1
C: PUT /a7id HTTP/1.1
C:  
C:  
C: {
C: {
Line 259: Line 259:
<li>Mobile retrieves Desktop's msg 2
<li>Mobile retrieves Desktop's msg 2
<pre>
<pre>
C: GET /a7i HTTP/1.1
C: GET /a7id HTTP/1.1
C:  
C:  


Line 267: Line 267:
<p>Mobile computes key, uploads hash of key to prove its knowledge (msg 3)</p>
<p>Mobile computes key, uploads hash of key to prove its knowledge (msg 3)</p>
<pre>
<pre>
C: PUT /a7i HTTP/1.1
C: PUT /a7id HTTP/1.1
C:  
C:  
C: {
C: {
Line 280: Line 280:
<li>Desktop retrieves Mobile's msg 3 (hashed key)
<li>Desktop retrieves Mobile's msg 3 (hashed key)
<pre>
<pre>
C: GET /a7i HTTP/1.1
C: GET /a7id HTTP/1.1
C:  
C:  


Line 288: Line 288:
verifies it against its own version. If the hash matches, it encrypts and uploads Sync credentials.
verifies it against its own version. If the hash matches, it encrypts and uploads Sync credentials.
<pre>
<pre>
C: PUT /a7i HTTP/1.1
C: PUT /a7id HTTP/1.1
C:  
C:  
C: {
C: {
Line 311: Line 311:
<li>Mobile retrieves encrypted credentials
<li>Mobile retrieves encrypted credentials
<pre>
<pre>
C: GET /a7i HTTP/1.1
C: GET /a7id HTTP/1.1
C: If-None-Match: "111a424cbc8480465abcd35c8ebe4524"
C: If-None-Match: "111a424cbc8480465abcd35c8ebe4524"


Line 320: Line 320:
<li>Mobile deletes the session [OPTIONAL]
<li>Mobile deletes the session [OPTIONAL]
<pre>
<pre>
C: DELETE /a7i HTTP/1.1
C: DELETE /a7id HTTP/1.1


S: HTTP/1.1 200 OK
S: HTTP/1.1 200 OK
canmove, Confirmed users
725

edits

Navigation menu