Authentication protocol for communication with Arduino Uno I am using an ECDH key exchange to establish a shared secret between an Arduino Uno and an Android device. For this purpose I am using this library and more specifically Curve25519. This is the confidentiality part of the secure communication I want to establish.

Now, before establishing shared secret between the Arduino Uno and the Android device, I want to have two-way authentication. It would be nice to have some sort of session IDs in order to be able to communicate with multiple Arduino Uno devices from a single Android device.

What do you suggest? Please consider the memory size of Arduino Uno (2kB RAM, 32kB flash).
I am going to assume we're at the application layer here and you're implementing end-to-end (E2EE) encryption.

A public key infrastructure (PKI) could help solve the mutual authentication issue. Without more detail of the project, here is one way to accomplish this. 


Both Arduinos and Android share a trusted certificate authority (CA).
Arduinos or Android create their own keys and send a certificate signing request (CSR) to the CA.
CA signs the CSRs and returns them to their respective devices.
Arduinos and Android can now mutually authenticate with each other during ECDH (or maybe even ECDHE).


Here, you're essentially mimicking how TLS provides authentication and confidentiality, but at the application layer. Session Ids can be created by using a secure hash function with your shared secret and some other data. That data will depend upon what you want your session ids to provide (constant ids, unique ids, etc).