Skip to content

docs: add antora and write the CC book [WPB-23952]#1963

Open
fewerner wants to merge 40 commits intomainfrom
felix/antora
Open

docs: add antora and write the CC book [WPB-23952]#1963
fewerner wants to merge 40 commits intomainfrom
felix/antora

Conversation

@fewerner
Copy link
Copy Markdown
Contributor

What's new in this PR


PR Submission Checklist for internal contributors
  • The PR Title
    • conforms to the style of semantic commits messages¹ supported in Wire's Github Workflow²
    • contains a reference JIRA issue number like SQPIT-764
    • answers the question: If merged, this PR will: ... ³
  1. https://sparkbox.com/foundry/semantic_commit_messages
  2. https://github.com/wireapp/.github#usage
  3. E.g. feat(conversation-list): Sort conversations by most emojis in the title #SQPIT-764.

fewerner and others added 29 commits March 27, 2026 13:32
`antora.yml` defines the local documentation project.

`antora-playbook.yml` defines all sources that contribute to the
documentation site. It is best practice to have this in a separate
repostiory as it configures the documentation without actually defining
the content. For the start we place it here.
Part of the configuration is the UI. We use the antora default UI for
now.

`ROOT` is the default module in antora. Every module can have `pages`,
`partials`, and `examples`.

Run `bunx antora antora-playbook.yml` to build the docs.
Under the hood it requires ruby and installing the gems.
`make antora` builds the antora documentation
`make antora-attachments` pulls in the api docs as static assets, kotlin
an ts for now.
GNU Make is sometimes a bit simplistic: if a step can produce multiple
outputs, and N of those outputs are out of date, it will just run
that step N times. This can be pretty time-consuming.

The way to avoid this is to use `&:` syntax, which tells `Make`
that all its targets are produced atomically, and a single run is
sufficient.

This is particularly important in rules which do some cleanup before
running again.
In the first instance this is simple, we just literally exclude the
autogenerated directory.

In two more instances we have wildcards in place that search for
files. The problems there were that those would not match the internal
files (in the `wasm-bindgen` subdirectory) on the first run, because
they would not yet exist, causing make to trigger a recompile on the
second run when they did later exist. Listing them explicitly means
that in combination with the `&:` token in the rule which generates
them, we can see that they're all newer than the deps.

In the other case where we had the wildcard, the generated code
was always previously deleted ,so including it in the rule was pointless.
Humans don't have to keep track of the freshness or lifecycle of
book attachments; that's the whole point of `make`. Instead, we
just have one target, `cc-book`, which depends on the attachments
being fresh and copied into the appropriate places.
@coriolinus coriolinus marked this pull request as ready for review March 27, 2026 12:34
@coriolinus coriolinus requested a review from a team March 27, 2026 12:34
@coriolinus coriolinus changed the title docs: add antora as main documentation tool docs: add antora and write the CC book [WPB-23952] Mar 27, 2026

https://www.rfc-editor.org/rfc/rfc9420.html[RFC 9420], the Messaging Layer Security standard, solves the group-scaling problem that limits Proteus.
Rather than maintaining an independent session per client pair, MLS establishes a single shared group secret from which all members independently derive the same encryption keys.
Membership changes are managed through a _ratchet tree_ — a binary tree structure that lets any member compute the new shared secret after an add or remove using only O(log n) key operations rather than O(n²) messages.
Copy link
Copy Markdown
Member

@SimonThormeyer SimonThormeyer Mar 27, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is missing an imho essential bit of information, not just membership changes, but also sending application messages has O(log n) complexity (since any members with a mutual subtree receieve messages encrypted with the same key, i.e., the key of the root node of that subtree)

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I thought that application messages are actually O(1), because once you have this shared group state, you end up with a symmetric AEAD key which requires exactly one encryption operation for that group/epoch.


The fundamental unit of time in an MLS group is the _epoch_.
Each epoch has a distinct shared secret; when membership changes (or when keys are rotated for other reasons), the group advances to a new epoch and new keys are computed.
This is MLS's forward secrecy guarantee: compromise of the current epoch does not expose messages from any prior epoch.
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe this is a good place also to mention post compromise security, the property that compromise of key material of the current epoch does not expose messages of any future epoch.

Turns out that OSX `cp -R` does something subtly different from
Linux `cp -R`, and it's based on the presence of the trailing slash
in the source of the copy.

Happily, it looks like we can fix it by just getting rid of that slash.
Therefore this commit.
. Renamed TypeScript wrapper functions (this should be undone after we upgrade to uniffi 0.30.0). `transaction()` ->
`newTransaction()`, `findCredentials()` -> `getFilteredCredentials()`
====

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These lines can be removed

:hide-uri-scheme:

This library is a simplified abstraction over the MLS and Proteus cryptographic protocols for end-to-end encrypted commmunication.
In addition, it provides end-to-end identity (E2EI) support.
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe it's worth mentioning that E2EI means using x509 credentials?

@@ -0,0 +1,90 @@
= The Database

The `Database` is CoreCrypto's keystore: the persistent store for all key material and cryptographic state.
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: we're also using the database for non-cryptographic data

Comment on lines +73 to +75
== Arbitrary Data Storage

The context provides two methods for storing a single blob of arbitrary bytes in the keystore, associated with the device:
Copy link
Copy Markdown
Member

@SimonThormeyer SimonThormeyer Mar 27, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe mention that it's intended (but not limited) to be used as a checkpoint mechanism during initial sync/batch decryption?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants