1

I have two systems, one running a C environment on a RTOS and another a python program running on a Pi. I need to generate an encryption key using ECDH between these two systems for symmetric encryption.

On the C Side, I am using https://github.com/kokke/tiny-ECDH-c and on the Pi side I am using the Crypto library from Cryptography.io.

I am using curve sect163k1.

The public key generated on both sides has different sizes.

The Tiny-C-ECDH library generates a public key of length 48 bytes, while on Pi, the python library is generating a public key of length 43 bytes.

As per my understanding, the length of public key on both sides should be the same for generation of the shared secret.

Please correct me if I am wrong. What am I missing here?

1
  • 1
    If possible, please edit and post the minimal code you're using for both parties.
    – brynk
    Commented Apr 23, 2021 at 15:50

0

Browse other questions tagged .