Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Crypto Appendix - Restrictions on CCM8 #2413

Open
randomstuff opened this issue Nov 25, 2024 · 4 comments
Open

Crypto Appendix - Restrictions on CCM8 #2413

randomstuff opened this issue Nov 25, 2024 · 4 comments
Labels
1) Discussion ongoing Issue is opened and assigned but no clear proposal yet AppendixV Appendix with crypto details _5.0 - Not blocker This issue does not block 5.0 so if it gets addressed then great, if not then fine.

Comments

@randomstuff
Copy link
Contributor

randomstuff commented Nov 25, 2024

CCM8 is currently listed as approved in the crypto appendix (a previous version had this text: “CCM-8 is included in regard to TLS cipher suite”).

CCM8 use a 64 bit MAC which is quite weak. It's supposed to be OK when used for TLS but it's not OK but not for other protocols in general:

An 8-byte (64-bit) tag would be uncomfortably small in situations where the attacker can brute-force all possible tags. However, when the tag is used for TLS communication, if the attacker makes a wrong guess for the tag, the receiver will immediately close the connection, so each guess requires a new connection. This makes brute force very expensive.

This is not allowed in DTLS without additional safeguard.

RFC9147 (DTLS 1.3):

The AEAD_AES_128_CCM_8 AEAD, as used in TLS_AES_128_CCM_8_SHA256, does not have a limit on the number of records that fail authentication that both limits the probability of forgery by the same amount and does not expose implementations to the risk of denial of service; see Appendix B.3. Therefore, TLS_AES_128_CCM_8_SHA256 MUST NOT be used in DTLS without additional safeguards against forgery. Implementations MUST set usage limits for AEAD_AES_128_CCM_8 based on an understanding of any additional forgery protections that are used.

QUIC:

QUIC can use any of the cipher suites defined in [TLS13] with the exception of TLS_AES_128_CCM_8_SHA256. A cipher suite MUST NOT be negotiated unless a header protection scheme is defined for the cipher suite.

I suggest, to add a note:

** CCM-8 is only approved when using with TLS and must not be used with other protocols (including DTLS or QUIC).

Additional questions:

  • Do not allow it for L3?
  • Do not allow it at all? Is relevant anyway? Mozilla SSL configuration generator does not list any CCM (not CCM-8) ciphersuite in any configuration (event in "old" mode).
@tghosth tghosth added 1) Discussion ongoing Issue is opened and assigned but no clear proposal yet AppendixV Appendix with crypto details labels Dec 2, 2024
@randomstuff
Copy link
Contributor Author

Tweaked formulation:

** CCM-8 is only approved when using with TLS and must in general not be used with other protocols (including DTLS or QUIC).

@tghosth tghosth added _5.0 - prep This needs to be addressed to prepare 5.0 _5.0 - Not blocker This issue does not block 5.0 so if it gets addressed then great, if not then fine. and removed _5.0 - prep This needs to be addressed to prepare 5.0 labels Dec 4, 2024
@randomstuff
Copy link
Contributor Author

ping @danielcuthbert

@unprovable
Copy link

Tweaked formulation:

** CCM-8 is only approved when using with TLS and must in general not be used with other protocols (including DTLS or QUIC).

This reads like a much better version! Yeah, you're right, it was just included for TLS because of its ubiquity and the need to require to order all ciphersuites in some situations. This should serve as a way to know to put it at the bottom of the list, so this disclaimer is entirely appropriate!

@randomstuff
Copy link
Contributor Author

randomstuff commented Dec 10, 2024

Some context/references (as far as I understand them) below.

CCM-8 uses a (truncated/small) 64-bit MAC tag. If the receiver receives more than 2^7=128 forged packets, it would give a significant advantage to the attacker.

In TLS, the connection is dropped in case of forged packets so v<=1 (but the tag is still comparatively small which might be an issue).

In DTLS (and QUIC?), this is not the case. DTLS is expected to be resilient to invalid (and forged) records and therefore:

Specifically, TLS_AES_128_CCM_8_SHA256 cannot be used [in DTLS] without additional measures to prevent forgery of records, or to mitigate the effect of forgeries.

I'm wondering if some reference would be useful in the note to motivate the restriction.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
1) Discussion ongoing Issue is opened and assigned but no clear proposal yet AppendixV Appendix with crypto details _5.0 - Not blocker This issue does not block 5.0 so if it gets addressed then great, if not then fine.
Projects
None yet
Development

No branches or pull requests

3 participants