Question

I would like to use openssl library with contiki. I have it installed and the header files are in /usr/include/openssl, but including those headers doesn't work. I've tried passing -lcrypto flag to the compiler, but still no success. Is there another flag I need to use or I cannot use the OpenSSL library at all?

Was it helpful?

Solution

You have installed the host version of OpenSSL, it is not possible to use host libraries for cross-compiling binaries for microcontroller targets or any targets of architecture that is different from the host you are compiling it on (strictly speaking).

It is certain that using OpenSSL with any of the Contiki platform is rather impossible. As this library is far to big for any microcontroller, there is however a chance that one may be able to hack support for "native" platform.

You may wish to take a look at CyaSSL for an alternative solution as it is know to fit on some microcontrollers. There are also other SSL libraries you may wish to consider trying (e.g. MatrixSSL and SharkSSL). Some of these are commercial or free only for non-commercial use.

There are various other partial solutions to securing the network traffic:

  • use an HTTP(S) proxy (such as nginx) to terminate the SSL connection between your local end-device network and the Internet
  • use a SoC that has built in cryptographic accelerator with Contiki (e.g. MC1322x)
  • use Thingsquare Mist which has an AES API for radio network encryption and WebSocket

If using UDP (rather then HTTPS or other TCP protocol) for your project is sufficient, then you may wish to take a look at DTLS implementation for Contiki. There also exists an implementation of IPSec, which might be suitable for some applications.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top