forked from openmls/openmls
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #18 from xmtp/nm/merge-upstream-feb-10
- Loading branch information
Showing
139 changed files
with
6,981 additions
and
4,788 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -29,6 +29,8 @@ jobs: | |
uses: actions-rs/[email protected] | ||
|
||
- name: Upload to codecov.io | ||
uses: codecov/codecov-action@v3 | ||
uses: codecov/codecov-action@v4 | ||
with: | ||
token: ${{ secrets.CODECOV_TOKEN }} | ||
files: ${{ steps.coverage.outputs.report }} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
name: wasm-bench | ||
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
pull_request: | ||
workflow_dispatch: | ||
|
||
env: | ||
CARGO_TERM_COLOR: always | ||
|
||
|
||
jobs: | ||
measure-wasm-size: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
# Install the required target | ||
- uses: dtolnay/rust-toolchain@stable | ||
with: | ||
target: ${{ matrix.arch }} | ||
- uses: Swatinem/rust-cache@v2 | ||
- name: Build and measure size of wasm bindings | ||
run: | | ||
cargo install wasm-pack | ||
sudo apt update && sudo apt install binaryen | ||
export PATH=$PATH:$HOME/.cargo/bin | ||
./openmls-wasm/check-size.sh |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,18 +1,24 @@ | ||
[workspace] | ||
members = [ | ||
"openmls", | ||
"traits", | ||
"openmls_rust_crypto", | ||
"fuzz", | ||
"cli", | ||
"interop_client", | ||
"memory_keystore", | ||
"delivery-service/ds", | ||
"delivery-service/ds-lib", | ||
"basic_credential", | ||
"openmls", | ||
"traits", | ||
"openmls_rust_crypto", | ||
"libcrux_crypto", | ||
"fuzz", | ||
"cli", | ||
"interop_client", | ||
"memory_keystore", | ||
"delivery-service/ds", | ||
"delivery-service/ds-lib", | ||
"basic_credential", | ||
"openmls-wasm", | ||
] | ||
resolver = "2" | ||
|
||
# Central dependency management for some crates | ||
[workspace.dependencies] | ||
tls_codec = { version = "0.4.0", features = ["derive", "serde", "mls"] } | ||
tls_codec = { version = "0.4.2-pre.1", features = [ | ||
"derive", | ||
"serde", | ||
"mls", | ||
], git = "https://github.com/rustcrypto/formats" } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
# App Validation | ||
|
||
> **NOTE:** This chapter described the validation steps an application, using OpenMLS, has to perform for safe operation of the MLS protocol. | ||
> | ||
> **⚠️** This chapter is work in progress (see [#1504](https://github.com/openmls/openmls/issues/1504)). | ||
## Proposal Validation | ||
|
||
When processing a commit, the application has to ensure that the application | ||
specific semantic checks for the validity of the committed proposals are performed. | ||
|
||
This should be done on the `StagedCommit`. Also see the [Message Processing](./user_manual/processing.md) | ||
chapter | ||
|
||
```rust,no_run,noplayground | ||
{{#include ../../openmls/tests/book_code.rs:inspect_staged_commit}} | ||
``` | ||
|
||
### External Commits | ||
|
||
The RFC requires the following check | ||
|
||
> At most one Remove proposal, with which the joiner removes an old version of themselves. If a Remove proposal is present, then the LeafNode in the path field of the external Commit MUST meet the same criteria as would the LeafNode in an Update for the removed leaf (see Section 12.1.2). In particular, the credential in the LeafNode MUST present a set of identifiers that is acceptable to the application for the removed participant. | ||
Since OpenMLS does not know the relevant policies, the application MUST ensure | ||
that the credentials are checked according to the policy. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,19 @@ | ||
# Join a group from a Welcome message | ||
|
||
To join a group from a `Welcome` message, a new `MlsGroup` can be instantiated directly from the `Welcome` message and an `MlsGroupJoinConfig` (see [Group configuration](./group_config.md) for more details). If the group configuration does not use the ratchet tree extension, the ratchet tree needs to be provided. | ||
To join a group from a `Welcome` message, a new `MlsGroup` can be instantiated from | ||
the `MlsMessageIn` message containing the `Welcome` and an `MlsGroupJoinConfig` | ||
(see [Group configuration](./group_config.md) for more details). This is a | ||
two-step process: a `StagedWelcome` is constructed from the `Welcome` | ||
and can then be turned into an `MlsGroup`. If the group configuration does not | ||
use the ratchet tree extension, the ratchet tree needs to be provided. | ||
|
||
```rust,no_run,noplayground | ||
{{#include ../../../openmls/tests/book_code.rs:bob_joins_with_welcome}} | ||
``` | ||
|
||
Pay attention not to forward a Welcome message to a client before its associated commit has been accepted by the | ||
Delivery Service. Otherwise, you would end up with an invalid MLS group instance. | ||
The reason for this two-phase process is to allow the recipient of a `Welcome` | ||
to inspect the message, e.g. to determine the identity of the sender. | ||
|
||
Pay attention not to forward a Welcome message to a client before its associated | ||
commit has been accepted by the Delivery Service. Otherwise, you would end up | ||
with an invalid MLS group instance. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
# WebAssembly | ||
|
||
OpenMLS can be built for WebAssembly. However, it does require two features that WebAssembly itself does not provide: access to secure randomness and the current time. Currently, this means that it can only run in a runtime that provides common JavaScript APIs (e.g. in the browser or node.js), accessed through the `web_sys` crate. | ||
You can enable the `js` feature on the `openmls` crate to signal that the APIs are available. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.