Get desktop application:
View/edit binary Protocol Buffers messages
Acquires a device group lock for an atomic operation shared across the device group. Reflection messages from the device to the mediator server will only be reflected once the transaction is committed. Type: 0x40 Direction: Client --> Server
The transaction scope (`d2d.TransactionScope`), encrypted by `DGTSK.secret` and prefixed with a random nonce.
Time-to-live in seconds for this transaction. Once the TTL is reached, the mediator server will abort the transaction and disconnect the client. When set to `0`, the server's maximum transaction TTL will be used.
Acknowledges that the device group lock has been acquired and that the transaction has been started. Type: 0x41 Direction: Client <-- Server
(message has no fields)
Initial message from the client, containing the authentication challenge response and additional login information. Type: 0x11 Direction: Client --> Server
Protocol version (`ProtocolVersion`) which the client has selected.
Challenge response (72 bytes) for authentication. The response is created by encrypting the server's challenge in the following way: ```text XSalsa20-Poly1305( key=X25519HSalsa20(DGPK.secret, ESK.public), nonce=<random>, ) ``` The nonce is then prefixed to the encrypted challenge.
Unique device id
Policy determining the device slot's lifetime
The expected device slot state on the server. If the expected device slot state does not match the actual device slot state, the device will be dropped by the mediator server with the close code `4115` before being registered.
Device info (`d2d.DeviceInfo`), encrypted by `DGDIK.secret` and prefixed with a random nonce.
Policy to be applied in case the device id is not registered on the server and all device slots have been exhausted.
Used in:
Terminate the connection
Drop the least recently used device
Send along client information when connecting to the mediator server. This message is serialized, hex-encoded (lowercase) and then used as the WebSocket path. Type: n/a Direction: Client -> Server
32 byte device group id (`DGPK.public`)
Server group, as assigned by the server when the Threema identity has been created. Must consist of only digits or ASCII letters (`^[0-9a-zA-Z]+$`).
Commits a transaction, releases a device group lock. Type: 0x42 Direction: Client --> Server
(message has no fields)
Acknowledges that the transaction has been committed and that the device group lock has been released. Type: 0x43 Direction: Client <-- Server
(message has no fields)
Policy determining the device slot's lifetime.
Used in:
,The device slot should be removed shortly after the device disconnected. However, there should be a delay of several minutes to ensure that the device can reconnect if it disconnected unintentionally.
The device slot should be kept as long as possible
Device registration state on the mediator server.
Used in:
,A new device slot has been allocated for the device (i.e. the device's id was not registered on the server).
An existing device slot has been reused for the device (i.e. the device's id is already registered on the server).
Device information of all devices. Type: 0x31 Direction: Client <-- Server
Device id to (augmented) device info map of all devices.
Used in:
Device info (`d2d.DeviceInfo`), encrypted by `DGDIK.secret` and prefixed with a random nonce.
Connection state
Unix-ish timestamp in milliseconds containing the most recent login time of the device. Only set if device is currently connected.
Unix-ish timestamp in milliseconds containing the most recent disconnect time of the device. Only set if device is not connected.
Expiration policy of the device.
Request to drop a device and free its device slot. Type: 0x32 Direction: Client --> Server
Unique device id
Acknowledges that a device has been dropped and the device slot has been free'd. Type: 0x33 Direction: Client <-- Server
Unique device id
Request device information of all devices. Type: 0x30 Direction: Client --> Server
(message has no fields)
D2M protocol versions.
Initial D2M protocol version (alpha, may break).
The device's reflection queue on the server has been fully transmitted to the device. Note: This does not mean that reflected messages have already been acknowledged by the device! Type: 0x20 Direction: Client <-- Server
(message has no fields)
The device's role has been promoted to leader, indicating that the device should now request to receive and reflect messages from the chat server. Type: 0x21 Direction: Client <-- Server
(message has no fields)
Initial message from the server, containing an authentication challenge. Type: 0x10 Direction: Client <-- Server
Highest protocol version (`ProtocolVersion`) the server supports.
32 byte ephemeral server key (`ESK.public`)
32 byte random challenge
Parts of the server's configuration and the device slot state. Type: 0x12 Direction: Client <-- Server
Current Unix-ish timestamp in milliseconds of the server. If the client's current timestamp deviates by more than 20 minutes, the client should disconnect and prompt the user to synchronise its clock. The user should also have an option to _connect anyway_ which should be cached for a reasonable amount of time.
Maximum number of device slots
Informs the device about its device slot state on the server
Device data shared among devices (`SharedDeviceData`), encrypted by `DGSDDK.secret` and prefixed with a random nonce.
Amount of messages in the reflection queue that will now be sent to the device. If the client is up-to-date, the value will be 0. Note: The amount of messages in the reflection queue may increase at any time, so there is no guarantee that `ReflectionQueueDry` will be received after having received `reflection_queue_length` reflected messages.
Set the shared device data which is being sent to each device during login. Type: 0x34 Direction: Client --> Server
Device data shared among devices (`d2d.SharedDeviceData`), encrypted by `DGSDDK.secret` and prefixed with a random nonce.
When a transaction ends (either because it was committed or because the device disconnected), this message is sent to all connected devices except for the device that committed the transaction. This can be used by the other devices as a "retry signal" if a previous "BeginTransaction" attempt was unsuccessful. Type: 0x45 Direction: Client <-- Server
The device that held the lock up until now
The encrypted transaction scope (`d2d.TransactionScope`) associated with the transaction that just ended, encrypted by `DGTSK.secret` and prefixed with a random nonce.
A `BeginTransaction` request is rejected because another transaction is already in process. Type: 0x44 Direction: Client <-- Server
The device that currently holds the lock
The encrypted transaction scope (`d2d.TransactionScope`) associated with the currently locked transaction, encrypted by `DGTSK.secret` and prefixed with a random nonce.