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

Add ML-KEM Support #693

Merged
merged 2 commits into from
Nov 12, 2024
Merged
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
10 changes: 5 additions & 5 deletions include/aws/io/tls_channel_handler.h
Original file line number Diff line number Diff line change
Expand Up @@ -34,14 +34,14 @@ enum aws_tls_cipher_pref {
/* Deprecated */ AWS_IO_TLS_CIPHER_PREF_KMS_PQ_TLSv1_0_2020_02 = 3,
/* Deprecated */ AWS_IO_TLS_CIPHER_PREF_KMS_PQ_SIKE_TLSv1_0_2020_02 = 4,
/* Deprecated */ AWS_IO_TLS_CIPHER_PREF_KMS_PQ_TLSv1_0_2020_07 = 5,
/* Deprecated */ AWS_IO_TLS_CIPHER_PREF_PQ_TLSv1_0_2021_05 = 6,

/*
* This TLS cipher preference list contains post-quantum key exchange algorithms that have been submitted to NIST
* for potential future standardization. Support for this preference list, or PQ algorithms present in it, may be
* removed at any time in the future. PQ algorithms in this preference list will be used in hybrid mode, and always
* combined with a classical ECDHE key exchange.
* This TLS cipher preference list contains post-quantum key exchange algorithms that have been standardized by
* NIST. PQ algorithms in this preference list will be used in hybrid mode, and always combined with a classical
* ECDHE key exchange.
*/
AWS_IO_TLS_CIPHER_PREF_PQ_TLSv1_0_2021_05 = 6,
AWS_IO_TLS_CIPHER_PREF_PQ_TLSV1_2_2024_10 = 7,

AWS_IO_TLS_CIPHER_PREF_END_RANGE = 0xFFFF
};
Expand Down
5 changes: 5 additions & 0 deletions source/s2n/s2n_tls_channel_handler.c
Original file line number Diff line number Diff line change
Expand Up @@ -270,6 +270,8 @@ bool aws_tls_is_cipher_pref_supported(enum aws_tls_cipher_pref cipher_pref) {
#ifndef ANDROID
case AWS_IO_TLS_CIPHER_PREF_PQ_TLSv1_0_2021_05:
return true;
case AWS_IO_TLS_CIPHER_PREF_PQ_TLSV1_2_2024_10:
return true;
#endif

default:
Expand Down Expand Up @@ -1536,6 +1538,9 @@ static struct aws_tls_ctx *s_tls_ctx_new(
case AWS_IO_TLS_CIPHER_PREF_PQ_TLSv1_0_2021_05:
security_policy = "PQ-TLS-1-0-2021-05-26";
break;
case AWS_IO_TLS_CIPHER_PREF_PQ_TLSV1_2_2024_10:
security_policy = "AWS-CRT-SDK-TLSv1.2-2023-PQ";
break;
default:
AWS_LOGF_ERROR(AWS_LS_IO_TLS, "Unrecognized TLS Cipher Preference: %d", options->cipher_pref);
aws_raise_error(AWS_IO_TLS_CIPHER_PREF_UNSUPPORTED);
Expand Down
Loading