Skip to content

Commit 2235305

Browse files
committed
chore(book): edit for clarity
1 parent 4805241 commit 2235305

File tree

6 files changed

+17
-17
lines changed

6 files changed

+17
-17
lines changed

cc-book/modules/ROOT/pages/client.adoc

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,15 +19,16 @@ This means `CoreCrypto` can be freely passed to background tasks or across threa
1919
== Read-Only Operations
2020

2121
Most MLS work happens inside a transaction (see xref:transactions.adoc[]), but a handful of read-only operations are available directly on `CoreCrypto` without opening one.
22-
These operations are intentionally narrow.
22+
The set of read-only operations available on `CoreCrypto` is intentionally kept narrow.
23+
2324
Any operation that might change state — creating or deleting a conversation, adding members, encrypting or decrypting a message — requires a transaction.
2425

2526
== Lifecycle
2627

2728
A `CoreCrypto` instance is typically created once at application startup and kept alive for the life of the process.
2829
The initialization sequence is:
2930

30-
[source]
31+
[source,typescript]
3132
----
3233
const db = await Database.open(path, key); // open the keystore
3334
const cc = CoreCrypto.new(db); // construct CoreCrypto

cc-book/modules/ROOT/pages/database.adoc

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ All entries are encrypted at rest using the `DatabaseKey` provided at open time.
1717

1818
== Backing Storage
1919

20-
On platforms with an operating system the database is backed by https://www.zetetic.net/sqlcipher/[SQLCipher], an encrypted SQLite variant.
20+
On non-browser platforms the database is backed by https://www.zetetic.net/sqlcipher/[SQLCipher], an encrypted SQLite variant.
2121
On the browser, the database sits atop IndexedDB and uses item-level encryption managed by CoreCrypto.
2222
In both cases, data is encrypted at rest.
2323

@@ -45,7 +45,7 @@ If the key is lost, the database contents are unrecoverable.
4545

4646
== Opening the Database
4747

48-
All platforms define an async `Database.open` static method accepting a location and key. On platforms with an OS, the location is a filesystem path. On WASM, the location is the IndexedDB store naem.
48+
All platforms define an async `Database.open` static method accepting a location and key. On platforms with an OS, the location is a filesystem path. On WASM, the location is the IndexedDB store name.
4949

5050
All platforms define an async static method to open a transient database in memory. On WASM, this is `Database.inMemory`. For Kotlin and Swift, this is an overload of `Database.open`.
5151

@@ -72,10 +72,9 @@ db.close()
7272
== Single-Transaction Constraint
7373

7474
Only one transaction may write to the database at a time.
75-
If `newTransaction()` is called while another transaction is open, the call will block until the first transaction calls `finish()` or `abort()`.
75+
If a transaction is requested while another transaction is in flight, the call will block until the first transaction concludes.
7676

77-
This has a direct consequence for application architecture: long-running transactions (for example, processing a large backlog of incoming messages) can block other operations that need to write, such as sending a new message.
78-
Keep transactions short-lived — acquire, mutate, finish, release.
77+
For more detail, see xref:transactions.adoc#_concurrency[Transactions -> Concurrency].
7978

8079
== Exporting a Copy
8180

cc-book/modules/ROOT/pages/mls.adoc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ Wire's convention is to encode the client ID as a UTF-8 string of the form `user
2626

2727
=== `MlsTransport`
2828

29-
CoreCrypto does not know how to innately send data over the network; instead, the caller provides an implementation of this interface that CoreCrypto calls on demand.
29+
CoreCrypto intentionally abstains from communication with the Wire backend; instead, the caller provides an implementation of this interface that CoreCrypto calls on demand.
3030

3131
`sendCommitBundle(commitBundle)`::
3232
Called whenever a commit is produced — for example when creating a conversation, adding or removing members, or rotating keys.
@@ -99,7 +99,7 @@ Key packages::
9999

100100
== Ciphersuites
101101

