Arduino Stack Exchange is a question and answer site for developers of open-source hardware and software that is compatible with Arduino. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Put plainly: is there a way to get an HTTPS connection on the Arduino?

I have been looking in to it, and I have found it is impossible with the standard library and the Ethernet shield, but is there a custom library that can do it?

What about a coprocessor, i.e. like the WiFi shield has? Anyone know if the Arduino yún has ssl?

share|improve this question
1  
you might be interested in this: stackoverflow.com/questions/15830333/arduino-due-https-suppo‌​rt – puredevotion Feb 11 '14 at 23:45
up vote 11 down vote accepted

MCUs mounted on Arduinos don't have the horse power to handle https connections.

Yún does handle https on the linux side, with software like curl, wget or python. Your sketch can just delegate the task to the linux side.

While curl works fine, despite having python preinstalled, you need to manually install python-openssl, since it's not available out of the box (due to disk space constraints)

share|improve this answer

I don't think it is possible due to the size and complexity of the SSL Library, because the Arduino would most likely be under powered. That being said you could make the requests to a regular server and use some sort of PHP script to proxy the request to the HTTPS server. Not sure how well it would work though.

You may be interested into looking at this.

share|improve this answer

As Federico Fissore says above, the Yún can only handle HTTPS (or SSL, whatever you want to call it) on the Linux side of the Yún.

The first way to do it is using Python with Python OpenSSL. The way you do this is by issuing the following commands via SSH or YunSerialTerminal:

opkg update
opkg install python-openssl

opkg update will make sure the package list is up-to-date, and then opkg install installs Python OpenSSL. And then you can talk to the Arduino using Python. This page on the Arduino website should help you in using Python with Arduino.

You could also use curl with the -k option in your sketch. For example:

Process process;
process.runShellCommand("curl -k http://example.net");
while(p.running()); // this waits for the command to be done before continuing

Also, if you want to download a file, you could use wget. This would require you to upgrade wget by again issuing these commands via SSH or YunSerialTerminal:

opkg update
opkg upgrade wget

And then you can just do this in your sketch:

Process process;
process.runShellCommand("wget http://example.net");
while(p.running()); // this waits for the command to be done before continuing
share|improve this answer

I list this as an answer for the sake of having it linked here. It is not full https yet but he is working on it and it may be doable in the future http://evothings.com/is-it-possible-to-secure-micro-controllers-used-within-iot/

here is a benchmark he did encrypting a message using a 1024 bit public key

Arduino UNO       16Mhz AVR               ==> 12596 ms*   8504 ms#
Arduino Leonardo  16Mhz AVR               ==> 12682 ms*   8563 ms#
Arduino Mega      16Mhz AVR               ==> 12596 ms*   8504 ms#
Arduino Due       84Mhz ARM               ==>  1032 ms*
Arduino Yún       16Mhz AVR + 400Mhz MIPS ==>   707 ms*
Intel Galileo     400Mhz x86              ==>   192 ms*

This is as far as he has gone with it but is in the process of setting up a test server to work on seeing how close to a full ssl/https implementation he can pull off.

share|improve this answer
1  
Could you please put the most interesting details from the link you posted so that readers can see right away if it is worth reading further or not? Otherwise your answer would not follow SE policies and would have to be closed. – jfpoilpret Feb 6 '15 at 6:00

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.