does there have an example for rsa_pkcs1_encrypt(.....) function?
does there have an example for rsa_pkcs1_encrypt(.....) function?
does there have an example for rsa_pkcs1_encrypt(.....) function?
Re: does there have an example for rsa_pkcs1_encrypt(.....) function?
Hi, i'm just looking for the same! Did you know something about that you can share? Thanks!
Re: does there have an example for rsa_pkcs1_encrypt(.....) function?
Hi,
We don't have a standalone example of this function in ESP-IDF, but mbedTLS has a range of example programs (designed for Linux) which use the mbedTLS APIs.
An RSA encryption sample is here:
https://github.com/espressif/mbedtls/bl ... ypt.c#L152
This code (main function) will not work as-is in ESP-IDF, but you could adapt the relevant parts without too much trouble.
We don't have a standalone example of this function in ESP-IDF, but mbedTLS has a range of example programs (designed for Linux) which use the mbedTLS APIs.
An RSA encryption sample is here:
https://github.com/espressif/mbedtls/bl ... ypt.c#L152
This code (main function) will not work as-is in ESP-IDF, but you could adapt the relevant parts without too much trouble.
Re: does there have an example for rsa_pkcs1_encrypt(.....) function?
Thank you, ESP_Angus! I find a couple of things trying to make this code work. I'd be so glad that you could help me.
The first one. I was reading the code and I see it use files, do you know if I can use files with the ESP32? Or do you have a recommendation to make it work? I think the best would be having the key in a char array, but i'm really lost on it.
The second. I'm trying to compile the code on Mac OS X High Sierra using gcc, but i have some problems with the linker, appearantly (i attach a screenshot). Do you think I need to try on Linux?
Thanks in advance!
The first one. I was reading the code and I see it use files, do you know if I can use files with the ESP32? Or do you have a recommendation to make it work? I think the best would be having the key in a char array, but i'm really lost on it.
The second. I'm trying to compile the code on Mac OS X High Sierra using gcc, but i have some problems with the linker, appearantly (i attach a screenshot). Do you think I need to try on Linux?
Thanks in advance!
- Attachments
-
- Captura de pantalla 2018-10-15 a la(s) 16.02.29.png (138.22 KiB) Viewed 7478 times
Re: does there have an example for rsa_pkcs1_encrypt(.....) function?
This is up to you. You could adapt the code in these files to use keys in arrays instead (refer to the mbedTLS docs for the functions to use), or you can continue to load from the filesystem (using one of the supported ESP32 embedded filesystems). It's really up to you.SombraRPK wrote:Thank you, ESP_Angus! I find a couple of things trying to make this code work. I'd be so glad that you could help me.
The first one. I was reading the code and I see it use files, do you know if I can use files with the ESP32? Or do you have a recommendation to make it work? I think the best would be having the key in a char array, but i'm really lost on it.
You need to build the mbedTLS library on macOS and then pass the required gcc options to link in this library. mbedTLS includes some Makefiles and CMakeLists files for the library and the example programs, which should help do this for you.SombraRPK wrote: The second. I'm trying to compile the code on Mac OS X High Sierra using gcc, but i have some problems with the linker, appearantly (i attach a screenshot). Do you think I need to try on Linux?
Unfortunately, supporting C programming on macOS is outside the scope of this forum - but there are lots of other resources online which can help you learn.
Re: does there have an example for rsa_pkcs1_encrypt(.....) function?
Thanks a lot. What would you recommend me, talking about the string-in key or file-in key? And about the mbedTLS docs, are these? https://tls.mbed.org/api/, or are there some others specifically for ESP?
Who is online
Users browsing this forum: No registered users and 125 guests