|
|
The private group sharing client is a [BSP client](BSP) that allows users to share private groups with their contacts, who may accept or decline the invitations.
|
|
|
The private group sharing client is a [BSP client](BSP) that allows users to share private groups with their contacts, who may accept or decline the invitations. It is used in conjunction with the [private group client](private group client).
|
|
|
|
|
|
### Group identifiers
|
|
|
### Identifier
|
|
|
|
|
|
The client's identifier is `org.briarproject.briar.privategroup.invitation`.
|
|
|
The client's identifier is `org.briarproject.briar.privategroup.invitation`. The major version is 0.
|
|
|
|
|
|
The client uses a separate BSP group for each pair of contacts. The [group descriptor](BSP#group-identifiers) is a [BDF list](BDF) containing the unique IDs of the contacts' identities, sorted in ascending order as byte strings.
|
|
|
### Groups
|
|
|
|
|
|
The client uses a separate BSP group for communicating with each contact. The [group descriptor](BSP#group-identifiers) is a [BDF list](BDF) containing the unique IDs of the contacts' identities, sorted in ascending order as byte strings.
|
|
|
|
|
|
### Roles
|
|
|
|
|
|
All communication happens between two contacts, who may take different roles with respect to each private group. If one of the contacts created the private group, that contact takes the role of **creator** and the other takes the role of **invitee**. Otherwise both contacts take the role of **peer**.
|
|
|
|
|
|
### Sessions
|
|
|
|
|
|
The messages exchanged between two contacts referring to a given private group constitute a session. The private group's unique ID is used as the session ID.
|
|
|
|
|
|
### Message types
|
|
|
|
|
|
The sharing protocol uses four message types. All communication happens between two contacts. If one of the contacts created the private group, that contact takes the role of creator and the other takes the role of invitee. Otherwise both contacts take the role of peer. The messages referring to each private group constitute a session.
|
|
|
The protocol uses four message types.
|
|
|
|
|
|
**0: INVITE** - Sent by the creator to the invitee. The message body is a BDF list with six elements: `messageType` (int), `creator` (list), `groupName` (string), `salt` (raw), `message` (string or null), and `signature` (raw).
|
|
|
|
|
|
`creator`, `groupName` and `salt` are taken from the private group descriptor. `creator` must be the identity of the contact who sent the message.
|
|
|
|
|
|
The signature covers a BDF list with three elements: `timestamp` (int), `contactGroupId` (unique ID), and `privateGroupId` (unique ID). The timestamp and contact group ID are taken from the message header. The private group ID is calculated from the private group descriptor. The public key from the private group descriptor is used to validate the signature.
|
|
|
The signature covers a BDF list with three elements: `timestamp` (int), `contactGroupId` (unique ID), and `privateGroupId` (unique ID). The timestamp and contact group ID are taken from the message header. The private group ID is calculated from the private group descriptor. The public key from the private group descriptor is used to validate the signature. The signature label is `org.briarproject.briar.privategroup.invitation/INVITE`.
|
|
|
|
|
|
The creator sets the private group's visibility to VISIBLE when sending an invite message.
|
|
|
|
... | ... | |