GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — tls: reduce the security strength of the CCM8 cipher suites by paulidale · Pull Request #16652 · openssl/openssl

Conversation

@paulidale

@paulidale paulidale commented Sep 22, 2021

Copy link
Copy Markdown
Contributor

Alternative to #16160

CCM8 suites have a 64 bit authentication tag which is pretty short.

The changes reduces these cipher suites to security levels below 2.

Fixes #16154

  • documentation is added or updated
  • tests are added or updated

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@paulidale paulidale added branch: master Applies to master branch approval: review pending This pull request needs review by a committer triaged: feature The issue/pr requests/adds a feature labels Sep 22, 2021
@paulidale paulidale self-assigned this Sep 22, 2021
@paulidale
paulidale requested a review from mattcaswell September 22, 2021 00:35
@paulidale paulidale changed the title Ccm8 table tls: reduce the security strength of the CCM8 cipher suites Sep 22, 2021
@kaduk

kaduk commented Sep 22, 2021

Copy link
Copy Markdown
Contributor

Is there a mechanism behind picking "80" or just expedience for having it produce the right outcome?
(The geometric mean of 64 and 128 is roughly 90, FWIW...)

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@slontis

slontis commented Sep 22, 2021

Copy link
Copy Markdown
Member

Is there a mechanism behind picking "80" or just expedience for having it produce the right outcome?
(The geometric mean of 64 and 128 is roughly 90, FWIW...)

ssl_security_default_callback() calls ssl_get_security_level_bits() which has a minbits table.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

slontis added a commit to slontis/openssl that referenced this pull request Sep 22, 2021
@slontis
Change TLS RC4 cipher strength check to be data driven.
370beed
This is a same pattern as used in PR openssl#16652
@slontis slontis mentioned this pull request Sep 22, 2021
Change TLS RC4 cipher strength check to be data driven. #16656
Closed
2 tasks
@paulidale

paulidale commented Sep 22, 2021

Copy link
Copy Markdown
Contributor Author

I picked the value we use for everything else that is security level 1. As far as I can tell, we only use 80, 112, 128, 192 and 256 for strengths. I didn't check too hard.

I've no objection to making it 90. I don't know if any code depends on it being one of the standard values. I'd be quite surprised if somebody somewhere didn't write this kind of rubbish:

switch (strength) {
case 80: ... break;
case 112: ... break;
case 128: ... break;
case 192: ... break;
case 256: ... break;
}
All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@paulidale

paulidale commented Sep 22, 2021

Copy link
Copy Markdown
Contributor Author

I prefer the solution in #16160 to be honest. But this is more data driven.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@kaduk

kaduk commented Sep 22, 2021

Copy link
Copy Markdown
Contributor

I prefer the solution in #16160 to be honest. But this is more data driven.

On first look I do, as well. But I cannot claim to have spent the time to properly review either approach.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

t8m
t8m approved these changes Sep 22, 2021
View reviewed changes

@t8m t8m left a comment

Copy link
Copy Markdown
Member

There was a problem hiding this comment.

Choose a reason for hiding this comment

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

IMO this is better than the alternative.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
mattcaswell
mattcaswell reviewed Sep 22, 2021
View reviewed changes
Comment thread ssl/s3_lib.c Resolved

Uh oh!

There was an error while loading. Please reload this page.

mattcaswell
mattcaswell reviewed Sep 22, 2021
View reviewed changes
Comment thread doc/man3/SSL_CTX_set_security_level.pod Resolved

Uh oh!

There was an error while loading. Please reload this page.

@paulidale

paulidale commented Sep 22, 2021 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Contributor Author

I've also pushed a new commit changing the strength to the more accurate 90 bits.
Happy to drop this part if it is controversial.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@paulidale
paulidale force-pushed the ccm8-table branch from fb532d8 to c8e1ea3 Compare September 22, 2021 07:09
mattcaswell
mattcaswell approved these changes Sep 22, 2021
View reviewed changes
@paulidale paulidale added approval: done This pull request has the required number of approvals and removed approval: review pending This pull request needs review by a committer labels Sep 22, 2021
@t8m

t8m commented Sep 22, 2021

Copy link
Copy Markdown
Member

I've also pushed a new commit changing the strength to the more accurate 90 bits.
Happy to drop this part if it is controversial.

Why is 90 bits strength more accurate?

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

t8m
t8m approved these changes Sep 22, 2021
View reviewed changes
@paulidale

paulidale commented Sep 22, 2021

Copy link
Copy Markdown
Contributor Author

@kaduk, do you have a reference for the strength?

Using the geometric mean, AES-256-CCM8 would have a strength > 112 bits and would stay at security level 2.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@kaduk

kaduk commented Sep 22, 2021

Copy link
Copy Markdown
Contributor

"geometric mean" was just an attempt to backsolve how one might justify 80 bits on its own right (as opposed to just happening to trigger the desired threshold based on the current logic in the other parts of the code).
I don't think I have a reference for CCM8 strength that would give an answer larger than 64 bits.
https://datatracker.ietf.org/doc/draft-irtf-cfrg-aead-limits/ is in some senses even less optimistic about CCM8...

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@mattcaswell

mattcaswell commented Sep 22, 2021

Copy link
Copy Markdown
Member

One possibility is to just put it at 64 bits which is at least justifiable. Although it would mean it goes into security level 0 instead of 1. That would have meant that it is not available in the default security level any more - except for the fact that we just voted to increase the default security level to 2 anyway - so either way it won't be available in the default security level. So the distinction between 0 and 1 might not matter that much anyway.

