sync/sync_protocol.md
author Neal H. Walfield <neal@pep.foundation>
Wed, 08 May 2019 12:20:37 +0200
branchemail_comparison
changeset 3649 1dd837adc30b
parent 3606 341d6694d968
permissions -rw-r--r--
Fix public key.
vb@3556
     1
# p≡p Sync protocol
vb@3555
     2
vb@3556
     3
## Protocol Stack
vb@3555
     4
vb@3555
     5
Key Sync | Trust Sync | Contact Sync | Task Sync
vb@3556
     6
- | - | - | -
vb@3555
     7
Sync
vb@3555
     8
Baseprotocol
vb@3555
     9
Transport
vb@3555
    10
vb@3567
    11
## Forming a Device Group with Key Sync
vb@3555
    12
vb@3556
    13
### Sender
vb@3555
    14
vb@3555
    15
A Sender is the Person sending a message. In case of M2M it is the Operating
vb@3555
    16
Entity of the Device sending.
vb@3555
    17
vb@3556
    18
### Device
vb@3555
    19
vb@3555
    20
A Device is an entitiy, which is sending representative of a Sender.
vb@3555
    21
vb@3556
    22
### State Sole
vb@3555
    23
vb@3555
    24
A Device is in state Sole when it is not member of a Device group and when it
vb@3555
    25
is not part of a Negotiation.
vb@3555
    26
vb@3556
    27
### State Grouped
vb@3555
    28
vb@3555
    29
A Device is in state Grouped when it is member of a Device group and when it is
vb@3555
    30
not part of a Negotiation.
vb@3555
    31
vb@3556
    32
## Negotiation as a Transaction
vb@3555
    33
vb@3556
    34
### TID
vb@3555
    35
vb@3555
    36
A TID (transaction ID) is a UUID version 4 variant 1.
vb@3555
    37
vb@3556
    38
### Challenge
vb@3555
    39
vb@3555
    40
The Challenge is identified by a TID. The Challenge is being set by each Beacon
vb@3556
    41
and must be repeated in a corresponding Negotiation Request. The Challenge has
vb@3556
    42
two functions:
vb@3555
    43
vb@3556
    44
1. The Challenge makes it possible to filter out own Beacons
vb@3556
    45
1. The Challenge makes it necessary to be able to read the communication
vb@3556
    46
   channel (usually an Inbox), otherwise Beacons cannot be answered
vb@3555
    47
vb@3556
    48
### Negotiation
vb@3555
    49
vb@3605
    50
A Negotiation is a Transaction identified by a TID. The Negotiation's TID is
vb@3606
    51
the XOR of the two Challenge TIDs of the two devices, respectively.
vb@3555
    52
vb@3556
    53
## Roles and Keys
vb@3556
    54
vb@3556
    55
### Sender signing
vb@3555
    56
vb@3555
    57
The key with which the Sender of the message is signing. In case of trusted
vb@3555
    58
messages this is signalled within the encrypted message. This is signalled by
vb@3555
    59
by opt_field pEp-sender-sign, which is not reflected to the outer message.
vb@3555
    60
vb@3555
    61
Transports can opt to use HMAC or OMAC instead of digital signatures.
vb@3555
    62
vb@3556
    63
### Transport signing
vb@3555
    64
vb@3555
    65
Keys with which others and not the Sender are signing a message.
vb@3555
    66
vb@3556
    67
### Sender Group key
vb@3555
    68
vb@3555
    69
A Sender Group Key is a Sender's signing key, which is used to update the
vb@3555
    70
Device Group information. If it is reset the Device Groups breaks.
vb@3555
    71