cancel
Showing results for 
Search instead for 
Did you mean: 

WICED Studio Wi-Fi Combo

LeWi_2227251
New Contributor II

For a TLSv1.2 secured TCP server socket is there a way to support both ECC and RSA certificate/key pairs?

We are required to support all the following ciphers:

•                    TLS_RSA_WITH_3DES_EDE_CBC_SHA         

•                    TLS_RSA_WITH_AES_128_CBC_SHA

•                    TLS_RSA_WITH_AES_128_GCM_SHA256

•                    TLS_RSA_WITH_AES_256_CBC_SHA

•                    TLS_RSA_WITH_AES_256_GCM_SHA384

•                    TLS_ECDHE_RSA_WITH_3DES_EDE_CBC_SHA

•                    TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA

•                    TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256

•                    TLS_ECHDE_RSA_WITH_AES_128_GCM_SHA256

•                    TLS_ECDHE_ECDSA_WITH_3DES_EDE_CBC_SHA

•                    TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA

•                    TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA256

•                    TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256

•                    TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384

From my understanding TLS_ECDHE_ECDSA_xxxx ciphers will require a certificate signed by an ECC key, the others RSA.

The structure wiced_tls_context_t can only be assigned one wiced_tls_identity_t pointer which holds the certificate/key pair.

Currently have all ciphers except TLS_ECDHE_ECDSA_xxxx working on our platform:

SDK 5.0, module ISM43362_M3G_L44.

0 Likes
1 Solution
LeWi_2227251
New Contributor II

With SDK 5.2 this is no longer an issue.

View solution in original post

4 Replies
GauravS_31
Moderator
Moderator

The WICED BESL library currently does not support multiple server certificate/key pairs.

LeWi_2227251
New Contributor II

grsr

I think I found a solution:

In server mode I was able to swap the TLS identity after SSL state changes from SSL_CLIENT_HELLO to SSL_SERVER_HELLO.

Cipher has been selected at this point, planning on swapping EC and RSA TLS identity based on cipher chose.

Verified it works using two RSA key/certificates, swapping to the valid TLS identity at that point, handshake completed ok.

Will verify with EC TLS Identity when I get my EC key/certificate pair generated.

For EC we need to support secp224r1 key size.  WICED defaults to secp256r1 key size.

I tried to change the elliptic curve to different values modifying the SDK at this location:

libraries\crypto\micro-ecc\configuration.h

Still defaults to secp256r1, tried uECC_secp160r1_size and uECC_secp224r1_size.

Running as client the WICED device always responds with only curve secp256r1?

pastedImage_37.png

GauravS_31
Moderator
Moderator

leif.widmayer_2227251

That is interesting. You were able to work around the limitation by swapping the TLS identity. Regarding the issue of WICED defaulting to secp256r1 key size, did you change the values of macros uECC_CURVE and uECC_BYTES in configuration.h?

#define uECC_CURVE   uECC_secp224r1

#define uECC_BYTES   uECC_secp224r1_size

Also which APIs did you use for this elliptic curve secp224r1? Can you share a small sample where you used those APIs?

0 Likes
LeWi_2227251
New Contributor II

With SDK 5.2 this is no longer an issue.

View solution in original post