Add ECDHE enabled cipher suites, including ECDSA variants
authorMartin Willi <martin@revosec.ch>
Fri, 3 Sep 2010 10:54:40 +0000 (12:54 +0200)
committerMartin Willi <martin@revosec.ch>
Fri, 3 Sep 2010 12:54:43 +0000 (14:54 +0200)
src/libtls/tls_crypto.c

index f95b78e..89cf1a5 100644 (file)
@@ -410,6 +410,46 @@ typedef struct {
  * Mapping suites to a set of algorithms
  */
 static suite_algs_t suite_algs[] = {
+       { TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA,
+               KEY_ECDSA, ECP_256_BIT,
+               HASH_SHA1, PRF_HMAC_SHA1,
+               AUTH_HMAC_SHA1_160, ENCR_AES_CBC, 16
+       },
+       { TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA256,
+               KEY_ECDSA, ECP_256_BIT,
+               HASH_SHA256, PRF_HMAC_SHA2_256,
+               AUTH_HMAC_SHA2_256_256, ENCR_AES_CBC, 16
+       },
+       { TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA,
+               KEY_ECDSA, ECP_384_BIT,
+               HASH_SHA1, PRF_HMAC_SHA1,
+               AUTH_HMAC_SHA1_160, ENCR_AES_CBC, 32
+       },
+       { TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA384,
+               KEY_ECDSA, ECP_384_BIT,
+               HASH_SHA384, PRF_HMAC_SHA2_384,
+               AUTH_HMAC_SHA2_384_384, ENCR_AES_CBC, 32
+       },
+       { TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA,
+               KEY_ECDSA, ECP_256_BIT,
+               HASH_SHA1, PRF_HMAC_SHA1,
+               AUTH_HMAC_SHA1_160, ENCR_AES_CBC, 16
+       },
+       { TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256,
+               KEY_ECDSA, ECP_256_BIT,
+               HASH_SHA256, PRF_HMAC_SHA2_256,
+               AUTH_HMAC_SHA2_256_256, ENCR_AES_CBC, 16
+       },
+       { TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA,
+               KEY_ECDSA, ECP_384_BIT,
+               HASH_SHA1, PRF_HMAC_SHA1,
+               AUTH_HMAC_SHA1_160, ENCR_AES_CBC, 32
+       },
+       { TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384,
+               KEY_ECDSA, ECP_384_BIT,
+               HASH_SHA384, PRF_HMAC_SHA2_384,
+               AUTH_HMAC_SHA2_384_384, ENCR_AES_CBC, 32
+       },
        { TLS_DHE_RSA_WITH_AES_128_CBC_SHA,
                KEY_RSA, MODP_2048_BIT,
                HASH_SHA1, PRF_HMAC_SHA1,
@@ -495,11 +535,31 @@ static suite_algs_t suite_algs[] = {
                HASH_SHA256, PRF_HMAC_SHA2_256,
                AUTH_HMAC_SHA2_256_256, ENCR_CAMELLIA_CBC, 32
        },
+       { TLS_ECDHE_ECDSA_WITH_3DES_EDE_CBC_SHA,
+               KEY_ECDSA, ECP_256_BIT,
+               HASH_SHA1, PRF_HMAC_SHA1,
+               AUTH_HMAC_SHA1_160, ENCR_3DES, 0
+       },
+       { TLS_ECDHE_RSA_WITH_3DES_EDE_CBC_SHA,
+               KEY_ECDSA, ECP_256_BIT,
+               HASH_SHA1, PRF_HMAC_SHA1,
+               AUTH_HMAC_SHA1_160, ENCR_3DES, 0
+       },
        { TLS_RSA_WITH_3DES_EDE_CBC_SHA,
                KEY_RSA, MODP_NONE,
                HASH_SHA1, PRF_HMAC_SHA1,
                AUTH_HMAC_SHA1_160, ENCR_3DES, 0
        },
+       { TLS_ECDHE_ECDSA_WITH_NULL_SHA,
+               KEY_ECDSA, ECP_256_BIT,
+               HASH_SHA1, PRF_HMAC_SHA1,
+               AUTH_HMAC_SHA1_160, ENCR_NULL, 0
+       },
+       { TLS_ECDHE_RSA_WITH_NULL_SHA,
+               KEY_ECDSA, ECP_256_BIT,
+               HASH_SHA1, PRF_HMAC_SHA1,
+               AUTH_HMAC_SHA1_160, ENCR_NULL, 0
+       },
        { TLS_RSA_WITH_NULL_SHA,
                KEY_RSA, MODP_NONE,
                HASH_SHA1, PRF_HMAC_SHA1,