Repository navigation
DTLS 1.3: correct AEAD limits to match RFC 9147 - #11975
Open
julek-wolfssl wants to merge 1 commit into
Open
julek-wolfssl wants to merge 1 commit into
julek-wolfssl wants to merge 1 commit into
Conversation
DTLS_AEAD_AES_CCM_LIMIT, DTLS_AEAD_AES_GCM_CHACHA_FAIL_LIMIT and DTLS_AEAD_AES_CCM_8_FAIL_LIMIT were shifted one bit short, giving 2^22, 2^35 and 2^6 instead of 2^23, 2^36 and 2^7. Their key update limits stay at half the hard limit.
Contributor
There was a problem hiding this comment.
🟡 Changes recommended
The PR description incorrectly claims key-update limits are unchanged, although the GCM/ChaCha and CCM-8 thresholds now permit twice as many failed decryptions before requesting a key update.
1 open issue
What changed in this PR
Corrects three DTLS 1.3 AEAD limits in wolfSSL to match RFC 9147, addressing issue #11973.
Changes:
- Doubles the AES-CCM confidentiality limit and the GCM/ChaCha20-Poly1305 and CCM-8 integrity limits.
- Doubles the corresponding integrity key-update thresholds, keeping them at half the hard limits.
- Adds assertions for the corrected values and clarifies RFC references.
| File | Description |
|---|---|
wolfssl/internal.h |
Corrects AEAD limits, key-update thresholds, and explanatory comments. |
tests/api/test_tls13.c |
Adds regression assertions for the corrected limit macros. |
Review effort: Balanced
| #define DTLS_AEAD_AES_GCM_CHACHA_FAIL_LIMIT w64From32(1 << 3, 0) | ||
| #define DTLS_AEAD_AES_GCM_CHACHA_FAIL_KU_LIMIT w64From32(1 << 2, 0) | ||
| #define DTLS_AEAD_AES_GCM_CHACHA_FAIL_LIMIT w64From32(1 << 4, 0) | ||
| #define DTLS_AEAD_AES_GCM_CHACHA_FAIL_KU_LIMIT w64From32(1 << 3, 0) |
|
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.

DTLS_AEAD_AES_CCM_LIMIT,DTLS_AEAD_AES_GCM_CHACHA_FAIL_LIMITandDTLS_AEAD_AES_CCM_8_FAIL_LIMITwere each one bit too small, so they were half the values in RFC 9147.DTLS_AEAD_AES_CCM_LIMIT: 2^22 becomes 2^23DTLS_AEAD_AES_GCM_CHACHA_FAIL_LIMIT: 2^35 becomes 2^36DTLS_AEAD_AES_CCM_8_FAIL_LIMIT: 2^6 becomes 2^7The key update limits are unchanged and remain at half the hard limit.
Fixes #11973