You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
// Make a group state store that conforms to the GroupStateStorage traitlet group_state_store = MyGroupStateStore::new();let client = Client::builder().group_state_storage(group_state_store)// Transfer the ownership of the group state storage
.....build();// ..... load and use a chat
chat.write_to_storage().unwrap();
In the above, write_to_storage first calls GroupStateStorage::write with the current GroupState along along with a set of updates to prior epoch data. Updates to prior epoch data include either overwriting secret tree data used for message decryption or completely deleting cached epoch data to lock in forward secrecy.
After (1.x)
Export State Update API
Instead of calling various storage interfaces internally, the export_state_update function will output a full copy of a Group's public and secret information, along with any prior epoch data that has been modified since the last time export_state_update has been called.
Calling export_state_update clears all prior epoch data in order to reduce memory footprint within mls-rs
// New write to storage interfacepubfnexport_state_update() -> Result<GroupStateUpdate,MlsError>;// GroupStateUpdate definitionpubstructGroupStateUpdate{pubstate:GroupState,// Should expose the properties of internal Snapshot struct in a sane waypubpast_epoch_data:Vec<EpochRecord>,// Should expose non-secret values of PriorEpoch in some way}
The text was updated successfully, but these errors were encountered:
tomleavy
changed the title
[WIP] [1.x] Replace write_to_storage with group_state
[WIP] [1.x] Replace write_to_storage with export_state_update Nov 11, 2024
tomleavy
changed the title
[WIP] [1.x] Replace write_to_storage with export_state_update
[1.x] Replace write_to_storage with export_state_update Nov 20, 2024
Background
Part of #211
Before (0.x)
In the above,
write_to_storage
first calls GroupStateStorage::write with the currentGroupState
along along with a set of updates to prior epoch data. Updates to prior epoch data include either overwriting secret tree data used for message decryption or completely deleting cached epoch data to lock in forward secrecy.After (1.x)
Export State Update API
Instead of calling various storage interfaces internally, the
export_state_update
function will output a full copy of a Group's public and secret information, along with any prior epoch data that has been modified since the last timeexport_state_update
has been called.Calling
export_state_update
clears all prior epoch data in order to reduce memory footprint within mls-rsThe text was updated successfully, but these errors were encountered: