For the ciphers, use DHE-RSA-AES256-SHA
.
If you use openssl ciphers -v
you can get more information about each cipher:
$ openssl ciphers -v DHE-RSA-AES256-SHA
DHE-RSA-AES256-SHA SSLv3 Kx=DH Au=RSA Enc=AES(256) Mac=SHA1
$ openssl ciphers -v AES256-SHA
AES256-SHA SSLv3 Kx=RSA Au=RSA Enc=AES(256) Mac=SHA1
From this you can see that both ciphers can be used in SSLv3
, both use RSA for authentication (Au=RSA
), both use 256-bit AES for encryption (Enc=AES(256)
), and both use SHA-1 for the message authentication code (Mac=SHA1
).
So the only difference between these two ciphers is the key exchange. AES256-SHA
uses RSA for the key exchange (Kx=RSA
). DHE-RSA-AES256-SHA
uses ephemeral Diffie–Hellman (Kx=DH
is Diffie-Hellman for the key exchange, and the DHE
is ephemeral Diffie–Hellman).
Diffie-Hellman is slightly harder to break in theory than RSA, but not so much that it will be a deciding factor. DHE
offers perfect forward secrecy and because the key is ephemeral (i.e., never stored on disk), stealing the private key is much more difficult. Those two are deciding factors, so DHE-RSA-AES256-SHA
should win for security.
The question 1024-bit DHE vs 2048-bit RSA has a better comparison of the virtues of the two key exchanges, and the question Is there any particular reason to use Diffie-Hellman over RSA for key exchange? has a very detailed comparson between the two.