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
1 answer

How to load created key?

I can generate keys with function below. It stores key file in file system. But what function I should use in order to load keys when system starts? status = psa_generate_key(&attributes, &aes_key_handle); if (PSA_SUCCESS != status) { …
vico
  • 17,051
  • 45
  • 159
  • 315
1
vote
1 answer

PSA crypto library makes big binary

Trying to build program for ARM Renesas RA6M1 controller with PSA Crypto API library. Looks like adding cryptography library to my project makes too big binary whe it is debug build. I need only little part of whole library functionality: generate…
vico
  • 17,051
  • 45
  • 159
  • 315
1
vote
0 answers

Can someone guide me on using an external mbedtls generated RSA keypair to perform a signature with python-mbedtls?

I want to use mbedtls (from git) to generate an RSA public/private key pair. I did so and was able to get a rsa_pub.txt and an rsa_priv.txt with the following format (I just put made up numbers except for exponent) Public: N = 469203948.. E =…
1
vote
1 answer

Security-related question regarding private key in repo for localhost

Secure sockets use a CN check against certs in a trust collection with the domain accepting or connecting. For myself I created a private and public set for localhost and that helps me debug locally. If I wanted to offer an SDK, would it be…
Kalen
  • 3,106
  • 8
  • 29
  • 42
1
vote
1 answer

Android client doesn't appear to send certificate (trying mutual authentication)

I'm trying to get an Android app to mutually authenticate to my own IoT server. The client doesn't seem to send a certificate, verified also against https://server.cryptomix.com/secure . Simple test application: package…
1
vote
0 answers

The handshake operation timed out

I've mbedtls nonRTOS server device. I'm trying to communicate with PLC Client. But before the using PLC, I'm trying to use python tls client. I've a problem with when I use below cert and key file with below method: Generate 2048-bit RSA private…
gogogo
  • 529
  • 1
  • 3
  • 11
1
vote
0 answers

Mbedtls slow handshaking

I'm using mbedTLS on baremetal lwip+stm32f4 system as a Server. TLS working successfully but when I receive the Client Hello message, my receive proccess function; err = netif->input(p, netif); take a 300ms time. I need to reduce this time. How Can…
gogogo
  • 529
  • 1
  • 3
  • 11
1
vote
0 answers

Native ESP32 MQTT library Secure connection error

Hello everyone. I want to setup an MQTT client on my esp. I was able to do it without SSL, and it is working fine with cloud mqtt providers if it is not secure. I used it with https://www.emqx.com/en/cloud and it was good. Now i want to implement…
Dr.Random
  • 430
  • 3
  • 16
1
vote
0 answers

LWIP packet length

I have a problem with the mbedtls server (stm32+lwip) send wrong length message. I am using this code in my project. https://github.com/straight-coding/straight-httpd-lwip-mbedtls-simulator Server hello message include 150 byte message but in the…
gogogo
  • 529
  • 1
  • 3
  • 11
1
vote
0 answers

How to handle -0x7880 correctly in mbedtls client?

I have a working mbedtls FTPS client implementation based on mbedtls. However, as soon as the file transfer over the data connection finished, the server (vsftpd) terminates the data connection and the client prints MBEDTLS_ERR_SSL_PEER_CLOSE_NOTIFY…
stdcerr
  • 13,725
  • 25
  • 71
  • 128
1
vote
1 answer

Different AES-256 encryption output between mbedtls and openssl

I'm working on an application that needs to decrypt a file by mbedtls which is encrypted by openssl. Currently, the decryption is not working. After investigation I've found that I cannot create the same encrypted file by using the two frameworks.…
user1104939
  • 1,395
  • 2
  • 13
  • 25
1
vote
1 answer

STM32Cube_FW_F7 client mbedTLS SSL handshake fails with FATAL_ALERT

I am trying to implement a SSL client into my IoT project. I have copied the SSL_Client example I found in STM32Cube_FW_F7_V1.15.0 into my project and was able to compile succesfully. However the SSL handshake fails with -0x7780…
Jan
  • 47
  • 8
1
vote
1 answer

Python - XY colour values not sending correctly using Philips Hue Entertainment API (via DTLS/PSK)

Edited to add link to github repository with the full class: https://github.com/EvillerBobUK/pyHue-BridgeLink-Example Requires you to have the Philips Hue hardware and various DTSL/PSK packages for the examples to work I'm writing a small program…
EvillerBob
  • 164
  • 7
1
vote
1 answer

STM32Cube_FW_F7 SSL client mbedTLS FATAL_ALERT

I am trying to implement a SSL client into my IoT project. I have copied the SSL_Client example I found in STM32Cube_FW_F7_V1.15.0 into my project and was able to compile succesfully. However the SSL handshake fails with -0x7780…
Jan
  • 47
  • 8
1
vote
1 answer

RSA signature generated with mbedtls, can't verify with C# (bouncycastle) application

I'm signing a 32 byte challenge with RSA, using mbedtls. The relevant lines of C code look like this; I'm creating a signature in 'signature' for the 32 byte 'challenge' array, using a private key: mbedtls_rsa_context rsa; mbedtls_rsa_init(&rsa,…