mirror of
https://code.briarproject.org/briar/briar.git
synced 2026-02-17 13:19:52 +01:00
Blog signature must cover the client ID
@@ -2,25 +2,24 @@ BlogClient is a [BSP client](BSP) that synchronises blog posts among groups of d
|
|||||||
|
|
||||||
### Channel identifiers
|
### Channel identifiers
|
||||||
|
|
||||||
All blogs share a single invitation channel with the following random identifier:
|
BlogClient uses the following client identifer:
|
||||||
`4f39 df93 e933 5027 9909 82bf 442f 7b40 75d3 b7f6 6139 34dd c6d1 b539 7a2a 65a3`
|
|
||||||
|
|
||||||
Each blog has its own channel with a [hash identifier](BSP#channel-identifiers). The client data structure for generating the identifier is a [BDF](BDF) list with two elements: `name` (string) and `public_key` (raw).
|
|
||||||
|
|
||||||
The client identifer is random:
|
|
||||||
`dafb e56f 0c89 7136 5cea 4bb5 f08e c9a6 1d68 6e05 8b94 3997 b6ff 259b a423 f613`
|
`dafb e56f 0c89 7136 5cea 4bb5 f08e c9a6 1d68 6e05 8b94 3997 b6ff 259b a423 f613`
|
||||||
|
|
||||||
|
Each blog has its own channel, and there is a single invitation channel shared by all blogs. The [channel descriptor](BSP#channel-identifiers) for the invitation channel is an empty [BDF list](BDF).
|
||||||
|
|
||||||
|
The channel descriptor for a blog channel is a list with two elements: `name` (string) and `public_key` (raw).
|
||||||
|
|
||||||
### Message types
|
### Message types
|
||||||
|
|
||||||
**0: INVITATION** - The content is a BDF list with two elements: `blog` (list) and `note` (string, may be null). `blog` is a list with two elements, `name` and `public_key`, as described above. `note` is an optional note from the inviter to the invitee.
|
**0: INVITATION** - The content is a list with three elements: `name` (string), `public_key` (raw), and `note` (string or null). The channel identifier can be calculated from `name` and `public_key`, as described above. `note` is an optional note from the inviter to the invitee.
|
||||||
|
|
||||||
**1: RESPONSE** - The content is a list with three elements: `invitation_id` (raw), `decision` (boolean), and `note` (string, may be null). `invitation_id` is the identifier of an invitation created by the opposite peer. `decision` indicates whether the invitee wishes to subscribe. `note` is an optional note from the invitee to the inviter.
|
**1: RESPONSE** - The content is a list with three elements: `invitation_id` (raw), `decision` (boolean), and `note` (string or null). `invitation_id` is the identifier of an invitation created by the opposite peer. `decision` indicates whether the invitee wishes to subscribe. `note` is an optional note from the invitee to the inviter.
|
||||||
|
|
||||||
**2: DEPARTURE** - The content is a list with one element: `invitation_id` (raw), which is the identifier of an invitation created by either peer.
|
**2: DEPARTURE** - The content is a list with one element: `invitation_id` (raw), which is the identifier of an invitation created by either peer.
|
||||||
|
|
||||||
**3: POST** - The content is a list with two elements: `content` (list) and `signature` (raw). `content` is a list with three elements: `parent_id` (raw, may be null), `body` (string), and `attachments` (dictionary, may be null). If `parent_id` is not null, it is the identifier of a post to which this is a follow-up. Each key in `attachments` is the name of an attachment, and the value is a list with two elements: `mime_type` (string) and `message_id` (raw).
|
**3: POST** - The content is a list with two elements: `content` (list) and `signature` (raw). `content` is a list with three elements: `parent_id` (raw or null), `body` (string), and `attachments` (dictionary or null). `parent_id` is the identifier of a post to which this is a follow-up. Each key in `attachments` is the name of an attachment, and the value is a list with two elements: `mime_type` (string) and `message_id` (raw).
|
||||||
|
|
||||||
`signature` is a signature with `public_key`, calculated over a list with four elements: `client_id` (raw), `blog` (list), `content` (list), and `timestamp` (int). `client_id` is the client identifier. `blog` and `content` are described above. `timestamp` is the timestamp from the [message header](BSP#message-format).
|
`signature` is a signature over a list with three elements: `channel_id` (raw), `timestamp` (int), and `content` (list). `channel_id` and `timestamp` are taken from the [message header](BSP#message-format). `content` is described above.
|
||||||
|
|
||||||
**4: ATTACHMENT** - The content is raw data.
|
**4: ATTACHMENT** - The content is raw data.
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user