Repository navigation
Merge upstream openmls/openmls main (65396d8) into main - #55
Merged
Merged
Conversation
This avoids /library/std/src/sys/time/unsupported.rs:35:9:
time not implemented on this platform
…penmls#1963) This PR is the first in a number of PRs towards implementing the [virtual clients draft](https://github.com/mlswg/mls-virtual-clients). This PR adds the `virtual-clients-draft` feature flag. Guarded by that flag, it adds a two-stage mechanism that allows sending an application message and deleting the corresponding message secret in two separate steps. This PR also generally enables clients to decrypt their own application messages by introducing a new `DualUseRatchet` in addition to the sender and decryption ratchets. The `DualUseRatchet` stores additional metadata to properly maintain the retention window for missed messages. In particular, ratchet secrets used for encryption shouldn't influence the retention of secrets for decryption of missed messages.
This PR implements the Safe AAD functionality as defined in the extensions draft: https://datatracker.ietf.org/doc/draft-ietf-mls-extensions/09/
This PR allows clients to send and receive commits via a virtual client. - Allow derivation of virtual-client specific secrets from emulation group and store them in the storage provider - Allow creation of virtual client commits from those secrets and embed information in leaf component - When receiving a virtual client commit sent by another emulation client, read embedded information, derive the correct secrets and process commit - Extended storage interface for virtual client secrets External commits are not covered yet and will be handled in a follow-up.
…y default (openmls#2032) - Run tests with only the MTI ciphersuite and the rustcrypto provider (add a PQ ciphersuite later) - Introduce new `all-ciphersuites` feature flag that causes tests to run with all ciphersuites enabled - Remove kat generation from test runs, hide them behind feature flag - Introduce new nightly CI job that runs tests with all ciphersuites and all providers enabled
Add `process_message_with_app_data_updates` to `PublicGroup`, mirroring the corresponding `MlsGroup` API so that public-group consumers can process messages and observe application data updates.
* chore: fix broken documentation link * enable js feature in [email protected] * Revert "enable js feature in [email protected]" This reverts commit ddd27b5.
* update dependencies * upgrade rand to 0.10 in openmls * remove unused rstest which pull [email protected] * use [email protected] in ds-lib * fix rand usage in tests * fix compilation for wasm
… provider (openmls#2046) Add post-quantum and P-384 ciphersuite support to the RustCrypto provider, hidden behind the `draft-ietf-mls-pq-ciphersuites` feature flag: - `MLS_192_MLKEM1024_AES256GCM_SHA384_P384` (ML-KEM1024 + ECDSA P-384) - `MLS_256_MLKEM1024_AES256GCM_SHA512_MLDSA87` (ML-KEM1024 + ML-DSA87) - the remaining PQ ciphersuites supported by RustCrypto, plus the custom AIR_128_MLKEM768_AES256GCM_SHA384_Ed25519 ciphersuite Wire ML-DSA 0.1 signing into basic_credential, propagate the feature flag across crates, and adjust KAT/storage tests for the new ciphersuites and ciphersuite-dependent hash lengths.
…penmls#2030) This PR implements the reuse guard computation/derivation aspect of the virtual clients draft. When sending a PrivateMessage, clients compute the reuse guard based on the emulation group state that was last used to update the group. This binding between higher-level group (ID) and emulation group epoch is stored in the storage provider. The reuse guard is computed using a small-space PRP, which is pulled in as a dependency. On the spec-level, computing the reuse guard in this way avoids reuse guard collisions between emulator clients. Emulator clients that receive a PrivateMessage from a sibling emulator client in a higher-level group can reverse the reuse guard computation to determine which emulator client has sent the message. This change, along with the failure modes associated with this reversing operation required some threading of information through various function calls. I apologize for the churn.
…openmls#2031) This PR is only relevant when using the `virtual-clients-draft` feature flag. It enable processing of external commits by sibling emulator clients.
* feat: add unchecked constructors to bypass KeyPackage/LeafNode validation Add functions that allow assuming a `KeyPackage` and `LeafNode` are already verified, constructing the validated types without re-running signature/struct validation. Intended for callers that have verified the input through another path. * rename to into_unchecked * add safety section in docs * introduce unchecked-conversions flag and add unchecked conv for extensions
Add a new application PSK type and the corresponding proposal/staged commit handling, allowing applications to inject their own pre-shared keys into the key schedule. Additionally rename `propose_external_psk` to `propose_pre_shared_key` and `propose_external_psk_by_value` to `propose_pre_shared_key_by_value`. The former methods are deprecated.
This PR switches virtual client operations from the 32byte PPRF to a more efficient SecretTree-style PR with one leaf per emulation group member plus on ratchet per operation type. This PR defers to follow-up PRs: - KeyPackage creation and Welcome processing - `GenerationId` usage - `VirtualClientAction` via SafeAAD - Backwards-compat pass Completely out of scope for now: - Onboarding new emulator clients via state transfer - Update proposals (in higher-level groups) - Private handshake messages
The function should have been infallible from the beginning. This is a remnant from openmls#2045.
Adds KeyPackage building and Welcome processing for virtual clients (behind `virtual-clients-draft`), so a virtual client can publish KeyPackages that a sibling recovers and uses to join higher-level groups. - **Building:** `KeyPackageBuilder::build_vc_batch` allocates one `key_package` operation generation per batch, derives a per-KeyPackage seed (and from it the init and leaf encryption keys) for each index, and embeds an encrypted `DerivationInfo` in each leaf under `VC_COMPONENT_ID`. Returns a `VcKeyPackageBatch` with the generation and the built bundles. - **Carrying between siblings:** `assemble_vc_key_package_upload` builds and retains the key material for a received KeyPackage upload message. - **Welcome:** `find_and_validate_vc_own_leaf` locates the joined leaf by its derived encryption key, decrypts the leaf's `DerivationInfo`, and checks the embedded `(leaf_index, generation, key_package_index)` against the retained material.
So far it was only derived if the test-utils feature is set. The main point of the In packages is not to prevent us from serializing received messages, but from derializing into types we assume are verified. When using these types in APIs in other projects, it's a little annoying having to propagate or work around this In/Out split on the higher layer as well. For example, when submitting an MlsMessage as an HTTP POST body to a relay, if we only impl one of Serialize and Deserialize, then the request type would have to be different on client on server, which reduces code reuse.
Meant to do this in openmls#2071, but didn't actually. Do it now.
* targeted messages * fix docs * address review comments * apply spec changes * add test vector from spec * use internal padding size * adjust comment * one more parameter * format
This PR allows emulator clients to process virtual client external commits from other emulator clients that are not resyncs, i.e. that result in the creation of a new group. This PR also adds some wire format details that are required for a follow-up PR that allows emulator clients to process virtual client group creations by sibling emulator clients.
This PR allows emulator clients to locally bootstrap groups created by sibling emulator clients.
* better AppDataUpdate processing API * adjust other crates * fix merge * fix test * address one more review comment
* better AppDataUpdate processing API * adjust other crates * fix merge * fix test * process own private messages * address review comments
Based on openmls#2092. Adds the same pattern of AppDataUpdate processing for PublicGroups.
…#2105) Processing a commit checked for sibling VC material before checking whether the commit matches the group's pending commit. Since an own commit fanned back by the DS has the same shape as a sibling's commit (Sender::Member(own_leaf) with VC derivation info on the path leaf), load_vc_commit_material re-derived the operation secret the sender had already consumed at send time and processing failed with OperationGenerationConsumed, making OwnPendingCommit unreachable for VC commits. Check the pending-commit match first, so an own commit echo surfaces as OwnPendingCommit without touching the operation secret tree. Sibling commits never match the pending commit's confirmation tag and still take the VC staging path.
confirm_message deleted the given generation from the current epoch's own application ratchet. If the group advanced an epoch between create_unconfirmed_message and the confirmation, it either silently no-oped, retaining the old secret forever, or deleted a different message's still-unconfirmed secret that shared the generation number in the new epoch, making a lost race against a sibling undecryptable. confirm_message now takes the creation epoch, carried on UnconfirmedMessage, and deletes exactly the secret its create call retained, or nothing: aged-out epochs and already-consumed generations are no-op successes, future epochs are rejected. The new confirm_handshake_message applies the same semantics to the handshake ratchet, giving retained own proposal and commit secrets a cleanup path. Proposals and commits share the per-epoch handshake ratchet, so one endpoint covers both.
The newly added `VcKeyPackageBatchBuilder` allows to build heterogeneous batches of key packages. Build the batch on `finalize`. Dropping the builder without calling `finalize` burns no generation.
* early detection of ciphersuite support * a few fixes
…enmls#2107) Handshake messages framed as PrivateMessages retained their own encryption secret but discarded the ratchet generation, so applications could not confirm them, and no GenerationId was derived from the handshake ratchet. encrypt() now derives a GenerationId for proposals and commits when the group is bound to an emulation epoch. content_to_mls_message returns the framed message together with HandshakeConfirmationData (epoch, generation, generation id) for ciphertext-framed messages. CommitBuilder surfaces it via CommitMessageBundle::confirmation() and the new propose_unconfirmed mirrors propose() while returning the confirmation data. Existing propose_* signatures are unchanged. Propose is now re-exported, making the generic propose API publicly usable.
- tls_codec to 0.5 - libcrux and hpke to latest releases - rand to 0.10 for libcrux - use hmac-drbg in libcrux provider
…enmls#2115) This commit introduces a new concept `ImportSecret` from the amended virtual client draft. The `ImportSecret` operation imports a secret from the emulation group's ciphersuite into the target ciphersuite. This operation must be performed even when the ciphersuites are the same. This resolves an ambiguity in with respect to which ciphersuite secrets are derived that are used in the context of virtual client.
The PQ ciphersuites [draft](https://datatracker.ietf.org/doc/draft-ietf-mls-pq-ciphersuites/) added more ciphersuites. It also now supports the previously custom Air ciphersuite.
…penmls#2119) When registering an emulation epoch, we store the epoch id along with the epoch it was registered for in the storage for the group. Next call of `register_vc_emulation_epoch` returns the same epoch id if the epoch of the group did not advance. The data is deleted when the group is deleted or the member is removed.
* build(ci): increase wasm size limit check to 2 MB in CI * also increase the gzip limit
tylerhawkes
force-pushed
the
tyler/merge-upstream-main
branch
from
July 22, 2026 19:34
01c8f5a to
57367bb
Compare
|
Macroscope skipped reviewing this pull request. Per-review cost limit exceeded (workspace setting). This review would cost an estimated $34.12, which exceeds your per-review limit of $10.00. The top 3 files driving up this estimate:
Tip To get this pull request reviewed, you can:
|
ApprovabilityVerdict: Needs human review Unable to check for correctness in 57367bb. CODEOWNERS file was modified by a non-owner — requires human review You can customize Macroscope's approvability policy. Learn more. |
insipx
approved these changes
Jul 22, 2026
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Merges upstream
openmls/openmlsmain (65396d8) into ourmain. This is phase 1 of 2: it brings the fork current with ~2.5 months / 67 upstream commits. A follow-up storage replay PR restores the persisted layout on top of this.Why merge instead of rebase
Our
mainis already a merge-based fork (f850fdf6is itself a merge of upstream). Continuing to merge keeps history/provenance intact and future merges cheap, and it lets us isolate the storage-critical divergence into its own reviewable follow-up rather than burying it in a rebase.Conflicts resolved (3 files)
All three are the same root cause — upstream's openmls#2060
extensions-draft-08→extensions-draftrename landing next to our carries:extensions/codec.rs— merged themetadata::Metadataimport and kept theImmutableMetadata(de)serialize arms; took the feature rename.extensions/mod.rs— keptImmutableMetadatain both enums, all four validity match-arms, and theimmutable_metadata()accessor; took upstream'sstorage_tagnumbering untouched.mls_group/membership.rs— split the error import soUpdateGroupMembershipErrorstays unconditional (the ungatedupdate_group_membershipneeds it) whileEmptyInputErrorkeeps upstream'svirtual-clients-draftgate.To keep this merge free of storage semantics,
ImmutableMetadatais parked at the next freestorage_tag(9onExtensionType,8onExtension), leaving upstream'sUnknown=6 / Grease=7 / AppData=8numbering undisturbed. That is not the layout existing XMTP groups are persisted with. The follow-up replay PR restores the fork's persisted numbering (ImmutableMetadata=6, shiftingUnknown/Grease/AppDataup), re-adds the variant-index lock tests, the tolerant trailing-field deserialization, and the portableusize→u64encoding. Only that replay commit is safe to pin.Verification
Compiles clean: default features,
--features extensions-draft, and--tests --features extensions-draft,extensions-draft-test-dependencies.Note
Merge upstream openmls main into main, adding virtual clients, targeted messages, and PQ ciphersuite support
extensions-draft-08feature toextensions-draftacross all crates, CI workflows, and storage backends.virtual-clients-draftfeature enabling virtual MLS clients: deterministic reuse-guard derivation via FF1-AES128 PRP,DualUseRatchetfor own-message decryption, VC emulation epoch registration/derivation, and new storage APIs for emulation state, operation trees, and retained key material.targeted-messages-draftfeature with PSK-based HPKE encrypt/decrypt (hpke_open_psk,hpke_seal_psk_resolved_aad) andTargetedMessagewire format (value 6).draft-ietf-mls-pq-ciphersuitesfeature with ML-KEM 768/1024 KEMs, ML-DSA 44/65/87 signature schemes, and corresponding ciphersuite variants in both libcrux and RustCrypto providers.GuardedRngin favor of an HMAC-DRBG (SHA-256), and bumpstls_codecto 0.5 andrandto 0.10.UnresolvedAppDataCommitprocessing: commits withAppDataUpdateproposals are no longer staged immediately; callers must callstage_app_data_commitafter computing updates.serialization_helpersproc-macro crate providingSerialize/Deserializederives with explicit#[storage_tag]discriminants for non-self-describing formats, fixing storage-tag stability forCredentialType,ExtensionType,Extension,ProposalType, andProposal.PrivateMessageechoes now surface asProcessedMessageContent::OwnPrivateMessageinstead of returning a decryption error; own pending commits surface asOwnPendingCommit.ProcessedMessageContenthas new variants (OwnPendingCommit,OwnPrivateMessage,UnresolvedAppDataCommit) that all match arms must handle; storage serialization tag behavior changes for several enums when0-8-1-storage-formatis not set.Macroscope summarized 57367bb.