-
Notifications
You must be signed in to change notification settings - Fork 42
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Move tree storage from vector to map. * Add tree slice logic * Add a flags extension * Add the ability for clients to join as light * Implement LightCommit more or less along the lines in the draft * Fix build errors after rebase * Add the ability for a light client to upgrade to being a full client * Add the ability to handle an AnnotatedCommit * Add the ability to generate annotated commits * Add an AnnotatedCommit test * Handle GroupContextExtensions and PSKs via proposals, not annotations * Optionally run passive client tests as a light client * Add DS utilities library * Use TreeFollower in light passive client tests * Update AnnotatedCommit to work with new commit structure * Enable light clients to process external joins * Properly ignore sender membership proofs in the external commit case * Revert in-Welcome sending of membership proofs * Add a test case that shows client fast-join behavior * Fix external commit test * Clean up AnnotatedWelcome API * Allow light clients to validate parent hashes * clang-tidy * clang-format * Revert changes to passive client test vector processing * Fix shadowing warnings on Windows * clang-format * Add missing mls_ds dependency * Fix windows build * Remove unneeded flags extension * Don't replicate proposals in the AnnotatedCommit * clang-format
- Loading branch information
1 parent
f977de9
commit 7ee4705
Showing
24 changed files
with
1,390 additions
and
71 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
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
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,4 +1,5 @@ | ||
add_subdirectory(bytes) | ||
add_subdirectory(hpke) | ||
add_subdirectory(tls_syntax) | ||
add_subdirectory(mls_ds) | ||
add_subdirectory(mls_vectors) |
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
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,38 @@ | ||
set(CURRENT_LIB_NAME mls_ds) | ||
|
||
### | ||
### Library Config | ||
### | ||
|
||
file(GLOB_RECURSE LIB_HEADERS CONFIGURE_DEPENDS "${CMAKE_CURRENT_SOURCE_DIR}/include/*.h") | ||
file(GLOB_RECURSE LIB_SOURCES CONFIGURE_DEPENDS "${CMAKE_CURRENT_SOURCE_DIR}/src/*.cpp") | ||
|
||
add_library(${CURRENT_LIB_NAME} ${LIB_HEADERS} ${LIB_SOURCES}) | ||
add_dependencies(${CURRENT_LIB_NAME} mlspp) | ||
target_link_libraries(${CURRENT_LIB_NAME} mlspp bytes tls_syntax) | ||
target_include_directories(${CURRENT_LIB_NAME} | ||
PUBLIC | ||
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include> | ||
$<BUILD_INTERFACE:${PROJECT_SOURCE_DIR}/include> | ||
$<INSTALL_INTERFACE:include/${PROJECT_NAME}> | ||
) | ||
|
||
### | ||
### Install | ||
### | ||
|
||
install(TARGETS ${CURRENT_LIB_NAME} EXPORT mlspp-targets) | ||
install( | ||
DIRECTORY | ||
include/ | ||
DESTINATION | ||
${CMAKE_INSTALL_INCLUDEDIR}/${PROJECT_NAME} | ||
) | ||
|
||
### | ||
### Tests | ||
### | ||
|
||
if (TESTING) | ||
add_subdirectory(test) | ||
endif() |
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,11 @@ | ||
# MLS Delivery Service Tools | ||
|
||
This library provides tools that can be convenient for an MLS Delivery Service | ||
(DS). We do not cover the actual delivery mechanics, but instead on more | ||
advanced functions where the DS needs to be aware of the internals of the MLS | ||
protocol. | ||
|
||
For example, it is sometimes useful for the DS to maintain a view of a group's | ||
ratchet tree based on seeing the group's Commits (sent as PublicMessage). To do | ||
this, the DS needs to parse commits and know how to apply them to the tree. | ||
The `TreeFollower` class provided in this library implements this functionality. |
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,33 @@ | ||
#pragma once | ||
|
||
#include <mls/messages.h> | ||
#include <mls/treekem.h> | ||
#include <vector> | ||
|
||
namespace MLS_NAMESPACE::mls_ds { | ||
|
||
using namespace MLS_NAMESPACE; | ||
|
||
class TreeFollower | ||
{ | ||
public: | ||
// Construct a one-member tree | ||
TreeFollower(const KeyPackage& key_package); | ||
|
||
// Import a tree as a starting point for future updates | ||
TreeFollower(TreeKEMPublicKey tree); | ||
|
||
// Update the tree with a set of proposals applied by a commit | ||
void update(const MLSMessage& commit_message, | ||
const std::vector<MLSMessage>& extra_proposals); | ||
|
||
// Accessors | ||
CipherSuite cipher_suite() const { return _suite; } | ||
const TreeKEMPublicKey& tree() const { return _tree; } | ||
|
||
private: | ||
CipherSuite _suite; | ||
TreeKEMPublicKey _tree; | ||
}; | ||
|
||
} // namespace MLS_NAMESPACE::mls_ds |
Oops, something went wrong.