Hi,
I am evaluating TLS PSK capability on mbedlts-2.16.12 by running following command. I modified TLS client to have only PSK and removed all private key and certificate related code. However, the servier indicated x.509 verification ok. What is it?
./a.out
ok
. Performing the SSL/TLS handshake... ok
[ Protocol is TLSv1.2 ]
[ Ciphersuite is TLS-PSK-WITH-AES-128-GCM-SHA256 ]
[ Record expansion is 29 ]
. Closing the connection... done
./ssl_server2 psk="AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" psk_list="Client_identity","AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" force_ciphersuite=TLS-PSK-WITH-AES-128-GCM-SHA256
. Seeding the random number generator... ok
. Loading the CA root certificate ... ok (0 skipped)
. Loading the server cert. and key... ok
. Bind on tcp://*:4433/ ... ok
. Setting up the SSL/TLS structure... ok
. Waiting for a remote connection ... ok
. Performing the SSL/TLS handshake... ok
[ Protocol is TLSv1.2 ]
[ Ciphersuite is TLS-PSK-WITH-AES-128-GCM-SHA256 ]
[ Record expansion is 29 ]
[ Maximum fragment length is 16384 ]
. Verifying peer X.509 certificate... ok
< Read from client: 34 bytes read
GET / HTTP/1.0
Extra-header:
> Write to client: 144 bytes written in 1 fragments
HTTP/1.0 200 OK
Content-Type: text/html
<h2>mbed TLS Test Server</h2>
<p>Successful connection using: TLS-PSK-WITH-AES-128-GCM-SHA256</p>
. Closing the connection... done
. Waiting for a remote connection ...
Thanks,
Gopi Krishnan
Hi Gopi,
When you say "I modified TLS client to have only PSK and removed all private key and certificate related code." did you set the C processor directives in the include/mbedtls/mbedtls_config.h file?
To me it seems that you didn't do this and hence you still use the default configuration settings, which means that all PKI-related code is compiled into your binary.
Ciao
Hannes
From: Subramanian Gopi Krishnan via mbed-tls <mbed-tls(a)lists.trustedfirmware.org<mailto:mbed-tls@lists.trustedfirmware.org>>
Sent: Tuesday, February 22, 2022 12:15 PM
To: mbed-tls(a)lists.trustedfirmware.org<mailto:mbed-tls@lists.trustedfirmware.org>
Subject: [mbed-tls] TLS PSK display X.509 verified
Hi,
I am evaluating TLS PSK capability on mbedlts-2.16.12 by running following command. I modified TLS client to have only PSK and removed all private key and certificate related code. However, the servier indicated x.509 verification ok. What is it?
./a.out
ok
. Performing the SSL/TLS handshake... ok
[ Protocol is TLSv1.2 ]
[ Ciphersuite is TLS-PSK-WITH-AES-128-GCM-SHA256 ]
[ Record expansion is 29 ]
. Closing the connection... done
./ssl_server2 psk="AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" psk_list="Client_identity","AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" force_ciphersuite=TLS-PSK-WITH-AES-128-GCM-SHA256
. Seeding the random number generator... ok
. Loading the CA root certificate ... ok (0 skipped)
. Loading the server cert. and key... ok
. Bind on tcp://*:4433/ ... ok
. Setting up the SSL/TLS structure... ok
. Waiting for a remote connection ... ok
. Performing the SSL/TLS handshake... ok
[ Protocol is TLSv1.2 ]
[ Ciphersuite is TLS-PSK-WITH-AES-128-GCM-SHA256 ]
[ Record expansion is 29 ]
[ Maximum fragment length is 16384 ]
. Verifying peer X.509 certificate... ok
< Read from client: 34 bytes read
GET / HTTP/1.0
Extra-header:
> Write to client: 144 bytes written in 1 fragments
HTTP/1.0 200 OK
Content-Type: text/html
<h2>mbed TLS Test Server</h2>
<p>Successful connection using: TLS-PSK-WITH-AES-128-GCM-SHA256</p>
. Closing the connection... done
. Waiting for a remote connection ...
Thanks,
Gopi Krishnan
Hi ,
*Problem description :*
Trying to run example
https://github.com/ARMmbed/mbedtls/blob/master/programs/ssl/ssl_server2.c .
Updated ssl_server2 port to listen on 7777 for incoming client request
,ssl_server2
will be waiting for remote connection continuously.
There was no client request for connection on this port, but still server
is getting some spurious connection request and goes for handshake and
fails with below error code.
Error code: mbedtls_ssl_handshake returned error -30976
*Steps to reproduce: =============*
1. start ssl_server2 program
2. Monitor for ssl_server2 connection waiting , observe ssl_server2 will
accept spurious connection request and goes for handshake and fails
with above
mentioned error code.
*Expected behavior:*
ssl_server2 wait for remote connection infinitely and connect to valid
client request and perform handshake every time.
*Actual behavior:*
Occasionally ssl_server2 will accept spurious connection request and goes
for handshake and fails with below error code.
Error code:
mbedtls_ssl_handshake returned error -30976 on ssl_server2
*Analysis:*
As per below logs what we understand is ssl_server2 will accept spurious
connection request and goes for handshake and fails with error code
-30796 ,MBEDTLS_ERR_SSL_BAD_HS_CLIENT_HELLO
on ssl_server2 side .
Can you please help us to understand this behavior?
What could be the reason for ssl_server2 to connect to a spurious
connection request?, as mentioned above there was no client request for
connection on this ssl_server2 port( 7777) .
We have tried this on other SERVER_PORT as well .
*Logs Snippet:*
*==========*
. Seeding the random number generator... ok
. Loading the CA root certificate ... ok (0 skipped)
. Loading the server cert. and key... ok
. Bind on tcp://*:7777/ ... ok
. Setting up the SSL/TLS structure... ok
. Waiting for a remote connection ...ok
. Performing the SSL/TLS handshake... failed
! mbedtls_ssl_handshake returned -0x7900
Last error was: -30976 - SSL - Processing of the ClientHello handshake
message failed
. Waiting for a remote connection ... ok
. Performing the SSL/TLS handshake... failed
! mbedtls_ssl_handshake returned -0x7900
Last error was: -30976 - SSL - Processing of the ClientHello handshake
message failed
. Waiting for a remote connection ... ok
. Performing the SSL/TLS handshake... failed
! mbedtls_ssl_handshake returned -0x7900
Last error was: -30976 - SSL - Processing of the ClientHello handshake
message failed
Regards
Mahesh
--
Mbed-tls-announce mailing list -- mbed-tls-announce(a)lists.trustedfirmware.org
To unsubscribe send an email to mbed-tls-announce-leave(a)lists.trustedfirmware.org
Hi,
I have ported mbedtls library on am embedded platform developed to encrypt / decrypt messages using AES GCM 256 key. After several hours of running, we are experiencing error MBEDTLS_ERR_CIPHER_ALLOC_FAILED 0x6180 and malloc functions fails as the heap seems to be piled-up.
How could I is using correct free function and the actual allocated memory is freed?
Thanks,
Gopi Krishnan
All,
Not sure if this is the right audience (If it is not let me know if there is a better place to ask the following question)
We have been looking at future security requirements for CPE devices, and we think that we need the following functionality that is currently not really available in the current crypto libraries.
- Support for Quantum computing secure algorithms (Post Quantum of PQ algorithms)
- Support for Hybrid keys ( PQ plus Classic algorithm), preferable in any configuration.
- Modularized public key crypto algorithms implementation, to simplify adding new algorithms
- Updating public key architecture to simplify off-loading private key operations to a Trusted Execution environment or other security HW.
We initially looked at openssl, but found the openssl difficult to work with, so we decided to look at Mbedtls, which has a more lightweight design.
We modified the mbedtls 'pkey' code to make it more modularized (building on the pkwrap design), and added to support for Hybrid keys, which was relatively easy to do.
Updating the TLS library to support hybrid keys has however been a big challenge. The TLS code is very interwoven with the 'pkey' code, and seems to have almost unique implementation for each type of key, making it difficult to follow and modify. Adding support for other (PQ) algorithms within that design will be challenge.
Before spending too much time on this we would like to know if there is an interest in the MBEDTLS community for a redesign of the code to support hybrid keys, PQ algorithms and modularized public key architecture.
Thanks,
Robert
E-MAIL CONFIDENTIALITY NOTICE:
The contents of this e-mail message and any attachments are intended solely for the addressee(s) and may contain confidential and/or legally privileged information. If you are not the intended recipient of this message or if this message has been addressed to you in error, please immediately alert the sender by reply e-mail and then delete this message and any attachments. If you are not the intended recipient, you are notified that any use, dissemination, distribution, copying, or storage of this message or any attachment is strictly prohibited.
Hi All, A gentle reminder that the US-Europe timezone-friendly MBest TLS
Tech forum is next Monday. If you have any topics, please let Dave Rodgman
know. :) Best regards, Don
Title: MBed TLS Technical Forum
Trusted Firmware is inviting you to a scheduled Zoom meeting.
Topic: MBed TLS Technical Forum
Time: Oct 25, 2021 04:30 PM London
Every 4 weeks on Mon, 20 occurrence(s)
Oct 25, 2021 04:30 PM
Nov 22, 2021 04:30 PM
Dec 20, 2021 04:30 PM
Jan 17, 2022 04:30 PM
Feb 14, 2022 04:30 PM
Mar 14, 2022 04:30 PM
Apr 11, 2022 04:30 PM
May 9, 2022 04:30 PM
Jun 6, 2022 04:30 PM
Jul 4, 2022 04:30 PM
Aug 1, 2022 04:30 PM
Aug 29, 2022 04:30 PM
Sep 26, 2022 04:30 PM
Oct 24, 2022 04:30 PM
Nov 21, 2022 04:30 PM
Dec 19, 2022 04:30 PM
Jan 16, 2023 04:30 PM
Feb 13, 2023 04:30 PM
Mar 13, 2023 04:30 PM
Apr 10, 2023 04:30 PM
Please download and import the following iCalendar (.ics) files to your
calendar system.
Weekly:
https://linaro-org.zoom.us/meeting/tJEkceuurT4sGdaksikbUn6FARB9Kuk3ac2o/ics…
Join Zoom Meeting
https://linaro-org.zoom.us/j/95962635632?pwd=STFkQVltejAzRDJ6NmoxZjhmZC9RUT…
Meeting ID: 959 6263 5632
Passcode: 018366
One tap mobile
+13462487799,,95962635632# US (Houston)
+16699009128,,95962635632# US (San Jose)
Dial by your location
+1 346 248 7799 US (Houston)
+1 669 900 9128 US (San Jose)
+1 253 215 8782 US (Tacoma)
+1 312 626 6799 US (Chicago)
+1 646 558 8656 US (New York)
+1 301 715 8592 US (Washington DC)
877 853 5247 US Toll-free
888 788 0099 US Toll-free
Meeting ID: 959 6263 5632
Find your local number: https://linaro-org.zoom.us/u/aewUpnQu5y
When: Mon Feb 14, 2022 9:30am – 10:30am Mountain Standard Time - Phoenix
Who:
* Don Harbin - creator
* psa-crypto(a)lists.trustedfirmware.org
* mbed-tls(a)lists.trustedfirmware.org
* nnac123(a)gmail.com
Hello,
I am evaluating the mbedTLS library and trying to create a build with Visual Studio 2010, but I am encountering errors. Below are the steps I have taken:
1. Downloaded "mbedtls-3.1.0.zip" and extracted the contents to my Windows 10 computer.
2. Run Visual Studio 2010 and open the solution "mbedTLS.sln" in the folder "mbedtls-3.1.0\visualc\VS2010".
3. Select the "mbedTLS" project and select "Rebuild Only mbedTLS". This is for the Release configuration targeting Win32.
4. During the build process multiple errors are encounter, which seem to be related to Visual Studio's limited C Compiler support. The build output is attached.
Am I missing any steps for configuring the solution or project? I was under the impression that mbedTLS offered support for compiling with Visual Studio 2010? Any help that you can provide would be greatly appreciated.
Best regards,
Murray Shirley, P.Eng.
MicroSurvey Software, Inc.
(250) 707-0000
murray.shirley(a)microsurvey.com<mailto:murray.shirley@microsurvey.com>
Hi,
I am developing TLS client and server for embedded systems. Considering the operational efficiency, it is sufficient to have data authentication. Is it possible to setup a TLS communication with data authentication and without encryption?
Consider a PLC network,
1. Within physical secure zone.
2. Requires faster data transfer.
3. Data are not confidential, but must be cryptographically authenticated.
Thanks,
Gopi Krishnan
Hello.
I am facing the issue of certificate verification error during handshake.The problem is described by me in the appropriate section of the forum.
https://forums.mbed.com/t/mbedtls-failing-with-the-certificate-is-not-corre…
Please help me figure it out - there is no one else to turn to.
Sincerely,
Shabrov Dmitry