Skip to content

Commit

Permalink
more comments
Browse files Browse the repository at this point in the history
  • Loading branch information
keks committed Oct 16, 2024
1 parent 6276c05 commit 022efbb
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 1 deletion.
2 changes: 2 additions & 0 deletions openmls/src/group/mls_group/processing.rs
Original file line number Diff line number Diff line change
Expand Up @@ -270,6 +270,7 @@ impl MlsGroup {
// Checks the following semantic validation:
// - ValSem010
// - ValSem246 (as part of ValSem010)
// - https://validation.openmls.tech/#valn1203
let (content, credential) =
unverified_message.verify(self.ciphersuite(), provider.crypto(), self.version())?;

Expand Down Expand Up @@ -361,6 +362,7 @@ impl MlsGroup {
/// - ValSem003
/// - ValSem006
/// - ValSem007 MembershipTag presence
/// - https://validation.openmls.tech/#valn1202
pub(crate) fn decrypt_message(
&mut self,
crypto: &impl OpenMlsCrypto,
Expand Down
1 change: 1 addition & 0 deletions openmls/src/group/public_group/process.rs
Original file line number Diff line number Diff line change
Expand Up @@ -200,6 +200,7 @@ impl PublicGroup {
// Checks the following semantic validation:
// - ValSem010
// - ValSem246 (as part of ValSem010)
// - https://validation.openmls.tech/#valn1203
let (content, credential) =
unverified_message.verify(self.ciphersuite(), crypto, self.version())?;

Expand Down
5 changes: 4 additions & 1 deletion openmls/src/group/public_group/staged_commit.rs
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@ impl PublicGroup {
let ciphersuite = self.ciphersuite();

// Verify epoch
// https://validation.openmls.tech/#valn1201
if mls_content.epoch() != self.group_context().epoch() {
log::error!(
"Epoch mismatch. Got {:?}, expected {:?}",
Expand Down Expand Up @@ -99,7 +100,8 @@ impl PublicGroup {
self.validate_leaf_node(update_path.leaf_node())?;
}

// Validate the staged proposals by doing the following checks:
// Validate the staged proposals. This implements https://validation.openmls.tech/#valn1204.
// This is done by doing the following checks:

// ValSem101
// ValSem102
Expand Down Expand Up @@ -247,6 +249,7 @@ impl PublicGroup {
diff.apply_received_update_path(crypto, ciphersuite, sender_index, update_path)?;
} else if apply_proposals_values.path_required {
// ValSem201
// https://validation.openmls.tech/#valn1206
return Err(StageCommitError::RequiredPathNotFound);
};

Expand Down
1 change: 1 addition & 0 deletions openmls/src/treesync/treekem.rs
Original file line number Diff line number Diff line change
Expand Up @@ -408,6 +408,7 @@ impl UpdatePathIn {
let leaf_node_in = self.leaf_node().clone();
let verifiable_leaf_node = leaf_node_in.into_verifiable_leaf_node();
match verifiable_leaf_node {
// https://validation.openmls.tech/#valn1208
VerifiableLeafNode::Commit(mut commit_leaf_node) => {
let pk = &commit_leaf_node
.signature_key()
Expand Down

0 comments on commit 022efbb

Please sign in to comment.