Questions tagged [mbedtls]

mbed TLS (formerly known as PolarSSL) makes it easier for developers to include cryptographic and SSL/TLS capabilities in their (embedded) products, facilitating this functionality with a minimal coding footprint.

mbed TLS (formerly known as PolarSSL) makes it easier for developers to include cryptographic and SSL/TLS capabilities in their (embedded) products, with a minimal coding footprint.

160 questions
0
votes
1 answer

API for setting ECC Key mbedTLS

I am trying to set the ECC private key explicitly with mbedTLS for ECDSA signing. The key has been generated externally from mbedTLS and consists of the following arrays for the private key and the public key in the NIST secp256r1 curve (below). In…
0
votes
1 answer

Is "User-Agent" header mandatory in https GET request as per RFC

I was trying to download a file from a server using mbedtls. used the following GET request GET /xxxxxxxxxxxxxxx.xml HTTP/1.1 Host: example_xxxxx.com Connection: keep-alive The server responded with status 403 When I add a "User-Agent" header filed,…
0
votes
0 answers

mbedtls_rsa_rsassa_pkcs1_v15_sign stack overflow

I'm a hobbyist and this is my first dive into the world of C++ and embedded systems. I'm struggling a bit with mbedtls. I'm trying to create a JWT to authenticate against google services. This involves sha256 hashing some base64 encoded json objects…
Austin P
  • 81
  • 4
0
votes
1 answer

ECDSA signature verify very SLOW on ESP32 with mbedtls

We’re using mbedtls on an Espressif ESP32 module (32-bit Xtensa core, 160 MHz) to verify the signature of commands sent over Bluetooth. We use ECDSA signatures and a key pair generated with the secp256r1 curve. The signed commands are sent by a…
Jeremy
  • 1,083
  • 3
  • 13
  • 25
0
votes
1 answer

mbedtls cannot parse valid x509 certificate

I have the following certificate: -----BEGIN…
Kiith Nabaal
  • 366
  • 2
  • 5
  • 16
0
votes
0 answers

undefined reference to `mbedtls_cipher_cmac' using ESP32 and VSC with PlatformIO

I'm trying to write a LoRaWAN library from scratch. Using the function mbedtls_cipher_cmac from mbedtls/cmac.h to generate the Join-Request frame. I get the error undefined reference to `mbedtls_cipher_cmac' I have attempted the solution in this…
0
votes
1 answer

Different MD5 hash with mbedtls and openssl

I'm trying to get MD5 hash with mbedtls by this code: #include "mbedtls/base64.h" #include "mbedtls/md5.h" #include "string.h" #include void app_main() { unsigned char hash_source[] = "This is a test.."; size_t hash_source_len =…
0
votes
0 answers

How to verify mbedtls signature in node.js?

I have seems working way how to verify the signature with mbedtls on ESP32. Now I need to verify the same signature with NodeJS but I had no success with it. mbedtls example: #include "mbedtls/base64.h" #include "mbedtls/pk.h" #include…
0
votes
1 answer

MbedTLS application on TCP

I am trying to use mbedtls on my lwip modbus application with stm32f4. I am working non-rtos systems. I am using the lwip-altcp library. I need to change my function with altcp function, This is old function: BOOL xMBTCPPortInit( USHORT usTCPPort…
gogogo
  • 529
  • 1
  • 3
  • 11
0
votes
1 answer

Mbedtls_pk_parse_public_key returns 0xfffffff0 with secp256k1 public key

Heija everyone, i think i’m missing something. I generated a private and public key pair with openSSL. Lines used: openssl ecparam -name secp256k1 -genkey -noout -out priv_key.pem openssl ec -in .\priv_key.pem -pubout -out public_key.pem This…
csa_msa
  • 11
  • 3
0
votes
1 answer

JITP cert not created with mbedTLS+ATECC608A (works with moquitto_pub)

I have the following setup: ATECC608A mbedTLS (tested with 2.16.6 and 2.16.9) coreMQTT The certificate chain is the following: RootCA > SignerCA > DeviceCert. I've registered both RootCA and SignerCA as CAs in the AWS IoT Console I setup the chain…
fstephany
  • 2,254
  • 3
  • 25
  • 32
0
votes
1 answer

Implementing mbedtls and xTaskCreate() causing memory leak on ESP32 (Arduino IDE)

So i have the code below. If i directly call signKey() function in the loopTask, the free heap is stable. However if i use that function to create task using xTaskCreate(), the free heap is always decreasing. Am i missing something? Here is the…
Wachid Susilo
  • 496
  • 4
  • 11
0
votes
0 answers

MbedTLS with Bluetooh Low Energy

Does somebody has experience with implementing the MbedTLS with the BLE devices. I have few questions about setting up the read and write call back functions for the mbedtls_set_bio() functions. I wanted to use the GATT api functions to set up the…
prasanna
  • 23
  • 2
0
votes
1 answer

Is it possible to include PolarSSL and OpenSSL in the same project?

I have a software which include paho.mqtt.c with openSSL. I want to include libcurl in it, which was built with polarSSL(newly mbedTLS). When I include polarSSL to the project, i get a lot of Name clash: build/MQTTAsync.o: In function…
Damezumari
  • 17
  • 6
0
votes
1 answer

Parse the Subject name of a X.509 certificate to a buffer

i'm trying to parse the subject name of a X.509 certificate into a buffer , but i'm receiving negative value. What could have been gone wrong? int32_t ret; size_t n = 0; uint8_t *p = NULL; mbedtls_x509_crt testcert; …
LIJIN T V
  • 81
  • 8