Skip to content

Restrict DTLS 1.2 key exchange to P-256/P-384 (for now)#70

Merged
algesten merged 2 commits intomainfrom
fix/dtls12-kx-groups
Mar 1, 2026
Merged

Restrict DTLS 1.2 key exchange to P-256/P-384 (for now)#70
algesten merged 2 commits intomainfrom
fix/dtls12-kx-groups

Conversation

@algesten
Copy link
Owner

@algesten algesten commented Mar 1, 2026

Summary

  • Adding X25519 support for DTLS 1.3 (3222754) inadvertently exposed X25519 to DTLS 1.2 via the shared kx_groups field on CryptoProvider
  • Add supported_dtls12_kx_groups() filter that restricts to P-256/P-384 (the pre-3222754 set)
  • Use it in DTLS 1.2 SupportedGroupsExtension::from_provider(), init_ecdh_server(), and process_ecdh_params()

Discussed here: comment

Per RFC 8422, X25519 is a valid key exchange for TLS 1.2/DTLS 1.2, so it's worth supporting eventually. But I agree it should be done properly in a dedicated PR with full test coverage, not as a side effect of the DTLS 1.3 work.

@algesten algesten changed the title fix: restrict DTLS 1.2 key exchange to P-256/P-384 Restrict DTLS 1.2 key exchange to P-256/P-384 (for now) Mar 1, 2026
algesten added 2 commits March 1, 2026 15:59
Adding X25519 support for DTLS 1.3 inadvertently exposed it to DTLS 1.2
via the shared kx_groups field. Add supported_dtls12_kx_groups() filter
and use it in all DTLS 1.2 code paths.
@algesten algesten force-pushed the fix/dtls12-kx-groups branch from edd4dc2 to 18e11f9 Compare March 1, 2026 15:00
@algesten algesten merged commit dce1cfa into main Mar 1, 2026
44 checks passed
@algesten algesten deleted the fix/dtls12-kx-groups branch March 1, 2026 15:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants