Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions docs/usage-guide/topics/ch06-security-policies.md
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@ The following chart maps the security policy version to protocol version and cip
| 20190802 | X | X | X | X | X | X | X | | | | X | X |
| 20200207 | | | | X | | X | X | | | | X | |
| rfc9151 | | | X | X | | X | | | | X | X | X |
| cnsa_1 | | | X | X | | X | | | | X | X | X |

The "default", "default_tls13", and "default_fips" versions are special in that they will be updated with future s2n-tls changes to keep up-to-date with current security best practices. Ciphersuites, protocol versions, and other options may be added or removed, or their internal order of preference might change. **Warning**: this means that the default policies may change as a result of library updates, which could break peers that rely on legacy options.

Expand Down Expand Up @@ -111,6 +112,7 @@ s2n-tls usually prefers AES over ChaCha20. However, some clients-- particularly
| 20190802 | X | X | X | X |
| 20200207 | | X | | X |
| rfc9151 | X | X | | X |
| cnsa_1 | X | X | | X |

*NOTE*: Legacy SHA-1 algorithms are not supported in TLS1.3. Legacy SHA-1 algorithms will be supported only if TLS1.2 has been negotiated and the security policy allows them.

Expand Down Expand Up @@ -146,6 +148,7 @@ s2n-tls usually prefers AES over ChaCha20. However, some clients-- particularly
| 20190802 | X | X | |
| 20200207 | X | X | X |
| rfc9151 | | X | |
| cnsa_1 | | X | |

### Default Policy History
| Version | "default" | "default_fips" | "default_tls13" |
Expand Down
28 changes: 28 additions & 0 deletions tests/policy_snapshot/snapshots/cnsa_1
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
name: cnsa_1
min version: TLS1.2
rules:
- Perfect Forward Secrecy: no
- FIPS 140-3 (2019): no
cipher suites:
- TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384
- TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384
- TLS_RSA_WITH_AES_256_GCM_SHA384
- TLS_DHE_RSA_WITH_AES_256_GCM_SHA384
- TLS_AES_256_GCM_SHA384
signature schemes:
- ecdsa_sha384
- rsa_pss_pss_sha384
- rsa_pss_rsae_sha384
- rsa_pkcs1_sha384
curves:
- secp384r1
certificate preferences apply locally
certificate signature schemes:
- ecdsa_sha384
- rsa_pkcs1_sha384
certificate keys:
- ecdsa_p384
- rsa_3072
- rsa_4096
- rsa_pss_3072
- rsa_pss_4096
15 changes: 15 additions & 0 deletions tls/s2n_security_policies.c
Original file line number Diff line number Diff line change
Expand Up @@ -1144,6 +1144,20 @@ const struct s2n_security_policy security_policy_rfc9151 = {
.certificate_preferences_apply_locally = true,
};

/*
* CNSA_1.0 policy is an alias for the existing rfc9151 TLS Security policy.
*/
const struct s2n_security_policy security_policy_cnsa_1_20250616 = {
.minimum_protocol_version = S2N_TLS12,
.cipher_preferences = &cipher_preferences_rfc9151,
.kem_preferences = &kem_preferences_null,
.signature_preferences = &s2n_signature_preferences_rfc9151,
.certificate_signature_preferences = &s2n_certificate_signature_preferences_rfc9151,
.certificate_key_preferences = &s2n_certificate_key_preferences_rfc9151,
.ecc_preferences = &s2n_ecc_preferences_20210816,
.certificate_preferences_apply_locally = true
};

/*
* This security policy is a mix of default_tls13 (20240503) and rfc9151, with
* a primary requirement that AES-256 is the ciphersuite chosen. Other
Expand Down Expand Up @@ -1382,6 +1396,7 @@ struct s2n_security_policy_selection security_policy_selection[] = {
{ .version = "20250211", .security_policy = &security_policy_20250211, .ecc_extension_required = 0, .pq_kem_extension_required = 0 },
{ .version = "20250414", .security_policy = &security_policy_20250414, .ecc_extension_required = 0, .pq_kem_extension_required = 0 },
{ .version = "rfc9151", .security_policy = &security_policy_rfc9151, .ecc_extension_required = 0, .pq_kem_extension_required = 0 },
{ .version = "cnsa_1", .security_policy = &security_policy_cnsa_1_20250616, .ecc_extension_required = 0, .pq_kem_extension_required = 0 },
{ .version = "test_all", .security_policy = &security_policy_test_all, .ecc_extension_required = 0, .pq_kem_extension_required = 0 },
{ .version = "test_all_fips", .security_policy = &security_policy_test_all_fips, .ecc_extension_required = 0, .pq_kem_extension_required = 0 },
{ .version = "test_all_ecdsa", .security_policy = &security_policy_test_all_ecdsa, .ecc_extension_required = 0, .pq_kem_extension_required = 0 },
Expand Down
1 change: 1 addition & 0 deletions tls/s2n_security_policies.h
Original file line number Diff line number Diff line change
Expand Up @@ -133,6 +133,7 @@ extern const struct s2n_security_policy security_policy_20250211;
extern const struct s2n_security_policy security_policy_20250414;

extern const struct s2n_security_policy security_policy_rfc9151;
extern const struct s2n_security_policy security_policy_cnsa_1_20250616;
extern const struct s2n_security_policy security_policy_test_all;

extern const struct s2n_security_policy security_policy_test_all_tls12;
Expand Down
Loading