102-
A MLS ciphersuite is a composite designation which specifies the KEM, AEAD, hash, and signature algorithms.
102+
An MLS ciphersuite is a composite designation which specifies the KEM, AEAD, hash, and signature algorithms.
103103
CoreCrypto formally supports any of the ciphersuites specified in the RFC, but is primarily tested on ciphersuite 1 (MLS_128_DHKEMX25519_AES128GCM_SHA256_Ed25519).
104104

105105
The ciphersuite is fixed per conversation at the conversation's creation.

cc-book/modules/ROOT/pages/proteus.adoc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ This effect is compounded by the fact that a logical user in the sense of a huma
99
This O(n²) overhead is manageable for small groups, but becomes expensive as they scale, and it was the primary motivation for adopting MLS.
1010

1111
Proteus remains supported for backwards compatibility, but has not received direct development work in some time.
12-
Its implementaion is already feature-gated for easy removal, and is intended to be removed as soon as we can confirm that a sufficiency of clients have upgraded their conversations to MLS.
12+
Its implementation is already feature-gated for easy removal, and is intended to be removed as soon as we can confirm that a sufficiency of clients have upgraded their conversations to MLS.
1313

1414
== Initialization
1515

@@ -26,7 +26,7 @@ All other Proteus methods will return an error if called before `proteusInit()`
2626
== Identity and Fingerprints
2727

2828
A Proteus identity is a long-lived Ed25519 keypair tied to the device.
29-
CoreCrypto exposes three fingerprint accessors, each returning a lowercase hex string:
29+
CoreCrypto exposes several fingerprint accessors, each returning a hex string:
3030

3131
`proteusFingerprint()`::
3232
The local device's public key.

cc-book/modules/ROOT/partials/cc10-migration.adoc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,13 +19,13 @@ ifeval::[{platform} != browser]
1919
endif::[]
2020
As before with `deferredInit()`, call `mlsInit()` in a transaction to initialize MLS.
2121

22-
== MLS Initialization.
22+
== MLS Initialization
2323

2424
. `mlsInit()` was decoupled from key package creation.
2525
To create key packages after initializing MLS, call `clientKeypackages()` in a transaction.
2626

2727
. removed `CoreCrypto.provideTransport()`, added `transport` parameter to `CoreCryptoContext.mlsInit()`
28-
Instead of providing transport separately from MLS initialization provide it when calling `mlsInit()``.
28+
Instead of providing transport separately from MLS initialization provide it when calling `mlsInit()`.
2929

3030
== Logging
3131

cc-book/modules/browser/pages/cc10-migration.adoc

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
= Migrating from v9.x to v10.0
44

55
== Browser Module Location
6-
We want to set the ground for a native module.
6+
We want to prepare the ground for a native module, which runs on node or bun.
77
Therefore, the browser module is now exported as `@wireapp/core-crypto/browser`.
88
Update your imports from `@wireapp/core-crypto` to `@wireapp/core-crypto/browser`.
99

@@ -38,7 +38,7 @@ https://jhugman.github.io/uniffi-bindgen-react-native/idioms/errors.html#enums-a
3838
==== Example Usage
3939

4040
.Extracting the abort reason given via an `MlsTransportResponse`
41-
[source, typescript]
41+
[source,typescript]
4242
----
4343
import { CoreCryptoError, MlsError } from "core-crypto";
4444
@@ -56,7 +56,7 @@ https://jhugman.github.io/uniffi-bindgen-react-native/idioms/errors.html#enums-a
5656
----
5757

5858
.Optional: use `switch` to handle multiple errors in one go
59-
[source, typescript]
59+
[source,typescript]
6060
----
6161
import { CoreCryptoError, MlsError, MlsError_Tags } from "core-crypto";
6262
@@ -78,7 +78,7 @@ https://jhugman.github.io/uniffi-bindgen-react-native/idioms/errors.html#enums-a
7878
----
7979

8080
.Catch a proteus error
81-
[source, typescript]
81+
[source,typescript]
8282
----
8383
import { CoreCryptoError, ProteusError } from "core-crypto";
8484

0 commit comments

Comments
 (0)