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

Connecting to KMS endpoint with s2nc by using PQ-ciphers #4700

Closed
cschnidr opened this issue Aug 9, 2024 · 2 comments
Closed

Connecting to KMS endpoint with s2nc by using PQ-ciphers #4700

cschnidr opened this issue Aug 9, 2024 · 2 comments

Comments

@cschnidr
Copy link

cschnidr commented Aug 9, 2024

For testing/demo purposes I'm trying to connect to a KMS endpoint and enforcing PQ-ciphers.
I compiled AWS-LC and S2N-TLS from the source as described here: https://repost.aws/questions/QU882YiZEHTRe1GTyxKr99Xg/building-s2n-tls-with-aws-libcrypto-with-pq-support

However, I don't find a cipher suite that uses TLS1.3 and PQ-Ciphers. What I'm doing wrong? What security policy is recommended?

Here the closest I got:

[ec2-user@ip-172-31-0-117 bin]$ ./s2nc -c KMS-PQ-TLS-1-0-2020-07 kms.eu-central-2.amazonaws.com
CONNECTED:
Handshake: NEGOTIATED|FULL_HANDSHAKE|TLS12_PERFECT_FORWARD_SECRECY
Client hello version: 33
Client protocol version: 33
Server protocol version: 33
Actual protocol version: 33
Server name: kms.eu-central-2.amazonaws.com
Curve: secp256r1
KEM: kyber512r3
KEM Group: NONE
Cipher negotiated: ECDHE-KYBER-RSA-AES256-GCM-SHA384
Server signature negotiated: RSA+SHA256
Early Data status: NOT REQUESTED
Wire bytes in: 6565
Wire bytes out: 1099
s2n is ready
Connected to kms.eu-central-2.amazonaws.com:443

--> TLS1.2, Cipher negotiated: ECDHE-KYBER-RSA-AES256-GCM-SHA384
--> no KEM Group?

[ec2-user@ip-172-31-0-117 bin]$ ./s2nc -c PQ-TLS-1-0-2021-05-23 kms.eu-central-2.amazonaws.com
CONNECTED:
Handshake: NEGOTIATED|FULL_HANDSHAKE|MIDDLEBOX_COMPAT
Client hello version: 33
Client protocol version: 34
Server protocol version: 34
Actual protocol version: 34
Server name: kms.eu-central-2.amazonaws.com
Curve: NONE
KEM: NONE
KEM Group: x25519_kyber-512-r3
Cipher negotiated: TLS_AES_256_GCM_SHA384
Server signature negotiated: RSA-PSS-RSAE+SHA256
Early Data status: NOT REQUESTED
Wire bytes in: 6586
Wire bytes out: 1224
s2n is ready
Connected to kms.eu-central-2.amazonaws.com:443

--> TLS1.3, KEM Group: x25519_kyber-512-r3
--> no KEM? One choosen from the group?
--> Cipher negotiated: TLS_AES_256_GCM_SHA384

@lrstewart
Copy link
Contributor

lrstewart commented Aug 9, 2024

Looking at your output: it looks like you're successfully using PQ key exchange. "KEM" is for TLS1.2, and "KEM group" is for TLS1.3. They're two different mechanisms. PQ key exchange in TLS1.3 doesn't involve a specific cipher suite, because key exchange is separate from cipher suite in TLS1.3.

@cschnidr
Copy link
Author

Makes sense! Missed this. For reference a slightly longer explanation: https://repost.aws/questions/QU882YiZEHTRe1GTyxKr99Xg/building-s2n-tls-with-aws-libcrypto-with-pq-support

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants