Topic: [SOLVED] Encrypted messages from Arduino

Hello, I'm trying to send an encrypted message from the Arduino to Raspberry Pi. I've been seeing WolfSSL examples for Arduino, but what I need is just encrypt the message content. After it, I know how to send my message, cause my connection is radio (RF24l01).

Maybe I only need to use wolfcrypt, but I do not know how to use it.

The point of this I just want to encrypt a string before sending, for example using AES.

Can someone show me some example of how to use a cryptographic algorithm in Arduino?

Thank you very much and excuse me, I'm very newbie at this.

Share

Re: [SOLVED] Encrypted messages from Arduino

Hi,

Correct, you will want to use wolfCrypt's API if only interested in doing encryption/decryption operations separate from SSL/TLS.

The wolfCrypt API reference can be found here:
https://wolfssl.com/wolfSSL/Docs-wolfss … rence.html

And, for code examples, one of the best places to look will be at the wolfCrypt test application (./wolfcrypt/test/test.c).  This file contains test code for all of wolfCrypt's crypto algorithms, and as such can act as a good usage example.  Each algorithm has it's own test function.  For example, for AES, the test function is called aes_test().

https://github.com/wolfSSL/wolfssl/blob … est/test.c

There are also a few examples in the "wolfssl-examples" repository on GitHub:

https://github.com/wolfSSL/wolfssl-exam … ter/crypto

Best Regards,
Chris

Re: [SOLVED] Encrypted messages from Arduino

Thanks for your reply.

I'm trying with some examples, but I'm getting errors.
Can I post an Arduino error here to get some help? I'm desperate.

Share

Re: [SOLVED] Encrypted messages from Arduino

Hi,

Sure, if you are getting any SSL/TLS or wolfSSL errors, please feel free to post them.

Chris