Hi Lijin,
It still can be the endianness of the keys. If the key is reversed, there won’t be any discernible pattern or relationship between the derived secrets.
Regards, Janos
From: mbed-tls mbed-tls-bounces@lists.trustedfirmware.org on behalf of T V LIJIN (EXT) via mbed-tls mbed-tls@lists.trustedfirmware.org Date: Friday, 25 June 2021 at 09:15 To: mbed-tls@lists.trustedfirmware.org mbed-tls@lists.trustedfirmware.org Subject: Re: [mbed-tls] mbed-tls Digest, Vol 16, Issue 12 Hello, We couldn't see word swap in the output from both the end. Issue doesn't look related to the endianness. Could you please confirm that the code used for ECDHE key exchange is proper?
SHARED_SECRET (Computed on Client): 11 36 F7 DB 2B 14 BB 86 1C A0 FC DF 6D 4D 17 70 BE 4F D8 58 C2 11 67 10 42 D7 47 EB 14 4B 10 5E
SHARED_SECRET(Computed on Sever): c6 96 d9 f0 ec 37 be 9e 1a 60 a4 5f 88 f2 13 d3 bb 98 15 3f 3b d9 81 37 c6 10 12 85 e5 8b 49 16
Thanks, LIJIN T V
________________________________ From: mbed-tls mbed-tls-bounces@lists.trustedfirmware.org on behalf of mbed-tls-request@lists.trustedfirmware.org mbed-tls-request@lists.trustedfirmware.org Sent: Friday, June 25, 2021 4:52 AM To: mbed-tls@lists.trustedfirmware.org mbed-tls@lists.trustedfirmware.org Subject: mbed-tls Digest, Vol 16, Issue 12
This message is from an external sender. Be cautious, especially with links and attachments.
Send mbed-tls mailing list submissions to mbed-tls@lists.trustedfirmware.org
To subscribe or unsubscribe via the World Wide Web, visit https://eur02.safelinks.protection.outlook.com/?url=https%3A%2F%2Flists.trus... or, via email, send a message with subject or body 'help' to mbed-tls-request@lists.trustedfirmware.org
You can reach the person managing the list at mbed-tls-owner@lists.trustedfirmware.org
When replying, please edit your Subject line so it is more specific than "Re: Contents of mbed-tls digest..."
Today's Topics:
1. ECDHE Shared Secret is computed differently (T V LIJIN (EXT)) 2. Re: ECDHE Shared Secret is computed differently (Brian D.) 3. How does the bignum.c works? (Shariful Alam)
----------------------------------------------------------------------
Message: 1 Date: Thu, 24 Jun 2021 13:35:03 +0000 From: "T V LIJIN (EXT)" lijin.tv@kone.com To: "mbed-tls@lists.trustedfirmware.org" mbed-tls@lists.trustedfirmware.org Subject: [mbed-tls] ECDHE Shared Secret is computed differently Message-ID: AS8PR07MB8006A77D2451AD93FAFDA3D8FE079@AS8PR07MB8006.eurprd07.prod.outlook.com
Content-Type: text/plain; charset="iso-8859-1"
Hello , We are trying to perform an ECDHE key exchange between two devices running on different platforms.[one on Linux and another on RTOS] Both the devices use the same code to compute the ECDHE shared secret. The peer public parameters are exchanged in the base64 format and passed to the functions correctly , but the final shared secret computed seems to be different on both ends. We have tested the same source code on Visual studio and found working. I have attached the source files
Could you please comment on why the computed shared secret are different on both the ends?
Thanks, LIJIN T V