Skip to content

Commit 8da6828

Browse files
mulmartaManevilleFMarta Mularczykglandiumtomleavy
authored
Key Package Generation / Join API 1.x (#226)
* Fix CI (#223) * feat(mls-rs): Verify the update path even in case of a self removal (#224) * Fix bug where double-hitting a ciphertext deleted the whole ratchet (#228) Co-authored-by: Marta Mularczyk <[email protected]> * Work around rust < 1.78 crash (#231) Somehow the DWARF info generated by the compiler for the `hash`-replacement assignment is confusing to LLVM, which crashes. By using a different form for the same operation, the compiler is happy. * Avoid intermediate Vec in TreeKemPublic::update_hashes (#230) [slice, slice].concat() creates an intermediate Vec, which can be avoided by chaining updated_leaves and trailing_blanks before the first Vec is created. * Add API for deleting exporters (#227) * Add API for deleting exporters * Apply suggestions from code review Co-authored-by: Stephane Raux <[email protected]> --------- Co-authored-by: Marta Mularczyk <[email protected]> Co-authored-by: Tom Leavy <[email protected]> Co-authored-by: Stephane Raux <[email protected]> * Key package generation 1.x * Fix clippy warnings * Initial implementation of group join 1.x * Add example for 1x API * Apply suggestions from code review * Add SigningData struct * Fixup * Add more tests * Fixup * Fixup --------- Co-authored-by: Félix Lescaudey de Maneville <[email protected]> Co-authored-by: Marta Mularczyk <[email protected]> Co-authored-by: Mike Hommey <[email protected]> Co-authored-by: Tom Leavy <[email protected]> Co-authored-by: Stephane Raux <[email protected]>
1 parent cb25022 commit 8da6828

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

51 files changed

+1230
-474
lines changed

.github/workflows/native_build.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,9 @@ jobs:
4343
run: cargo test --no-default-features --features std,test_util,non-fips --verbose --workspace
4444
- name: Examples
4545
working-directory: mls-rs
46-
run: cargo run --example basic_usage
46+
run: |
47+
cargo run --example basic_usage
48+
cargo run --example api_1x
4749
AsyncBuildAndTest:
4850
strategy:
4951
matrix:

mls-rs-codec/Cargo.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,10 +21,10 @@ thiserror = { version = "1.0.40", optional = true }
2121
assert_matches = "1.5.0"
2222

2323
[target.'cfg(target_arch = "wasm32")'.dev-dependencies]
24-
wasm-bindgen-test = { version = "0.3.26", default-features = false }
24+
wasm-bindgen-test = { version = "=0.3.26", default-features = false }
2525

2626
[target.'cfg(target_arch = "wasm32")'.dependencies]
27-
wasm-bindgen = { version = "0.2.79" }
27+
wasm-bindgen = { version = "=0.2.87" }
2828

2929
[lints.rust]
3030
unexpected_cfgs = { level = "warn", check-cfg = ['cfg(mls_build_async)'] }

mls-rs-codec/src/cow.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ use alloc::{
55

66
use crate::{Error, MlsDecode, MlsEncode, MlsSize};
77

8-
impl<'a, T> MlsSize for Cow<'a, T>
8+
impl<T> MlsSize for Cow<'_, T>
99
where
1010
T: MlsSize + ToOwned,
1111
{
@@ -14,7 +14,7 @@ where
1414
}
1515
}
1616

17-
impl<'a, T> MlsEncode for Cow<'a, T>
17+
impl<T> MlsEncode for Cow<'_, T>
1818
where
1919
T: MlsEncode + ToOwned,
2020
{
@@ -24,7 +24,7 @@ where
2424
}
2525
}
2626

27-
impl<'a, T> MlsDecode for Cow<'a, T>
27+
impl<T> MlsDecode for Cow<'_, T>
2828
where
2929
T: ToOwned,
3030
<T as ToOwned>::Owned: MlsDecode,

mls-rs-core/Cargo.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,10 +44,10 @@ async-trait = "0.1.74"
4444
assert_matches = "1.5.0"
4545

4646
[target.'cfg(target_arch = "wasm32")'.dev-dependencies]
47-
wasm-bindgen-test = { version = "0.3.26", default-features = false }
47+
wasm-bindgen-test = { version = "=0.3.26", default-features = false }
4848

4949
[target.'cfg(target_arch = "wasm32")'.dependencies]
50-
wasm-bindgen = { version = "^0.2.79" }
50+
wasm-bindgen = { version = "=0.2.87" }
5151

5252
[lints.rust]
5353
unexpected_cfgs = { level = "warn", check-cfg = ['cfg(mls_build_async)', 'cfg(coverage_nightly)'] }

mls-rs-core/src/identity.rs

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,17 @@ mod x509;
1212

1313
pub use basic::*;
1414
pub use credential::*;
15+
use mls_rs_codec::{MlsDecode, MlsEncode, MlsSize};
1516
pub use provider::*;
1617
pub use signing_identity::*;
1718

1819
#[cfg(feature = "x509")]
1920
pub use x509::*;
21+
22+
use crate::crypto::SignatureSecretKey;
23+
24+
#[derive(Clone, Debug, MlsEncode, MlsSize, MlsDecode, PartialEq)]
25+
pub struct SigningData {
26+
pub signing_identity: SigningIdentity,
27+
pub signing_key: SignatureSecretKey,
28+
}

mls-rs-core/src/identity/provider.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ pub enum MemberValidationContext<'a> {
2323
None,
2424
}
2525

