Skip to content

Commit

Permalink
no chacha
Browse files Browse the repository at this point in the history
  • Loading branch information
toidiu committed Jul 11, 2024
1 parent a6b4b9f commit ba2ad3d
Show file tree
Hide file tree
Showing 5 changed files with 6 additions and 34 deletions.
5 changes: 2 additions & 3 deletions default.diff
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
diff --git a/default.old b/default.new
index 5e6a085f9..24a1b9ef3 100644
index 5e6a085f9..90fc3254a 100644
--- a/default.old
+++ b/default.new
@@ -1,9 +1,12 @@
@@ -1,9 +1,11 @@
-name: 20240501
+name: default
min version: TLS1.2
Expand All @@ -12,7 +12,6 @@ index 5e6a085f9..24a1b9ef3 100644
cipher suites:
+- TLS_AES_256_GCM_SHA384
+- TLS_AES_128_GCM_SHA256
+- TLS_CHACHA20_POLY1305_SHA256
- TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256
- TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384
- TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA256
1 change: 0 additions & 1 deletion default.new
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ rules:
cipher suites:
- TLS_AES_256_GCM_SHA384
- TLS_AES_128_GCM_SHA256
- TLS_CHACHA20_POLY1305_SHA256
- TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256
- TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384
- TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA256
Expand Down
31 changes: 3 additions & 28 deletions tls/s2n_cipher_preferences.c
Original file line number Diff line number Diff line change
Expand Up @@ -329,10 +329,12 @@ const struct s2n_cipher_preferences cipher_preferences_20240331 = {

/*
* TLS1.3 support.
* FIPS compliant.
* No DHE (would require extra setup with s2n_config_add_dhparams)
*/
struct s2n_cipher_suite *cipher_suites_20240701[] = {
S2N_TLS13_CIPHER_SUITES_20190801,
&s2n_tls13_aes_256_gcm_sha384,
&s2n_tls13_aes_128_gcm_sha256,
/* TLS1.2 with ECDSA */
&s2n_ecdhe_ecdsa_with_aes_128_gcm_sha256,
&s2n_ecdhe_ecdsa_with_aes_256_gcm_sha384,
Expand All @@ -352,33 +354,6 @@ const struct s2n_cipher_preferences cipher_preferences_20240701 = {
.allow_chacha20_boosting = false,
};

/*
* TLS1.3 support.
* FIPS compliant.
* No DHE (would require extra setup with s2n_config_add_dhparams)
*/
struct s2n_cipher_suite *cipher_suites_20240702[] = {
&s2n_tls13_aes_256_gcm_sha384,
&s2n_tls13_aes_128_gcm_sha256,
/* TLS1.2 with ECDSA */
&s2n_ecdhe_ecdsa_with_aes_128_gcm_sha256,
&s2n_ecdhe_ecdsa_with_aes_256_gcm_sha384,
&s2n_ecdhe_ecdsa_with_aes_128_cbc_sha256,
&s2n_ecdhe_ecdsa_with_aes_256_cbc_sha384,

/* TLS1.2 with RSA */
&s2n_ecdhe_rsa_with_aes_128_gcm_sha256,
&s2n_ecdhe_rsa_with_aes_256_gcm_sha384,
&s2n_ecdhe_rsa_with_aes_128_cbc_sha256,
&s2n_ecdhe_rsa_with_aes_256_cbc_sha384,
};

const struct s2n_cipher_preferences cipher_preferences_20240702 = {
.count = s2n_array_len(cipher_suites_20240702),
.suites = cipher_suites_20240702,
.allow_chacha20_boosting = false,
};

/* Same as 20160411, but with ChaCha20 added as 1st in Preference List */
struct s2n_cipher_suite *cipher_suites_20190122[] = {
&s2n_ecdhe_rsa_with_chacha20_poly1305_sha256,
Expand Down
1 change: 0 additions & 1 deletion tls/s2n_cipher_preferences.h
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@ struct s2n_cipher_preferences {
};

extern const struct s2n_cipher_preferences cipher_preferences_20240701;
extern const struct s2n_cipher_preferences cipher_preferences_20240702;
extern const struct s2n_cipher_preferences cipher_preferences_20230317;
extern const struct s2n_cipher_preferences cipher_preferences_20240331;
extern const struct s2n_cipher_preferences cipher_preferences_20140601;
Expand Down
2 changes: 1 addition & 1 deletion tls/s2n_security_policies.c
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ const struct s2n_security_policy security_policy_20240701 = {
/* FIPS default as of 07/01. Supports TLS 1.3 */
const struct s2n_security_policy security_policy_20240702 = {
.minimum_protocol_version = S2N_TLS12,
.cipher_preferences = &cipher_preferences_20240702,
.cipher_preferences = &cipher_preferences_20240701,
.kem_preferences = &kem_preferences_null,
.signature_preferences = &s2n_signature_preferences_20240501,
.certificate_signature_preferences = &s2n_certificate_signature_preferences_20201110,
Expand Down

0 comments on commit ba2ad3d

Please sign in to comment.