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
1
vote
0 answers

Implementing DTLS handshake for the Bluetooth low energy devices

I am trying to implement a DTLS handshake between two BLE devices. For this, I wanted to use the L2CAP channel of the BLE to communicate with the messages coming from the DTLS. Basically, I want to open a DTLS tunnel with the help of L2CAP from the…
prasanna
  • 23
  • 2
1
vote
1 answer

X.509 DER formated certificate to PEM formated

How do i convert DER formated X.509 certificate to PEM form using MbedTLS? Actually the certificate which i'm recieving is in BASE64 encoded , while performing BASE64 decoding it gives DER formated certificate, but i require PEM format and want to…
LIJIN T V
  • 81
  • 8
1
vote
0 answers

mbedtls websocket client library

I want to use mbedtls library for use as a websocket client on Ubuntu. Can someone point me to some low footprint wrapper library as it appears that mbedtls itself does not support websockets client out of the box. My server is a node.js…
Sunny
  • 9,245
  • 10
  • 49
  • 79
1
vote
0 answers

Encrypt message using RSA on ESP32

What I try to achieve here is to encrypt a message inside ESP32 app built using PlatformIO + Arduino framework. After some searchings, I found this repo: https://github.com/espressif/arduino-esp32 There is a tool inside it seems able to help me…
Daniel Tang
  • 11
  • 1
  • 5
1
vote
3 answers

MQTT can`t connect to backend AWS IoT core

UPDATED: I am trying to connect to a backend (AWS IoT Core) as I am using a small wp77 with a busybox image running. When using the 8883 port the connection times out, so I have changed to port 443 and I can connect to the backend, still, the socket…
homer69
  • 53
  • 1
  • 8
1
vote
1 answer

Cannot read public key from MbedTLS in Java BouncyCastle ECDH

I am trying to do an ECDH between embedded device running mbedTLS and Java using BouncyCastle. When I compare the produced key lengths I get a 66 bytes key made by mbedTLS and 65 bytes made by BC. Attaching pseudocode: KeyPairGenerator kpg =…
WebScript
  • 67
  • 6
1
vote
1 answer

Client ssl using mbedtls using C

I am getting error message during handshake mbedtls_ssl_read_record_layer() returned -29184 (-0x7200) mbedtls_ssl_read_record() returned -29184 (-0x7200) Why this error..?
chandru
  • 129
  • 9
1
vote
0 answers

Compiling program with mbedtls library gcc command

I am trying to make a program that uses mbedtls but I am having trouble getting the gcc command to work properly. main.c thpool.c thpool.h mbedtls[Folder] all the .h files of mbedtls library[Folder] all the .c and .o files of mbedtls I…
Doritos
  • 403
  • 3
  • 16
1
vote
1 answer

Why is mbedtls_ecdsa_from_keypair returning an error?

I'm parsing an RSA private key from a buffer with mbedtls_pk_parse_key(), which returns 0. I then call mbedtls_ecdsa_from_keypair() and it returns -20096 (which I believe corresponds to MBEDTLS_ERR_ECP_FEATURE_UNAVAILABLE). I'm building something…
Chad E
  • 23
  • 1
  • 4
1
vote
1 answer

How can I hash a large file block by block with mbedtls?

I want to recursively hash a large file, how can i do that with mbedtls ? while(!isFileEOF(hFile)) { u16FileRead(&binBuffer,200,sizeof(binBuffer),hFile); mbedtls_sha256_ret(&binBuffer, sizeof(binBuffer), output, 0); …
ibrahim
  • 21
  • 2
1
vote
2 answers

mbedTLS adding to the project

I`m a newbie and have some task to work with mbedTLS. Can I ask for an advice how to add it to my project in the makefile. I have not found a static library in the root repository after make or make install on mbedTLS. Thanks in advance for the…
1
vote
2 answers

Parse a ECC private key buffer

I am using OPTEE-OS and mbedTLS and want to create a CSR. I am creating my EC key using the Global Platform API: res = TEE_AllocateTransientObject( TEE_TYPE_ECDSA_KEYPAIR, DSEC_ECDSA_SHA256_KEY_BITS, &key_pair); if (res != TEE_SUCCESS)…
Stoogy
  • 1,307
  • 3
  • 16
  • 34
1
vote
0 answers

Purpose of #undef right after #define?

I was looking at the C library "mbedtls-SGX". In the file "config.h", I found the following: #define MBEDTLS_NET_C #undef MBEDTLS_NET_C What is the purpose of this? From my understanding, having #undef right after #define means the macro doesn't do…
Foobar
  • 7,458
  • 16
  • 81
  • 161
1
vote
0 answers

CMake pass environment variable to ExternalProject_Add

I'm trying to pass an environment variable to an external project in my CMakeLists.txt without any success. In this case, I have a dependency to mbedtls library which is downloaded and built in my cmake. In Linux this works as intended, however in…
MrGigu
  • 1,729
  • 3
  • 23
  • 37
1
vote
1 answer

AES128-GCM using mbedtls on ESP32 decryption not working

I am currently working on a project to decrypt a stream of bytes coming from a smart meter using a ESP32 with the ESP-IDF toolchain. (Smart meter specification here for those interested: P1PortSpecification.pdf , chapter 2.6 page 9). I am using a…
Netsky
  • 31
  • 2
  • 8