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

cannot add mbedtls to project

Trying to add mbedtls to my project, I use apt-get install to install libmbedtls-dev are these imports incorrect? for Ubuntu 16.04.works fine on 18.04 file (GLOB C_FILES *.c) file (GLOB H_FILES "../../../include/thrift/ssl/*.h") add_library…
0
votes
1 answer

What is size (in bytes) of Mbed TLS rsa_context?

I use MBED-TLS on STM32F103 device. STM 32F103 device has little SRAM memory (20 Kbytes). I would like to calculate the ram used by mbedtls_rsa_context How to do this? Is it : sizeof(mbedtls_rsa_context) + 13 * sizeof(mbedtls_mpi ) +…
LeMoussel
  • 5,290
  • 12
  • 69
  • 122
0
votes
0 answers

Building a embedded C client for AWS IoT with C SDK: mbedtls libraries

I am not able to build the sample application (subscribe_publish_sample) written in C for IoT on AWS. On page ... https://docs.aws.amazon.com/iot/latest/developerguide/iot-embedded-c-sdk.html ... there it is said that I have to download all required…
AgeBee
  • 11
  • 1
0
votes
2 answers

Mbedtls entropy generation runs forever

I'm trying to write an test function for mbedtls which randomly generates a key for AES encryption. I use the original tutorial Code from mbedtls. My Programm always stops when executing "mbedtls_ctr_drbg_seed()". About my environmet: Basic…
M-K
  • 131
  • 1
  • 10
0
votes
1 answer

2 connections on a same server with different ports mbedtls

I am working on an Embedded project with Lwip and mbedTLS stacks. I a have a thread that manage a connection to a server on the port 21. This connection is encrypted with mbedTLS and everything works well. Now I need to create another connection on…
Manu53
  • 91
  • 1
  • 1
  • 6
0
votes
2 answers

Does mbedTLS works on STM32 F1?

The stack mbedTLS is provided by ST for its STM32 F7 microcontrollers but it isn't for STM32 F1. So I wanted to know if there was a reason and if it was possible to make mbedTLS works on a STM32 F1. Thank you.
Manu53
  • 91
  • 1
  • 1
  • 6
0
votes
0 answers

mbedtls entropy generation (nv_seed)

I am using mbedtls as TLS library for amazon FreeRTOS running on my hardware(SAM4E). The library has been ported and I am using nv_seed method to generate random numbers. I am reading and writing the 32Bit data to EEPROM. I was getting the TLS…
sudo
  • 115
  • 2
  • 7
0
votes
1 answer

MBEDTLS_ERR_CTR_DRBG_ENTROPY_SOURCE_FAILED

im trying to code a Diffie-Hellman key Exchange (client side) into a XMC4500 and I'm using ARMmbed lib. This is the code I got (based on dh_client.c): int dhm (void) { int ret; size_t n, buflen; unsigned char *p, *end; unsigned char…
0
votes
0 answers

mbedtls entropy: Segmentation fault on init

I'm currently working on a projet using mbedtls and specifically, I'm tring to set up an entropy context that would allow me to start a random number generator. Trying to understand the mechanism, I looked at the sample program gen_entropy. Although…
Yann Lelong
  • 433
  • 1
  • 4
  • 16
0
votes
1 answer

MbedTLS GCM Decryption Error

I have the C program below that tries to use the MbedTLS AES GCM functions to encrypt and decrypt. The encryption is running well but the decryption is abending with rc = -25344 (-0x6300) in mbedtls_cipher_check_tag(). The mbedtls_strerror returns…
0
votes
1 answer

MPPE key not matching when i use mbedtls

I'm running Mbed TLS as a core security library, in embedded platform. my application is used to connect to enterprise network using PEAPv0 with mschapv2 as phase2 authentication. Following are the setup details server setup on Ubuntu Eap…
0
votes
3 answers

how to encrypt a string in aes waywith mbedtls?

We all know that mbedtls library is a very lightweight c library. I want to use the library to encrypt a string. So I have a function like this: aes_encrypt.h: #ifndef AES_ENCRYPT_H #define AES_ENCRYPT_H #define BOOL int #define TRUE 1 #define…
Andy
  • 161
  • 1
  • 3
  • 9
0
votes
1 answer

Undefined reference with a correctly linked library

I'm having a weird problem with mbedtls security library. I've downloaded the newest version of it (link to download the .tar.gz) on my Ubuntu machine, then compiled it and copied the header files to /usr/include and the shared library files to the…
Jussi Hietanen
  • 181
  • 1
  • 1
  • 12
0
votes
1 answer

Unable to send GET request to Twitter API, but can send POST request?

We use application-only authentication and get back an access token. We then make a GET request to a specific user's timeline by doing the following: _bpos = snprintf(_buffer, sizeof(_buffer)-1, "GET…
14wml
  • 4,048
  • 11
  • 49
  • 97
0
votes
1 answer

mbedTLS pk parse error

Could anyone help me find out why I get a -16000 (bad input data) on attempt to parse a public/private key from a unsigned char*? Here's my code (edited for brevity): DataPoint* GetPublicKey(mbedtls_pk_context* pppctx) { unsigned char* PKey =…
1 2 3
10
11