Skip to content

Conversation

@erskingardner
Copy link
Contributor

This PR implements GREASE (Generate Random Extensions And Sustain Extensibility) support as defined in RFC 9420 Section 13.5. GREASE injects reserved values (0x0A0A, 0x1A1A, etc.) to ensure implementations handle unknown values correctly and maintain forward compatibility.

Key Changes

  • Added Grease(u16) variants to ProposalType, ExtensionType, and CredentialType enums
  • Implemented is_grease() methods for all GREASE-capable types including VerifiableCiphersuite
  • GREASE values are now automatically injected into all KeyPackages and MlsGroups, regardless of whether custom or default capabilities are used
  • At least one GREASE value is added to each capability list (ciphersuites, extensions, proposals, credentials) unless already present
  • GREASE values are recognized during deserialization and filtered during validation
  • Members with different GREASE values can interoperate seamlessly

Testing & Documentation

  • Added integration tests covering GREASE scenarios
  • Updated existing tests to filter GREASE values when comparing capabilities
  • Added user manual documentation with usage examples at book/src/user_manual/grease.md
  • Updated CHANGELOG.md

Copy link
Contributor

@franziskuskiefer franziskuskiefer left a comment

Choose a reason for hiding this comment

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

Just leaving a request changes here to reflect the discussion on Zulip.

@erskingardner erskingardner changed the title Add injection and handling for GREASE values Add handling and helpers for GREASE values Nov 28, 2025
@erskingardner
Copy link
Contributor Author

@franziskuskiefer any chance you can have a look here to see if the changes I've made are more in line with what we talked about?

…ndom GREASE values into capabilities. Update documentation to clarify GREASE handling and ensure users opt-in for GREASE value inclusion. Adjust tests to reflect changes in GREASE injection behavior.
Copy link
Contributor

@franziskuskiefer franziskuskiefer left a comment

Choose a reason for hiding this comment

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

Happy new year 🍾

Thanks for the changes. lgtm now with two nits.

- [#1868](https://github.com/openmls/openmls/pull/1868): Implemented AppEphemeral functionality as defined in the MLS Extensions draft and replaced the existing AppAck proposal with the AppAck object, which can now be conveyed inside an AppEphemeral proposal. These features are behind the `extensions-draft-08` feature flag.
- [#1874](https://github.com/openmls/openmls/pull/1874): In the `openmls_libcrux_crypto` provider, added AES-GCM support.
- Implemented GREASE (Generate Random Extensions And Sustain Extensibility) support as defined in [RFC 9420 Section 13.5](https://www.rfc-editor.org/rfc/rfc9420.html#section-13.5):
- Added `Grease(u16)` variants to `ProposalType`, `ExtensionType`, and `CredentialType` enums
Copy link
Contributor

Choose a reason for hiding this comment

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

These are actually changes to existing enums. So this should also get mentioned in the Changed section.

1. **Test extensibility**: Ensure implementations don't reject messages containing unknown values
2. **Prevent ossification**: Help maintain forward compatibility by exercising unknown value handling paths
3. **Identify bugs**: Catch implementations that incorrectly assume all possible values are known

Copy link
Contributor

Choose a reason for hiding this comment

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

I think we need to make clear here that there are

  • the grease values defined in the RFC. And when not using a manually defined value, that's what's being used by OpenMLS. Also any check like is_grease() is only defined for these values.
  • any other grease value. For these we can't distinguish whether they are supposed to be grease values or just unknown IDs.

But since the entire point of grease values is NOT to check for them. We need to make sure that it's clear that this is not how they should be used.
But instead that this allows applications to inject grease values to discourage other implementations from failing on unknown values and hard coding too many things.

There's some more text about this further down. Maybe linking there would be ok as well.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: No status

Development

Successfully merging this pull request may close these issues.

2 participants