Remove the length-prefixed logic for PQ key shares
Problem:
While working on the pure ML-KEM PR #5586, I learned from Alex that all of the length prefixing logic for PQ should eventually be removed from s2n-tls. It was only used in draft standards, and we have only promised customers to support PQ draft standards (i.e. tls13_pq_hybrid_draft_revision < 5) until the end of 2025. This means any values and logic that handles anything other than 5 can be removed eventually.
We should clean up the length-prefixed format for PQ and simplify the key share logic.
Need By Date:
N/A
Solution:
-
Remove the
len_prefixedfield froms2n_kem_params(added in #3800) and relevant logic. https://github.com/aws/s2n-tls/blob/cfa12ae6a9289e406483a0da2fbe8d0ac1521904/tls/s2n_kem.h#L73 -
Delete the length-prefixed tests in the key share unit tests:
s2n_server_key_share_extension_testands2n_client_key_share_extension_pq_test.