Verifying that a TLS server supports the PSK-Modes Extension?
I am trying to verify if a TLS Server is configured according to the guidelines specified in NIST SP 800-52.
One rule stated is the following:
TLS servers that support TLS 1.3 and the Pre-Shared Key extension shall support the Pre-Shared Key Exchange Modes extension.
How should I go about verifying if a server behaves this way while only interacting with the server from the outside?
My idea was performing two handshakes with different Key Exchange Modes set in the extension. But I am not quite sure how I would decide based on the responses I get from the server.
Support for the
psk_key_exchange_modesextension is mandatory if the server supports pre-shared keys. So this is not a matter of server configuration, it's just a matter of having a compliant implementation of the TLS protocol. It isn't something you need to test for to assess compliance to NIST guidelines.
If you want to test the TLS implementation, try to establish a TLS session with a pre-shared key. If it works, then the server did accept an incoming
psk_key_exchange_modesextension. If you want to test the implementation further, do what you'd do for testing anything: send a variety of good and bad inputs (valid extension, invalid extension, missing extension with a pre-shared key, etc.), and verify that the server responds as expected (by establishing a session with the requested parameters, or by closing the connection, depending on whether it's a good or a bad test case).