PolarSSL is now part of ARM Official announcement and rebranded as mbed TLS.

New features in PolarSSL 1.3.0


PolarSSL 1.3.0 brings some major new features for PolarSSL. I'd like to walk you through a number of the more significant ones.

Elliptic Curve cryptography

We have added full support for Elliptic Curve cryptography, Elliptic Curve Diffie Hellman (ECDH) and the Elliptic Curve Digital Signature Algorithm (ECDSA).

The X509 parse module and SSL layer have been modified to correctly handle EC-based certificates and keys.

So if you load an ECDSA-based certificate with the new x509parse_key() function, your SSL core now suddenly negotiates ECDHE-ECDSA based ciphersuites and you can even opt to compile without RSA enabled (POLARSSL_RSA_C).

Checkout out our full list of supported ciphersuites!

Multi-key / certificate support

We have added a feature that we have not yet seen in other libraries: support to have multiple key and certificate pairs active for a single servername. This allows you to support both ECDSA and RSA ciphersuites at the same time in addition to having support for more that one Elliptic Curve at the same time. (As a certificate can only support either ECDSA or RSA and just a specific Elliptic Curce). This allows a server to better supports clients with limited resources or clients supporting only RSA, in addition to having full support for 521-bit elliptic curves if wanted. Check out the documentation for ssl_set_own_cert() for more details.

Pre-shared Key ciphersuites

In addition the to the new ECDSA-based ciphersuites, pre-shared key ciphersuites based on PSK and DHE-PSK have both been added to the core. The Pre-shared key ciphersuites result in much smaller memory use during the SSL handshake, allowing us to provide an even smaller footprint.

If you want to uses the PSK-based ciphersuites, you will need to pass a pre-shared secret to the SSL layer using ssl_set_psk().

Memory allocation layer

A memory allocation abstraction layer has been added to make it even easier to integrate PolarSSL with existing embedded Operating Systems or bare-metal systems.

In addition we also designed and included a stack-based dynamic memory allocator, to allow PolarSSL to 'live' in a buffer and not in the heap. Our blog on a heapless existence gives more insight into the design rationale and use.

Threading abstraction layer

In order to provide better support for multi-threaded environments, PolarSSL now has a threading layer that supports pthread or an custom implementation of mutexes.

Currently the functions entropy_func(), ssl_cache_get(), ssl_cache_set() and rsa_private() are mutexed properly and should allow you to use PolarSSL in a multi-threaded environment.

X509 writing

The X509 writing core has been rewritten and now supports reading and writing of Certificate Signing Requests (CSRs) and writing of X509 certificates. We have added the relevant applications to view how it works to programs/x509. The applications include:

  • X509 certificate writing (cert_write)
  • CSR writing (cert_req)
  • CSR parsing (req_app)

In combination with the new application for generating public keys (programs/pkey/gen_key) this means all the basics for making a CA are here without needing to use OpenSSL.

Increased granular control

In order to further allow you to decrease the size and dependencies of PolarSSL, it is now possible to individually enable / disable:

  • SSL v3 / TLS 1.0 / TLS 1.1 / TLS 1.2 protocol versions (POLARSSL_SSL_PROTO_{SSL3,TLS1,TLS1_1,TLS1_2})
  • CBC / CTR / CFB cipher modes
  • server_name / max_fragment_length / truncated_hmac / session_tickets TLS extensions

And more. Check out the config.h file for all different flags.

New test framework

The compilation time for our previous test framework depended on the number of test cases present. With the ever increasing number of regression tests we include in mind, we have rewritten the test framework to be more 'scripted'. As a result compilation time for the test framework has been drastically reduced.

In addition our dependency on the fct.h file has been removed and we now have a no-dependency test framework that should easily work on any OS and not just *NIX-like OS'es.

TLS extension support

In light of requests from our users we have implemented support for the RFC 6066 extensions max_fragment_length (ssl_set_max_frag_len()) and truncated_hmac (ssl_set_truncated_hmac()) and the RFC 5077 session_tickets (ssl_set_session_tickets()) extension. Documentation for these can be found in ssl.h.

Like this?




Last updated:
Oct 3, 2013


Want to stay up to date?