-
Notifications
You must be signed in to change notification settings - Fork 717
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
Remove PQ TLS 1.2 Support #5022
base: main
Are you sure you want to change the base?
Conversation
/* Ensure that PQ enabled Policies support TLS 1.3 since TLS 1.3 is now required for PQ support. */ | ||
EXPECT_TRUE(has_tls_13_cipher); |
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.
Moved "TLS 1.3 + PQ checks" further down in the function so that this block has access to the has_tls_13_cipher
variable. This move allows adding this check that requires TLS 1.3 support for all PQ policies.
87b1a7d
to
a2b0656
Compare
a2b0656
to
fcfb279
Compare
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.
The diff here is still very large, so I'm still worried. If there's any possible way to keep breaking this change down into smaller chunks, that would probably make this review move faster and make the change safer.
const char *deprecated_security_policies[] = { | ||
"KMS-PQ-TLS-1-0-2019-06", | ||
"KMS-PQ-TLS-1-0-2020-02", | ||
"KMS-PQ-TLS-1-0-2020-07", |
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.
Your changes to the policy list are very hard / impossible to visually verify. Could you maybe run a manual test to confirm that s2n_array_len(security_policy_selection) + s2n_array_len(deprecated_security_policies) is the same before and after your change? Like maybe add some logic to a test or other binary that can report that number, and then run that test with and without your change.
I'm not sure we could add a permanent, committed test without requiring that it be updated every time someone adds a new policy :/
It might be even better if you can confirm no changes to the names. Maybe the test/binary could write the names to a file instead of just reporting a number, and then you can diff the files with and without your change.
.cipher_preferences = &cipher_preferences_pq_tls_1_0_2021_05_26, | ||
.cipher_preferences = &cipher_preferences_20210825_gcm, |
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.
Why does this not change the security policy? Why is this safe? (Same for the other policies)
return query == kex->hybrid[0] || query == kex->hybrid[1]; | ||
return false; |
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.
You don't need the previous kex/query check if you're just going to return false anyway
.kem_count = s2n_array_len(pq_kems_r3_2021_05), | ||
.kems = pq_kems_r3_2021_05, |
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.
Why are these changes safe / why do they not change policies in active use?
S2N_TLS13_CIPHER_SUITES_20190801, | ||
&s2n_ecdhe_kyber_rsa_with_aes_256_gcm_sha384, |
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.
Why is this change safe?
.client_policy = &security_policy_pq_tls_1_1_2021_05_21, | ||
.client_policy = &security_policy_pq_tls_1_0_2021_05_24, |
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.
For your tests: how did you verify that you have the right replacement policy, and aren't changing the behavior of the test?
This is a more general comment then just this line: this PR is really too large for a reviewer to personally verify all your test policy substitutions. How do you know they're all correct?
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.
Please don't delete all the newlines-- it makes it harder to read.
Release Summary:
Removes draft support for post-quantum TLS 1.2 (draft-campagna-tls-bike-sike-hybrid) from s2n-tls. Support for post-quantum TLS 1.3 (draft-ietf-tls-hybrid-design) is kept.
Resolved issues:
None.
Description of changes:
Removes draft support for post-quantum TLS 1.2 (draft-campagna-tls-bike-sike-hybrid) from s2n-tls. Support for post-quantum TLS 1.3 (draft-ietf-tls-hybrid-design) is kept.
Call-outs:
TLS_ECDHE_KYBER_RSA_WITH_AES_256_GCM_SHA384
cipher entirely from s2n-tls.s2n_ecdhe_kyber_rsa_with_aes_256_gcm_sha384
was removed from all cipher preference lists. If this removal made the cipher preference list identical to an already existing cipher preference list, then the entire cipher preference list was deleted and security policies migrated to use the other already existing cipher preference list. Otherwise, if no equivalent cipher preference list existed thens2n_ecdhe_kyber_rsa_with_aes_256_gcm_sha384
was removed in-place (eg forcipher_suites_pq_tls_1_0_2021_05_24
).s2n_connection_get_kem_name()
is kept, but now hardcoded to always returnNONE
in all circumstances so as to not break customers.Testing:
S2N_ERR_DEPRECATED_SECURITY_POLICY
when requested.Remember:
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.