What encryption to choose from the SSL library in python 3? I've been researching some of the types of encryption that the python SSL library uses.

Among them the best I've seen are:


ECDHE-RSA-AES256-GCM-SHA384


TLSv1.2
Kx = ECDH
Au = RSA
Enc = AESGCM (256)
Mac = AEAD

ECDHE-ECDSA-AES256-GCM-SHA384


TLSv1.2
Kx = ECDH
Au = ECDSA
Enc = AESGCM (256)
Mac = AEAD

TLS_AES_256_GCM_SHA384


TLSv1.3
Kx = any
Au = any
Enc = AESGCM (256)
Mac = AEAD



I have sorted the encryption types according to their level of security, efficiency, and use. (Based on what you can research online, they are the most used and safest, especially the first).

The truth is that I don't know which one to choose for my project.

I would appreciate being guided and advised on which one to choose.
You may need a 1.2 and 1.3 scheme, so I'd include at least one of both, giving priority to 1.3 as it is the latest / greatest protocol.

Then there is ECDSA and RSA, indicating the certificate based authentication used. ECDSA is more performant for similar security (and you may not even get any certificates above RSA-4096). That may be important if you can choose the certificate type. However, once you've chosen your TLS certificate type, you don't get to choose between the two cipher-suites, and you just include the one that is compatible with your certificate.

If you do Business-to-Business (B2B) then I'd choose TLS 1.3 due to the fast session resumption may achieve.