chipKIT® Development Platform

Inspired by Arduino™


Created Tue, 16 Aug 2011 21:54:18 +0000 by galindro


Tue, 16 Aug 2011 21:54:18 +0000


I'm need to use PolarSSL RSA library on Max32 board.

How can I integrate it with my Max32 sketches? The Arduino language, AFAIK, isn´t a pure C++ code. Is that correct?


Tue, 16 Aug 2011 23:36:51 +0000

The ethernet library for the Max32/Network Shield is based on the Microchip Application Library ethernet stack. I don't know how easy or difficult it will be to incorporate use of PolarSSL in that environment. Where in the stack does the SSL layer sit?

The compiler used by chipKIT is a C++ compiler, but I don't think that all of the runtime support you would expect to see in a complete C++ implementation is present.

Gene Apperson Digilent


Wed, 17 Aug 2011 02:40:48 +0000

Where in the stack does the SSL layer sit?

SSL runs at presentation layer (according to OSI reference model).

Because I'll use a GPRS shield (with SIM900 module) to send data to a webserver via AT commands, unfortunately, it doesn't supports SSL.

BUT, I want to use only a RSA algorithm to encrypt the data before send it via HTTP. To do that, I was thinking to use the RSA library files of PolarSSL...

Is it possible to anyone of chipKIT development team do a simple test of this library?


Wed, 17 Aug 2011 16:44:58 +0000

What hardware is this going to be running with?

If I can get access to the appropriate hardware, I can probably try it out. I'm going to be too busy the next couple of weeks, but I will have a bit more time in early September.

Gene Apperson Digilent


Wed, 17 Aug 2011 18:11:39 +0000

What hardware is this going to be running with?

It is a GRPS Shield builded by Seeedstudio. Put "seeedstudio gprs shield" in google and click on the first link (I can't post URLs because I'm a new forum user...).

You don't have to buy this item to test the library. You can only import the library in a simple Max32 sketch and tell it to put in the serial monitor the result of an encryption/decryption operation.

In PolarSSL source code, there are two examples (programs/pkey/rsa_encrypt) that shows how to do a simple rsa encryption/decryption operation. If it works, almost the rsa library of PolarSSL can be used in Max32 hardware.

BUT, it will be very cool if you buy that GPRS Shield to see if it is full compatible with Max32 hardware!! :D


Wed, 17 Aug 2011 18:15:08 +0000


I won't have time for a couple of weeks, but I think I can do this.



Wed, 17 Aug 2011 18:43:09 +0000

Thank you very much!!! If it runs sucessfull, I'll buy the Max32. I 've purchased others arduino shields, so, I'll can test all of them and send (in other post) the result of the tests to contribute with this very good project.


Mon, 22 Aug 2011 04:53:54 +0000

Please ping me about this in a couple weeks. I'm so busy right now, I'll probably forget.



Tue, 30 Aug 2011 14:12:34 +0000

Gene, don't forget to test the PolarSSL library!




Wed, 31 Aug 2011 19:55:47 +0000

Thanks for the ping...

Can you send me (either here or by private message) some specific instructions on what you want me to test and how to test it. I'd prefer not to have to spend time figuring out things that you can just tell me.

Thanks, Gene


Sun, 11 Sep 2011 02:31:26 +0000

Gene, All I need you test is a simple RSA string encryption / decryption with 1024 bits and 2048 bits key.


Mon, 12 Sep 2011 18:49:23 +0000

However, I don't know where the library is, if there is a simple example using it, and things like that.



Fri, 16 Sep 2011 11:43:29 +0000

Hi Gene! You can download PolarSSL from An example is present in the example applications in programs/pkey/rsa_encrypt (inside the downloaded package).

Thank you.


Fri, 23 Sep 2011 19:36:53 +0000

I downloaded and decompressed the file and I ended up with the following file:


What do I do with it? I was expecting to see some source code.



Sun, 23 Oct 2011 10:21:50 +0000

Hello :-) I'm new here, just browsing the posts... It would appear that the single file you got is just un-gzipped TAR file, I suppose someone screw up packing it. If you rename it to polarssl-1.0.0-gpl.tar, you should be able to unpack it further and get whole polarssl-1.0.0-gpl/ directory. Regards, rel


Tue, 25 Oct 2011 10:43:14 +0000

Hi Gene!

Try to download from here: If you are running Windows, please install 7zip: [url][/url] or WinRAR: [url][/url] before download the above file.

If you are running Linux, use this command to decompress the file:

# tar -zxpvf polarssl-1.0.0-gpl.tgz