t8m reacted with thumbs up emoji
All reactions
  • 👍 1 reaction

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@paulidale
paulidale force-pushed the ccm8-table branch from c8e1ea3 to ced0d2d Compare September 22, 2021 22:48
paulidale added 2 commits September 23, 2021 09:06
@paulidale
tls: reduce the strength of CCM_8 ciphers due to their short IV.
ebbfad4
Fixes openssl#16154
@paulidale
doc: document the change to the security level of CCM8 cipher suites
bb27a4f
@paulidale
paulidale force-pushed the ccm8-table branch from ced0d2d to bb27a4f Compare September 22, 2021 23:06
@paulidale

paulidale commented Sep 22, 2021

Copy link
Copy Markdown
Contributor Author

I've switched them to 80 bits again. Going to 64 bits breaks tests. I'll investigate and reduce the strength if I can fix things.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@paulidale
tls/ccm8: reduce the cipher strength for CCM8 ciphers to 64 bits
a1f967c
This is the length of the tag they use and should be considered an upper bound
on their strength.

This lowers their security strength to level 0.
@paulidale

paulidale commented Sep 23, 2021

Copy link
Copy Markdown
Contributor Author

I've lowered the security level to 64 bits and fixed the test failures.
Re-review required.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@paulidale paulidale added approval: review pending This pull request needs review by a committer and removed approval: done This pull request has the required number of approvals labels Sep 23, 2021
kaduk
kaduk reviewed Sep 23, 2021
View reviewed changes

@kaduk kaduk left a comment

Copy link
Copy Markdown
Contributor

There was a problem hiding this comment.

Choose a reason for hiding this comment

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

This is looking more attractive now that we are using a number we can justify based on the math

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
Comment thread CHANGES.md Resolved

Uh oh!

There was an error while loading. Please reload this page.

Comment thread CHANGES.md Resolved

Uh oh!

There was an error while loading. Please reload this page.

Comment thread doc/man3/SSL_CTX_set_security_level.pod Resolved

Uh oh!

There was an error while loading. Please reload this page.

@paulidale
fixup! tls/ccm8: reduce the cipher strength for CCM8 ciphers to 64 bits
ca3d2f9
@paulidale
paulidale force-pushed the ccm8-table branch from cb4addd to ca3d2f9 Compare September 23, 2021 05:14
@paulidale

paulidale commented Sep 23, 2021

Copy link
Copy Markdown
Contributor Author

Comments addressed.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

t8m
t8m approved these changes Sep 23, 2021
View reviewed changes
@t8m t8m added approval: done This pull request has the required number of approvals and removed approval: review pending This pull request needs review by a committer labels Sep 23, 2021
mattcaswell
mattcaswell approved these changes Sep 23, 2021
View reviewed changes
openssl-machine pushed a commit that referenced this pull request Sep 23, 2021
@slontis @t8m
Change TLS RC4 cipher strength check to be data driven.
c3b5fa4
This is a same pattern as used in PR #16652

Reviewed-by: Paul Dale <[email protected]>
Reviewed-by: Tomas Mraz <[email protected]>
(Merged from #16656)
@paulidale

paulidale commented Sep 24, 2021

Copy link
Copy Markdown
Contributor Author

Merged, thanks for the feedback and discussion.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@paulidale paulidale closed this Sep 24, 2021
openssl-machine pushed a commit that referenced this pull request Sep 24, 2021
@paulidale
tls: reduce the strength of CCM_8 ciphers due to their short IV.
1a473d1
Fixes #16154

Reviewed-by: Matt Caswell <[email protected]>
Reviewed-by: Tomas Mraz <[email protected]>
(Merged from #16652)
openssl-machine pushed a commit that referenced this pull request Sep 24, 2021
@paulidale
doc: document the change to the security level of CCM8 cipher suites
56ffcce
Reviewed-by: Matt Caswell <[email protected]>
Reviewed-by: Tomas Mraz <[email protected]>
(Merged from #16652)
openssl-machine pushed a commit that referenced this pull request Sep 24, 2021
@paulidale
tls/ccm8: reduce the cipher strength for CCM8 ciphers to 64 bits
e071022
This is the length of the tag they use and should be considered an upper bound
on their strength.

This lowers their security strength to level 0.

Reviewed-by: Matt Caswell <[email protected]>
Reviewed-by: Tomas Mraz <[email protected]>
(Merged from #16652)
@paulidale
paulidale deleted the ccm8-table branch September 24, 2021 07:39
@rbsec rbsec mentioned this pull request Sep 17, 2026
[Bug] sslscan 2.2.2 incorrectly reports key length as 64 bits for CCM_8 cipher suites rbsec/sslscan#365
Closed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@t8m t8m t8m approved these changes
@mattcaswell mattcaswell mattcaswell approved these changes
+1 more reviewer
@kaduk kaduk kaduk left review comments
Reviewers whose approvals may not affect merge requirements

Uh oh!

There was an error while loading. Please reload this page.

Assignees

@paulidale paulidale

Labels

approval: done This pull request has the required number of approvals branch: master Applies to master branch triaged: feature The issue/pr requests/adds a feature

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Reconsider strength of CCM_8 TLS ciphers

Uh oh!

There was an error while loading. Please reload this page.

5 participants

@paulidale @kaduk @slontis @t8m @mattcaswell
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.
You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.