Services/Sync/P2P Key Exchange And Rotation: Difference between revisions

Minor edits
(Minor edits)
(Minor edits)
Line 231: Line 231:
<ol start="0">
<ol start="0">
<li>Each client publishes an identity key (AI, BI) and a set of ephemeral key digests (AE{1..n}, BE{1..n}d)</li>
<li>Each client publishes an identity key (AI, BI) and a set of ephemeral key digests (AE{1..n}, BE{1..n}d)</li>
<li>Client A generates a new ephemeral key (AEp) and sends a message to Client B nominating one of client B's ephemeral key digests (BEd).</li>
<li>Client A: Generates a new ephemeral key (AEp) and sends a message to Client B nominating one of client B's ephemeral key digests (BEd).</li>
<li>Client B receives client A's ephemeral key (AEp) and digest for own ephemeral key (BEd). Using 3DHE and a KDF Client B generates the session key (SK) then sends message including own ephemeral key (BEp) matching digest (BEd). Client B can now encrypt/decrypt the message body with session key.</li>
<li>Client B: Using 3DHE and a KDF generates the session key (SK) then sends message including own ephemeral key (BEp) matching digest (BEd). Client A can now also generate the shared secret (SK) and hence the message body can be encrypted immediately.
<li>Client A receives client B's ephemeral key (BEp). Using 3DHE and a KDF, client A generates the session key (SK). Client A can now encrypt/decrypt the message body with the session key.</li>
</ol>
</ol>


Line 250: Line 249:
           AEs                                    AEp, BEp        BEs
           AEs                                    AEp, BEp        BEs
           SK = KDF(3DHE(AIs, AEs, BIp, BEp))    BEd              SK = KDF(3DHE(BIs, BEs, AIp, AEp)
           SK = KDF(3DHE(AIs, AEs, BIp, BEp))    BEd              SK = KDF(3DHE(BIs, BEs, AIp, AEp)
          CT                                                      PT = <message>
          PT = DECRYPT(CT, SK)                                    CT = ENCRYPT(PT, SK)


t3        AIs                                    AIp, BIp        BIs
          SK                                                      SK
          PT = <message>                                          CT
          CT = ENCRYPT(PT, SK)                                    PT = DECRYPT(PT, SK)
</pre>
</pre>


113

edits