-
Daniel Lublin authoredDaniel Lublin authored
Bramble Synchronisation Protocol, version 0
1 Introduction
Bramble Synchronisation Protocol (BSP) is an application layer data synchronisation protocol suitable for delay-tolerant networks.
1.1 System Model
BSP synchronises data among dynamic sets of devices. Each device has a dynamic set of peers with which it communicates.
Data is organised into groups. Each group is an independent synchronisation scope containing a message graph made up of immutable messages.
If a device takes part in synchronising a group's messages, we say the device is a member of the group. If two peers synchronise a group's messages with each other, we say they share the group with each other. Group membership and sharing are dynamic. Devices that are members of a group are not necessarily each other's peers, and peers that are members of a group do not necessarily share it with each other.
Each member of a group stores a copy of the message graph, which may be incomplete. Each message in the member's copy of the graph may be shared or deleted. If a message is shared, the device will synchronise the message to any peers with which it shares the group. If a message is deleted, the device will delete its copy of the message but retain some information about the message's position in the graph.
Each group belongs to a client, which is an application component that uses BSP to synchronise data. The client is responsible for deciding which peers the group should be shared with, what constitutes a valid message, which messages should be shared, and which messages should be deleted. BSP carries out these decisions on behalf of the client.
1.2 Transport Layer Security
BSP requires a transport layer security protocol that can deliver data from one device to another on a best-effort basis, meaning that data may be delayed, lost, reordered or duplicated. The transport layer security protocol is responsible for ensuring the confidentiality, integrity, authenticity and forward secrecy of the data it carries.
1.3 Notation
- || denotes concatenation
- Double quotes denote an ASCII string
- len(x) denotes the length of x in bytes
- int_n(x) denotes x represented as an unsigned, big-endian, n-bit integer
1.4 Cryptographic Primitives
BSP uses a cryptographic hash function, H(m).
We use H(m) to define a multi-argument hash function:
- HASH(x_1, ..., x_n) = H(int_32(len(x_1)) || x_1 || ... || int_32(len(x_n)) || x_n)
All hashes are HASH_LEN bytes.
(Note: The current version of the protocol uses BLAKE2b as the hash function, with an output length of 32 bytes, giving HASH_LEN = 32.)