26-
impl<'a> MemberValidationContext<'a> {
26+
impl MemberValidationContext<'_> {
2727
pub fn new_extensions(&self) -> Option<&ExtensionList> {
2828
match self {
2929
Self::ForCommit { new_extensions, .. } => Some(*new_extensions),

mls-rs-crypto-awslc/src/x509/component.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -374,7 +374,7 @@ pub struct X509ExtensionContext<'a> {
374374
pub(crate) phantom: PhantomData<&'a Certificate>,
375375
}
376376

377-
impl<'a> X509ExtensionContext<'a> {
377+
impl X509ExtensionContext<'_> {
378378
pub fn as_mut_ptr(&mut self) -> *mut X509V3_CTX {
379379
&mut self.inner
380380
}

mls-rs-crypto-hpke/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ hex = { version = "^0.4.3", features = ["serde"] }
3131
mls-rs-crypto-traits = { path = "../mls-rs-crypto-traits", features = ["mock"], version = "0.12.0" }
3232

3333
[target.'cfg(target_arch = "wasm32")'.dev-dependencies]
34-
wasm-bindgen-test = { version = "0.3.26", default-features = false }
34+
wasm-bindgen-test = { version = "=0.3.26", default-features = false }
3535
getrandom = { version = "0.2", features = ["js"] }
3636

3737
[target.'cfg(mls_build_async)'.dependencies]

mls-rs-crypto-rustcrypto/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ mls-rs-crypto-hpke = { path = "../mls-rs-crypto-hpke", default-features = false,
7777
async-trait = "0.1.74"
7878

7979
[target.'cfg(target_arch = "wasm32")'.dev-dependencies]
80-
wasm-bindgen-test = { version = "0.3.26", default-features = false }
80+
wasm-bindgen-test = { version = "=0.3.26", default-features = false }
8181

8282
[lints.rust]
8383
unexpected_cfgs = { level = "warn", check-cfg = ['cfg(mls_build_async)'] }

mls-rs-crypto-webcrypto/Cargo.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ zeroize = { version = "1", features = ["zeroize_derive"] }
1717
maybe-async = "0.2.10"
1818
async-trait = "0.1.74"
1919
js-sys = "0.3.64"
20-
wasm-bindgen = "0.2.87"
20+
wasm-bindgen = "=0.2.87"
2121
wasm-bindgen-futures = "0.4.37"
2222
serde-wasm-bindgen = "0.6"
2323
serde = { version = "1.0", features = ["derive"] }
@@ -27,7 +27,7 @@ const-oid = { version = "0.9", features = ["db"] }
2727

2828
[dev-dependencies]
2929
mls-rs-core = { path = "../mls-rs-core", version = "0.20.0", features = ["test_suite"] }
30-
wasm-bindgen-test = { version = "0.3.26", default-features = false }
30+
wasm-bindgen-test = { version = "=0.3.26", default-features = false }
3131
futures-test = "0.3.25"
3232
serde_json = "^1.0"
3333
hex = { version = "^0.4.3", features = ["serde"] }

0 commit comments

Comments
 (0)