Repository navigation
feat: early detection of ciphersuite support - #2109
Merged
Merged
Conversation
raphaelrobert
marked this pull request as ready for review
July 13, 2026 09:43
# Conflicts: # openmls/src/key_packages/mod.rs
This was referenced Sep 2, 2026
mtrossbach
added a commit
to SchwarzDigits/openmls
that referenced
this pull request
Sep 2, 2026
KeyPackageIn::validate verified the leaf node and key package signatures with the signature scheme of the key package's ciphersuite, without first asking the crypto provider whether it supports that ciphersuite. When it does not, signature verification fails for the wrong reason and the caller gets InvalidLeafNodeSignature for a key package whose signature is valid. With the libcrux provider, which only handles Ed25519, that is every P-256 key package. Group creation, StagedWelcome and the external commit builder got a supports() check and an UnsupportedCiphersuite error in openmls#2109. validate is another public entry point that takes a ciphersuite from the wire and did not. This adds the check as the first step, with a matching KeyPackageVerifyError::UnsupportedCiphersuite variant, and a test with the RestrictedProvider that fails without it. Two smaller things in the same area: AddProposalIn::validate now compares the key package's ciphersuite with the group's before running the full key package validation instead of after, and a test pins down that a GREASE value in a KeyPackage's own ciphersuite field fails to deserialize.
mtrossbach
added a commit
to SchwarzDigits/openmls
that referenced
this pull request
Sep 2, 2026
KeyPackageIn::validate verified the leaf node and key package signatures with the signature scheme of the key package's ciphersuite, without first asking the crypto provider whether it supports that ciphersuite. When it does not, signature verification fails for the wrong reason and the caller gets InvalidLeafNodeSignature for a key package whose signature is valid. With the libcrux provider, which only handles Ed25519, that is every P-256 key package. Group creation, StagedWelcome and the external commit builder got a supports() check and an UnsupportedCiphersuite error in openmls#2109. validate is another public entry point that takes a ciphersuite from the wire and did not. This adds the check as the first step, with a matching KeyPackageVerifyError::UnsupportedCiphersuite variant, and a test with the RestrictedProvider that fails without it. Two smaller things in the same area: AddProposalIn::validate now compares the key package's ciphersuite with the group's before running the full key package validation instead of after, and a test pins down that a GREASE value in a KeyPackage's own ciphersuite field fails to deserialize.
kkohbrok
added a commit
that referenced
this pull request
Oct 5, 2026
KeyPackageIn::validate verified the leaf node and key package signatures with the signature scheme of the key package's ciphersuite, without first asking the crypto provider whether it supports that ciphersuite. When it does not, signature verification fails for the wrong reason and the caller gets InvalidLeafNodeSignature for a key package whose signature is valid. With the libcrux provider, which only handles Ed25519, that is every P-256 key package. Group creation, StagedWelcome and the external commit builder got a supports() check and an UnsupportedCiphersuite error in #2109. validate is another public entry point that takes a ciphersuite from the wire and did not. This adds the check as the first step, with a matching KeyPackageVerifyError::UnsupportedCiphersuite variant, and a test with the RestrictedProvider that fails without it. Two smaller things in the same area: AddProposalIn::validate now compares the key package's ciphersuite with the group's before running the full key package validation instead of after, and a test pins down that a GREASE value in a KeyPackage's own ciphersuite field fails to deserialize. Co-authored-by: Konrad Kohbrok <[email protected]>
MicroDroid
pushed a commit
to MicroDroid/openmls
that referenced
this pull request
Nov 17, 2026
KeyPackageIn::validate verified the leaf node and key package signatures with the signature scheme of the key package's ciphersuite, without first asking the crypto provider whether it supports that ciphersuite. When it does not, signature verification fails for the wrong reason and the caller gets InvalidLeafNodeSignature for a key package whose signature is valid. With the libcrux provider, which only handles Ed25519, that is every P-256 key package. Group creation, StagedWelcome and the external commit builder got a supports() check and an UnsupportedCiphersuite error in openmls#2109. validate is another public entry point that takes a ciphersuite from the wire and did not. This adds the check as the first step, with a matching KeyPackageVerifyError::UnsupportedCiphersuite variant, and a test with the RestrictedProvider that fails without it. Two smaller things in the same area: AddProposalIn::validate now compares the key package's ciphersuite with the group's before running the full key package validation instead of after, and a test pins down that a GREASE value in a KeyPackage's own ciphersuite field fails to deserialize. Co-authored-by: Konrad Kohbrok <[email protected]>
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
We want the crypto provider to be authoritative about which ciphersuites are supported in the future. This PR starts by introducing early detection of ciphersuite support with the existing functions the crypto provider already exposes.
We now fail earlier than before, in case a ciphersuite is not supported, and the error messages are harmonized.
This PR introduces breaking changes as far as error variants are concerned.