Skip to content

Commit

Permalink
Merge remote-tracking branch 'upstream/main' into nm/merge-upstream-o…
Browse files Browse the repository at this point in the history
…ctober-4
  • Loading branch information
neekolas committed Oct 4, 2024
2 parents 1f01177 + 8c9bfa4 commit 9bc9756
Show file tree
Hide file tree
Showing 78 changed files with 2,764 additions and 3,413 deletions.
2 changes: 1 addition & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## 0.6.0-pre.2 (2024-08-XX)
## 0.6.0 (2024-09-04)

### Added

Expand Down
2 changes: 1 addition & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ These are mostly guidelines, not rules.
Use your best judgement, and feel free to propose changes to this document in a pull request.
The processes described here is not to pester you but to increase and maintain code quality.

Before contributing, please read the [Code of Conduct](https://github.com/openmls/openmls/CODE_OF_CONDUCT.md) carefully.
Before contributing, please read the [Code of Conduct](CODE_OF_CONDUCT.md) carefully.

#### Table Of Contents

Expand Down
4 changes: 2 additions & 2 deletions Developer.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,5 +35,5 @@ You can start by looking at the [open issues](https://github.com/openmls/openmls

OpenMLS adheres to the [Contributor Covenant](https://www.contributor-covenant.org/) Code of Coduct. Please read the [Code of Conduct](https://github.com/openmls/openmls/tree/main/CODE_OF_CONDUCT.md) carefully.

[book-main-link]: https://openmls.tech/openmls/book
[docs-main-link]: https://openmls.tech/openmls/doc/openmls/index.html
[book-main-link]: https://latest.openmls.tech/book
[docs-main-link]: https://latest.openmls.tech/doc/openmls/index.html
8 changes: 2 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,14 @@
[![OpenMLS List][list-image]][list-link]

[![Tests & Checks][gh-tests-image]](https://github.com/openmls/openmls/actions/workflows/tests.yml?branch=main)
<!-- Disabled until the drone CI is fixed in #1094 [![ARM64 Build Status][drone-image]](https://cloud.drone.io/openmls/openmls) -->
[![codecov][codecov-image]](https://codecov.io/gh/openmls/openmls)

[![Docs][docs-release-badge]][docs-release-link]
[![Book][book-release-badge]][book-release-link]
![Rust Version][rustc-image]

*OpenMLS* is a Rust implementation of the Messaging Layer Security (MLS) protocol, as specified in [RFC 9420](https://datatracker.ietf.org/doc/html/rfc9420).
<!-- The introduction of the book imports the lines up until here (line 14), excluding the headline and separately the lines below (starting from line 20). If the line numbers change here, please modify the imported lines in the book.-->
<!-- The introduction of the book imports the lines up until here (line 13), excluding the headline and separately the lines below (starting from line 19, "Supported ciphersuite"). If the line numbers change here, please modify the imported lines in the book.-->

It is a software library that can serve as a building block in applications that require end-to-end encryption of messages.
It has a safe and easy-to-use interface that hides the complexity of the underlying cryptographic operations.
Expand All @@ -33,9 +32,6 @@ OpenMLS is built and tested on the Github CI for the following rust targets.
- i686-pc-windows-msvc
- x86_64-apple-darwin

<!-- Disabled until #1094 is fixed. Additionally, we're building and testing aarch64-unknown-linux-gnu on
[drone.io](https://cloud.drone.io/openmls/openmls). -->

### Unsupported, but built on CI

The Github CI also builds (but doesn't test) the following rust targets.
Expand Down Expand Up @@ -78,7 +74,7 @@ OpenMLS is maintained and developed by [Phoenix R&D] and [Cryspen].
[docs-release-badge]: https://img.shields.io/badge/docs-release-blue.svg?style=for-the-badge
[docs-release-link]: https://docs.rs/crate/openmls/latest
[book-release-badge]: https://img.shields.io/badge/book-release-blue.svg?style=for-the-badge
[book-release-link]: https://openmls.tech/book
[book-release-link]: https://book.openmls.tech
[drone-image]: https://img.shields.io/drone/build/openmls/openmls/main?label=ARM64%20Build%20Status&logo=drone&style=for-the-badge
[codecov-image]: https://img.shields.io/codecov/c/github/openmls/openmls/main?logo=codecov&style=for-the-badge
[gh-tests-image]: https://img.shields.io/github/actions/workflow/status/openmls/openmls/tests.yml?branch=main&style=for-the-badge&logo=github
Expand Down
8 changes: 4 additions & 4 deletions basic_credential/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "openmls_basic_credential"
version = "0.3.0-pre.1"
version = "0.3.0"
authors = ["OpenMLS Authors"]
edition = "2021"
description = "A Basic Credential implementation for OpenMLS"
Expand All @@ -10,7 +10,7 @@ repository = "https://github.com/openmls/openmls/tree/main/basic_credential"
readme = "README.md"

[dependencies]
openmls_traits = { version = "0.3.0-pre.2", path = "../traits" }
openmls_traits = { version = "0.3.0", path = "../traits" }
tls_codec = { workspace = true }
serde = "1.0"

Expand All @@ -20,5 +20,5 @@ p256 = { version = "0.13" }
rand = "0.8"

[features]
clonable = [] # Make the keys clonable
test-utils = [] # Only use for tests!
clonable = [] # Make the keys clonable
test-utils = [] # Only use for tests!
4 changes: 2 additions & 2 deletions book/src/introduction.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,11 @@

<!-- Get the Readme without the headline until (including) the introductory sentence -->

{{#include ../../README.md:2:14}}
{{#include ../../README.md:2:13}}
OpenMLS provides a high-level API to create and manage MLS groups. It supports basic ciphersuites and an interchangeable cryptographic provider, key store, and random number generator.

This book provides guidance on using OpenMLS and its `MlsGroup` API to perform basic group operations, illustrated with examples.

<!-- Get the rest of the Readme -->

{{#include ../../README.md:20:}}
{{#include ../../README.md:19:}}
2 changes: 1 addition & 1 deletion cli/src/openmls_rust_persistent_crypto.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
//! # OpenMLS Default Crypto Provider
//!
//! This is an implementation of the [`OpenMlsCryptoProvider`] trait to use with
//! This is an implementation of the [`OpenMlsProvider`] trait to use with
//! OpenMLS.

use openmls_rust_crypto::{MemoryStorage, RustCrypto};
Expand Down
1 change: 1 addition & 0 deletions delivery-service/ds/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ serde = { version = "1.0", features = ["derive"] }
uuid = { version = "1", features = ["serde", "v4"] }
clap = "4"
base64 = "0.13"
time = ">=0.3.36"

openmls = { path = "../../openmls", features = ["test-utils"] }

Expand Down
6 changes: 3 additions & 3 deletions libcrux_crypto/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "openmls_libcrux_crypto"
version = "0.1.0-pre.2"
version = "0.1.0"
edition = "2021"
authors = ["OpenMLS Authors"]
description = "A crypto backend for OpenMLS based on libcrux implementing openmls_traits."
Expand All @@ -12,7 +12,7 @@ readme = "../README.md"
[dependencies]
getrandom = "0.2.12"
libcrux = { version = "=0.0.2-alpha.3", features = ["rand"] }
openmls_traits = { version = "0.3.0-pre.2", path = "../traits" }
openmls_memory_storage = { version = "0.3.0-pre.2", path = "../memory_storage" }
openmls_traits = { version = "0.3.0", path = "../traits" }
openmls_memory_storage = { version = "0.3.0", path = "../memory_storage" }
rand = "0.8.5"
tls_codec.workspace = true
4 changes: 2 additions & 2 deletions memory_storage/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[package]
name = "openmls_memory_storage"
authors = ["OpenMLS Authors"]
version = "0.3.0-pre.2"
version = "0.3.0"
edition = "2021"
description = "A very basic storage for OpenMLS implementing openmls_traits."
license = "MIT"
Expand All @@ -10,7 +10,7 @@ repository = "https://github.com/openmls/openmls/tree/main/memory_storage"
readme = "README.md"

[dependencies]
openmls_traits = { version = "0.3.0-pre.2", path = "../traits" }
openmls_traits = { version = "0.3.0", path = "../traits" }
thiserror = "1.0"
serde_json = "1.0"
serde = { version = "1.0", features = ["derive"] }
Expand Down
10 changes: 4 additions & 6 deletions memory_storage/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -262,18 +262,16 @@ const GROUP_CONTEXT_LABEL: &[u8] = b"GroupContext";
const INTERIM_TRANSCRIPT_HASH_LABEL: &[u8] = b"InterimTranscriptHash";
const CONFIRMATION_TAG_LABEL: &[u8] = b"ConfirmationTag";

// related to CoreGroup
const OWN_LEAF_NODE_INDEX_LABEL: &[u8] = b"OwnLeafNodeIndex";
const EPOCH_SECRETS_LABEL: &[u8] = b"EpochSecrets";
const RESUMPTION_PSK_STORE_LABEL: &[u8] = b"ResumptionPsk";
const MESSAGE_SECRETS_LABEL: &[u8] = b"MessageSecrets";

// related to MlsGroup
const JOIN_CONFIG_LABEL: &[u8] = b"MlsGroupJoinConfig";
const OWN_LEAF_NODES_LABEL: &[u8] = b"OwnLeafNodes";
const GROUP_STATE_LABEL: &[u8] = b"GroupState";
const QUEUED_PROPOSAL_LABEL: &[u8] = b"QueuedProposal";
const PROPOSAL_QUEUE_REFS_LABEL: &[u8] = b"ProposalQueueRefs";
const OWN_LEAF_NODE_INDEX_LABEL: &[u8] = b"OwnLeafNodeIndex";
const EPOCH_SECRETS_LABEL: &[u8] = b"EpochSecrets";
const RESUMPTION_PSK_STORE_LABEL: &[u8] = b"ResumptionPsk";
const MESSAGE_SECRETS_LABEL: &[u8] = b"MessageSecrets";

impl StorageProvider<CURRENT_VERSION> for MemoryStorage {
type Error = MemoryStorageError;
Expand Down
16 changes: 8 additions & 8 deletions openmls/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "openmls"
version = "0.6.0-pre.2"
version = "0.6.0"
authors = ["OpenMLS Authors"]
edition = "2021"
description = "A Rust implementation of the Messaging Layer Security (MLS) protocol, as defined in RFC 9420."
Expand All @@ -12,17 +12,17 @@ keywords = ["MLS", "IETF", "RFC9420", "Encryption", "E2EE"]
exclude = ["/test_vectors"]

[dependencies]
openmls_traits = { version = "0.3.0-pre.2", path = "../traits" }
openmls_rust_crypto = { version = "0.3.0-pre.1", path = "../openmls_rust_crypto", optional = true }
openmls_basic_credential = { version = "0.3.0-pre.1", path = "../basic_credential", optional = true, features = [
openmls_traits = { version = "0.3.0", path = "../traits" }
openmls_rust_crypto = { version = "0.3.0", path = "../openmls_rust_crypto", optional = true }
openmls_basic_credential = { version = "0.3.0", path = "../basic_credential", optional = true, features = [
"clonable",
"test-utils",
] }
openmls_memory_storage = { version = "0.3.0-pre.2", path = "../memory_storage", features = [
openmls_memory_storage = { version = "0.3.0", path = "../memory_storage", features = [
"test-utils",
], optional = true }
openmls_test = { version = "0.1.0-pre.1", path = "../openmls_test", optional = true }
openmls_libcrux_crypto = { version = "0.1.0-pre.2", path = "../libcrux_crypto", optional = true }
openmls_test = { version = "0.1.0", path = "../openmls_test", optional = true }
openmls_libcrux_crypto = { version = "0.1.0", path = "../libcrux_crypto", optional = true }
serde = { version = "^1.0", features = ["derive"] }
log = { version = "0.4", features = ["std"] }
tls_codec = { workspace = true }
Expand Down Expand Up @@ -70,7 +70,7 @@ criterion = { version = "^0.5", default-features = false } # need to disable def
hex = { version = "0.4", features = ["serde"] }
itertools = "0.10"
lazy_static = "1.4"
openmls_traits = { version = "0.3.0-pre.2", path = "../traits", features = [
openmls_traits = { version = "0.3.0", path = "../traits", features = [
"test-utils",
] }
pretty_env_logger = "0.5"
Expand Down
4 changes: 2 additions & 2 deletions openmls/src/ciphersuite/signable.rs
Original file line number Diff line number Diff line change
Expand Up @@ -131,12 +131,12 @@ pub trait Verifiable: Sized {
pk: &OpenMlsSignaturePublicKey,
) -> Result<Self::VerifiedStruct, SignatureError>;

/// Verifies the payload against the given `credential`.
/// Verifies the payload against the given public key.
/// The signature is fetched via the [`Verifiable::signature()`] function and
/// the payload via [`Verifiable::unsigned_payload()`].
///
/// Returns `Ok(())` if the signature is valid and
/// `CredentialError::InvalidSignature` otherwise.
/// [`SignatureError::VerificationError`] otherwise.
fn verify_no_out(
&self,
crypto: &impl OpenMlsCrypto,
Expand Down
8 changes: 3 additions & 5 deletions openmls/src/framing/validation.rs
Original file line number Diff line number Diff line change
Expand Up @@ -24,16 +24,14 @@
// TODO #106/#151: Update the above diagram

use openmls_traits::{crypto::OpenMlsCrypto, types::Ciphersuite};
use proposal_store::QueuedProposal;

use crate::{
binary_tree::LeafNodeIndex,
ciphersuite::signable::Verifiable,
error::LibraryError,
extensions::ExternalSendersExtension,
group::{
core_group::{proposals::QueuedProposal, staged_commit::StagedCommit},
errors::ValidationError,
},
group::{errors::ValidationError, mls_group::staged_commit::StagedCommit},
tree::sender_ratchet::SenderRatchetConfiguration,
treesync::TreeSync,
versions::ProtocolVersion,
Expand Down Expand Up @@ -96,7 +94,7 @@ impl DecryptedMessage {
pub(crate) fn from_inbound_ciphertext(
ciphertext: PrivateMessageIn,
crypto: &impl OpenMlsCrypto,
group: &mut CoreGroup,
group: &mut MlsGroup,
sender_ratchet_configuration: &SenderRatchetConfiguration,
) -> Result<Self, ValidationError> {
// This will be refactored with #265.
Expand Down
95 changes: 0 additions & 95 deletions openmls/src/group/core_group/create_commit_params.rs

This file was deleted.

Loading

0 comments on commit 9bc9756

Please sign in to comment.