PREFER_DH_SUITES doesn't ensure a DH key agreement
Shivam Patel <[email protected]>
| Newsgroups | gmane.comp.encryption.cryptlib |
|---|---|
| Message-ID | <[email protected]> |
Hi, I uncommented the *PREFER_DH_SUITES** line in ssl.h in order to force a DH key agreement rather than RSA key exchange.* * * I found that even with *PREFER_DH_SUITES** defined in ssl.h, the client and server resorted to a RSA key exchange (TLS_RSA_WITH_3DES_EDE_CBC_SHA)* * * *I have built a simple cryptlib client and server on 32 bit Ubuntu. The only difference when **PREFER_DH_SUITES** is defined vs when it is not is the order of cipher suite list that is sent by the client. * * * *Cipler suites sent in client hello message when **PREFER_DH_SUITES is NOT defined (default setting):* TLS_RSA_WITH_3DES_EDE_CBC_SHA (0x000a) TLS_RSA_WITH_AES_128_CBC_SHA (0x002f) TLS_RSA_WITH_AES_256_CBC_SHA (0x0035) TLS_DHE_RSA_WITH_3DES_EDE_CBC_SHA (0x0016) TLS_DHE_RSA_WITH_AES_128_CBC_SHA (0x0033) TLS_DHE_RSA_WITH_AES_256_CBC_SHA (0x0039) TLS_RSA_WITH_IDEA_CBC_SHA (0x0007) TLS_RSA_WITH_DES_CBC_SHA (0x0009) TLS_DHE_RSA_WITH_DES_CBC_SHA (0x0015) *Cipler suites sent in client hello message when **PREFER_DH_SUITES is defined (by removing the comment):* TLS_DHE_RSA_WITH_3DES_EDE_CBC_SHA (0x0016) TLS_DHE_RSA_WITH_AES_128_CBC_SHA (0x0033) TLS_DHE_RSA_WITH_AES_256_CBC_SHA (0x0039) TLS_RSA_WITH_3DES_EDE_CBC_SHA (0x000a) TLS_RSA_WITH_AES_128_CBC_SHA (0x002f) TLS_RSA_WITH_AES_256_CBC_SHA (0x0035) TLS_RSA_WITH_IDEA_CBC_SHA (0x0007) TLS_RSA_WITH_DES_CBC_SHA (0x0009) TLS_DHE_RSA_WITH_DES_CBC_SHA (0x0015) There is a difference in the order, but the cryptlib server opts for TLS_RSA_WITH_3DES_EDE_CBC_SHA (0x000a) in both the cases and DH key exchange doesn't happen. I removed advertisement of the RSA ciphers by client in sessions/ssl_cry.c which forced the server to choose any one of DHE chipers. Although this achieves my purpose but I am not sure why doesn't it work if *PREFER_DH_SUITES is defined, moreso when that effects in the DES ciphers being advertised first !!* * * Shivam Patel. _______________________________________________ Cryptlib mailing list [email protected] via Mail: [email protected] Archive: ftp://ftp.franken.de/pub/crypt/cryptlib/archives/ http://news.gmane.org/gmane.comp.encryption.cryptlib Posts from non-subscribed addresses are blocked to prevent spam, please subscribe in order to post messages.