Skip to content

feat: early detection of ciphersuite support - #2109

Merged
raphaelrobert merged 4 commits into
mainfrom
raphael/ciphersuite-support-checks
Jul 14, 2026
Merged

raphaelrobert merged 4 commits into
mainfrom
raphael/ciphersuite-support-checks

Conversation

@raphaelrobert

Copy link
Copy Markdown
Member

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.

@raphaelrobert
raphaelrobert marked this pull request as ready for review July 13, 2026 09:43
@raphaelrobert
raphaelrobert requested a review from a team as a code owner July 13, 2026 09:43

@kkohbrok kkohbrok left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍🏻

# Conflicts:
#	openmls/src/key_packages/mod.rs
@raphaelrobert
raphaelrobert merged commit 9bb9403 into main Jul 14, 2026
41 checks passed
@raphaelrobert
raphaelrobert deleted the raphael/ciphersuite-support-checks branch July 14, 2026 16:45
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]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

2 participants